:root {
    --primary: #1e4620; /* Deep Forest Green */
    --primary-light: #2d6a4f;
    --accent: #d8f3dc; /* Light Sage Green */
    --accent-dark: #74c69d;
    --text-color: #2d3748;
    --text-muted: #718096;
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo span {
    color: var(--accent-dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-light);
}

.cart-icon-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cart-icon-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.cart-count {
    background: white;
    color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at 80% 20%, var(--accent) 0%, rgba(255,255,255,0) 50%),
                radial-gradient(circle at 10% 80%, rgba(116,198,157,0.1) 0%, rgba(255,255,255,0) 50%);
    padding: 6rem 2rem 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-tag {
    background: var(--accent);
    color: var(--primary);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Products Section */
.products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background-color: #f7fafc;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.add-to-cart-btn {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background: var(--primary);
    color: white;
}

/* Cart Overlay/Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.cart-header h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f7fafc;
}

.cart-item-details h4 {
    font-weight: 700;
    font-size: 1rem;
}

.cart-item-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 0.85rem;
}

.cart-footer-summary {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.checkout-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* Backdrop */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.logo-img {
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}

/* Product Detail Popover Modal */
.product-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 820px;
    height: 550px;
    max-height: 90vh;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1150;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    grid-template-columns: 1.1fr 1.1fr;
    overflow: hidden;
}

.product-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 2rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    color: #e53e3e;
}

.modal-gallery {
    padding: 1.75rem;
    background: #fcfdfc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    border-right: 1px solid #edf2f7;
    height: 100%;
    box-sizing: border-box;
}

.modal-main-img-container {
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.modal-thumbnails {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.modal-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    background: #f7fafc;
}

.modal-thumb:hover {
    opacity: 0.8;
}

.modal-thumb.active {
    border-color: var(--primary-light);
}

.modal-info {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.modal-info-scrollable {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: 1.25rem;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.sku-section {
    margin-bottom: 1rem;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sku-cards {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sku-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    box-sizing: border-box;
}

.sku-card:hover {
    border-color: var(--primary-light);
}

.sku-card.active {
    border-color: var(--primary);
    background: #f4faf6;
}

.sku-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.sku-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.sku-card-weight {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
}

.sku-card-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sku-card-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sku-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
}

.sku-card-badge {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.sku-card-save {
    font-size: 0.65rem;
    font-weight: 700;
    color: #e53e3e;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Action Row (Quantity + Price CTA) */
.modal-action-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #edf2f7;
    background: white;
    flex-shrink: 0;
    margin-top: auto;
}

.qty-control.compact {
    display: flex;
    align-items: center;
    border: 2px solid #edf2f7;
    border-radius: 10px;
    overflow: hidden;
    height: 44px;
    flex-shrink: 0;
}

.qty-control.compact .qty-btn {
    width: 32px;
    height: 100%;
    border: none;
    background: #fcfdfc;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-control.compact .qty-btn:hover {
    background: var(--accent);
    color: var(--primary);
}

.qty-control.compact .qty-val {
    width: 32px;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-color);
}

.unified-cta {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.unified-cta:hover {
    background: var(--primary-light);
}

.modal-urgency-note {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e53e3e;
    text-align: center;
    margin-top: 0.5rem;
    flex-shrink: 0;
    background: #fff5f5;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid #fed7d7;
}

#cart-backdrop {
    z-index: 1040;
}

#cart-sidebar {
    z-index: 1050;
}

#modal-backdrop {
    z-index: 1140;
}

#product-modal {
    z-index: 1150;
}

#checkout-backdrop {
    z-index: 1140;
}

#checkout-modal {
    z-index: 1150;
}

/* Form elements global styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 2px solid #edf2f7;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: #fcfdfc;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(116, 198, 157, 0.2);
}

textarea.form-input {
    height: 90px;
    resize: none;
}

/* Checkout Modal styling */
.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 620px;
    max-height: 85vh;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2.5rem;
    overflow-y: auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.checkout-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.checkout-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.checkout-modal-close:hover {
    color: #e53e3e;
}

.checkout-modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.checkout-form-grid.tripartite {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    background: rgba(255, 255, 255, 0.95);
    border-left: 5px solid var(--primary);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: 320px;
    transform: translateX(120%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-msg {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
}

.toast-action {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.toast-action:hover {
    background: var(--accent-dark);
}

/* Badge Pop Animation */
@keyframes badgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.badge-pop {
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Cart suggestions cross-sell UI */
.cart-suggestions-section {
    margin: 1.5rem 1rem 1rem 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #edf2f7;
}

.cart-suggestion-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-suggestion-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px dashed var(--primary-light);
}

.cart-suggest-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-suggest-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cart-suggest-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.cart-suggest-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-dark);
    margin-top: 0.15rem;
}

.cart-suggest-add {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.cart-suggest-add:hover {
    background: var(--primary-light);
}

.cart-suggest-combo-success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #c6f6d5;
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    .nav-links {
        display: none;
    }
    .product-modal {
        display: flex;
        flex-direction: column;
        top: 5%;
        left: 5%;
        transform: translate(0, 0) scale(0.9);
        width: 90%;
        max-width: none;
        height: 90vh;
        overflow-y: auto;
    }
    .product-modal.active {
        transform: translate(0, 0) scale(1);
    }
    .modal-gallery {
        border-right: none;
        border-bottom: 1px solid #edf2f7;
        padding: 1.5rem;
        height: auto;
        flex-shrink: 0;
    }
    .modal-main-img-container {
        height: 250px;
    }
    .modal-info {
        padding: 1.5rem;
        height: auto;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }
    .modal-info-scrollable {
        flex: none;
        height: auto;
        overflow-y: visible;
    }
    .checkout-modal {
        top: 5%;
        left: 5%;
        transform: translate(0, 0) scale(0.9);
        width: 90%;
        max-width: none;
        height: 90vh;
        padding: 1.5rem;
    }
    .checkout-modal.active {
        transform: translate(0, 0) scale(1);
    }
    .checkout-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .checkout-form-grid.tripartite {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Global Footer Styling */
footer {
    background: var(--primary);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
footer a {
    color: var(--accent) !important;
    text-decoration: none;
    font-weight: 700;
}
footer p {
    margin-bottom: 1rem;
    line-height: 1.6;
}
