/* --- Design System & Custom Properties --- */
:root {
    --primary-red: #ff4757;
    --primary-red-hover: #e03241;
    --primary-red-light: #ffebee;
    --primary-green: #1b4d3e;
    --primary-green-hover: #123329;
    --accent-green: #2ecc71;
    --accent-green-light: #e8f8f0;
    --dark-seed: #1e272e;
    --light-bg: #f7f9f6;
    --white: #ffffff;
    --gray-light: #f1f2f6;
    --gray-medium: #ced6e0;
    --gray-text: #747d8c;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 15px 30px rgba(255, 71, 87, 0.2);
    
    /* Layout */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 10px;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base Reset & General --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-seed);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, textarea {
    font-family: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

/* --- Utilities --- */
.hidden {
    display: none !important;
}

.text-left {
    text-align: left;
    direction: ltr;
}

.font-bold {
    font-weight: 700;
}

/* --- Header / Navigation --- */
.header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-emoji {
    font-size: 2rem;
    animation: bounce 3s infinite;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 0.5px;
}

.instagram-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.25);
    transition: var(--transition-smooth);
}

.instagram-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 80px 0 100px 0;
    background: radial-gradient(circle at 10% 20%, rgba(232, 248, 240, 0.6) 0%, rgba(255, 235, 238, 0.3) 90.1%);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    background-color: var(--accent-green-light);
    color: var(--primary-green);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 20px;
    line-height: 1.25;
}

.highlight-text {
    color: var(--primary-red);
    position: relative;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(255, 73, 92, 0.15);
    z-index: -1;
    border-radius: 4px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--gray-text);
    margin-bottom: 35px;
    max-width: 520px;
}

.price-box {
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-label {
    font-size: 0.9rem;
    color: var(--gray-text);
    font-weight: 600;
}

.price-value-container {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
}

.price-currency {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green);
}

.delivery-included {
    background-color: var(--accent-green-light);
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-right: 15px;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    outline: none;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 20px 35px rgba(255, 71, 87, 0.35);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-pulse {
    position: relative;
    animation: pulse 2s infinite;
}

/* Hero Image */
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-bg-glow {
    position: absolute;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(20px);
    z-index: 1;
}

.hero-image {
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.12));
}

/* --- Features Section --- */
.features-section {
    padding: 60px 0;
    background-color: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius-md);
    padding: 30px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(46, 204, 113, 0.15);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 1.5rem;
    color: var(--primary-red);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--gray-text);
}

/* --- Order Section --- */
.order-section {
    padding: 100px 0;
    background-color: var(--light-bg);
    background-image: radial-gradient(var(--gray-medium) 0.75px, transparent 0.75px);
    background-size: 24px 24px;
    background-opacity: 0.15;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.4rem;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-text);
}

.order-card-wrapper {
    max-width: 760px;
    margin: 0 auto;
}

.order-form {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    padding: 45px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.required {
    color: var(--primary-red);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 16px;
    color: var(--gray-text);
    font-size: 1.1rem;
    pointer-events: none;
}

.form-input, .form-textarea {
    width: 100%;
    background-color: var(--white);
    border: 1.5px solid var(--gray-medium);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--dark-seed);
    transition: var(--transition-smooth);
    outline: none;
}

.input-wrapper .form-input {
    padding-right: 48px;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.12);
}

.form-textarea {
    resize: none;
}

.input-hint {
    font-size: 0.8rem;
    color: var(--gray-text);
    margin-top: 2px;
}

/* Form Grid Layouts */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 10px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
}

/* Address subsection */
.address-section {
    background-color: rgba(46, 204, 113, 0.03);
    border: 1px dashed rgba(46, 204, 113, 0.25);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin: 30px 0;
}

.subsection-title {
    font-size: 1.1rem;
    color: var(--primary-green);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quantity Counter Section */
.quantity-group {
    background-color: rgba(255, 71, 87, 0.03);
    border: 1px solid rgba(255, 71, 87, 0.15);
    padding: 24px;
    border-radius: var(--border-radius-md);
    align-items: center;
    margin-bottom: 30px;
}

.quantity-selector-container {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border: 2px solid var(--gray-medium);
    border-radius: 50px;
    padding: 4px;
    margin: 10px 0 20px 0;
    box-shadow: var(--shadow-sm);
    width: 200px;
    justify-content: space-between;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: var(--gray-light);
    color: var(--primary-green);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.quantity-btn:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.quantity-input {
    width: 60px;
    border: none;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-green);
    outline: none;
    background: transparent;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Receipt Details */
.receipt-box {
    width: 100%;
    background-color: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--gray-text);
}

.green-badge {
    color: var(--accent-green);
    font-weight: 700;
}

.receipt-divider {
    border: none;
    border-top: 1px dashed var(--gray-medium);
    margin: 4px 0;
}

.total-row {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary-green);
}

.total-row #total-price-display {
    color: var(--primary-red);
    font-size: 1.35rem;
}

/* GPS Button Details */
.location-input-btn-container {
    display: flex;
    gap: 12px;
}

.flex-grow {
    flex-grow: 1;
}

.btn-gps {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 0 20px;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
}

.btn-gps:hover {
    background-color: var(--primary-green-hover);
    transform: translateY(-2px);
}

.fa-spin-hover:hover {
    animation: fa-spin 2s infinite linear;
}

.gps-status {
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 600;
}

.gps-status.loading {
    color: var(--primary-green);
}

.gps-status.success {
    color: var(--accent-green);
}

.gps-status.error {
    color: var(--primary-red);
}

/* Submit Button & States */
.form-submit-container {
    margin-top: 40px;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 18px;
    font-size: 1.2rem;
    box-shadow: var(--shadow-glow);
    border-radius: var(--border-radius-md);
}

.btn-submit:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 71, 87, 0.35);
}

.btn-submit:disabled {
    background-color: var(--gray-medium);
    color: var(--gray-text);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-green);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-size: 0.95rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

/* --- Success Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(27, 77, 62, 0.7); /* Deep Green glass overlay */
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 520px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay:not(.hidden) .modal-card {
    transform: translateY(0);
}

.modal-success-icon {
    font-size: 4.5rem;
    color: var(--accent-green);
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.modal-description {
    font-size: 0.95rem;
    color: var(--gray-text);
    margin-bottom: 25px;
}

.modal-order-summary {
    background-color: var(--light-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    text-align: right;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.summary-title {
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gray-medium);
    padding-bottom: 8px;
    font-size: 0.95rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--dark-seed);
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item span {
    color: var(--gray-text);
}

.modal-close-btn {
    width: 100%;
}

/* --- Animations --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); box-shadow: 0 15px 35px rgba(255, 71, 87, 0.4); }
    100% { transform: scale(1); }
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-image-container {
        order: -1; /* Image first on tablets/mobiles */
        max-width: 320px;
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .instagram-link-btn span {
        display: none; /* Icon only on mobile navigation */
    }
    
    .instagram-link-btn {
        padding: 10px 14px;
    }
    
    .hero-section {
        padding: 40px 0 60px 0;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .price-amount {
        font-size: 2.5rem;
    }
    
    .hero-cta-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        padding: 14px 24px;
    }
    
    .order-form {
        padding: 24px;
    }
    
    .form-grid, .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .address-section {
        padding: 16px;
    }
    
    .location-input-btn-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-gps {
        width: 100%;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none; /* Just emoji on tiny screens to save space */
    }
    
    .instagram-link-btn span {
        display: inline; /* show link text again if we have room */
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .modal-card {
        padding: 24px 16px;
    }
}
