@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

:root {
    --color-primary: #0a1930;
    /* Dark Navy - Text */
    --color-secondary: #f4f6f8;
    /* Light gray bg */
    --color-accent: #0044cc;
    /* Interactive Blue */
    --color-bg: #ffffff;
    --color-card-bg: #ffffff;

    --font-heading: 'Open Sans', Helvetica, Arial, sans-serif;
    --font-body: 'Open Sans', Helvetica, Arial, sans-serif;

    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-body);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

header {
    /* Default header reset/base */
    margin-bottom: var(--spacing-xl);
}

.hero-header {
    background: transparent;
    padding: 60px 20px;
    margin-bottom: 40px;
    text-align: center;
}

.hero-header h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    /* Increased spacing */
    color: #111E30;
    /* Dark Navy requested by user */
    font-weight: 800;
    line-height: 1.1;
    text-shadow: none;
}

.hero-header p {
    font-size: 1.3rem;
    color: #111E30;
    max-width: 700px;
    margin: 0 auto 30px;
    font-weight: 500;
    text-shadow: none;
}

/* Category Filters */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.filter-btn {
    background: #f8f9fa;
    border: 1px solid #dae1e7;
    border-radius: 50px;
    /* Pill shape */
    padding: 10px 24px;
    font-size: 0.95rem;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 10px rgba(10, 25, 48, 0.2);
}



/* Win Projects / Extra Styles */
.site-logo {
    height: 60px;
    transition: opacity 0.2s;
    display: block;
    /* Ensure it behaves well in flex */
}

/* Global Win Grid */
/* Global Win Grid */
.login-btn-top {
    position: absolute;
    top: 20px;
    right: 20px;
    /* Adjusted margin */
    text-decoration: none;
    color: #111E30;
    padding: 8px;
    border: none;
    /* Removed border */
    background: transparent;
    /* Transparent background */
    transition: all 0.2s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn-top:hover {
    background: rgba(17, 30, 48, 0.05);
    color: var(--color-accent);
    transform: scale(1.1);
    border-radius: 50%;
    /* Circular hover */
}

/* Distinct Win Products Filter Button */
.filter-btn.win-products-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.filter-btn.win-products-btn.active,
.filter-btn.win-products-btn:hover {
    background: linear-gradient(135deg, #ffca28 0%, #fb8c00 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.win-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 30px;
    padding: 20px 0;
}

/* Win Card Styles (Moved from templates) */
.win-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    width: 300px;
    /* Fixed width for flex centering */
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

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

.win-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #fdfdfd;
    padding: 20px;
}

.win-content {
    padding: 25px;
    flex: 1;
    /* Stretch to fill */
    display: flex;
    flex-direction: column;
}

.win-date {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.win-title {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.win-ingredients {
    background: #f4f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: auto;
    /* Push to bottom */
}

.win-ingredients h4 {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.ing-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.ing-code {
    color: var(--color-accent);
    font-family: monospace;
    font-weight: bold;
}


.site-logo:hover {
    opacity: 0.8;
}

/* Adjust for Admin Mode */
.live-admin-mode .site-logo {
    top: 90px;
}

/* Remove old site-logo absolute positioning for index since it's in nav now */
/* We need to be careful not to break other pages. I will scope the absolute logo removal/hide to index if possible or handle it globally */


.stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.stats-item strong {
    display: block;
    font-size: 2.5rem;
    color: var(--color-primary);
}

.stats-item span {
    font-size: 0.9rem;
    color: #666;
}

/* Category Navigation */
.category-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    border-bottom: 2px solid #eee;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
}

.category-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: color 0.3s, border-bottom 0.3s;
    position: relative;
}

.category-btn:hover,
.category-btn.active {
    color: var(--color-primary);
}

.category-btn.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    /* Align with border-bottom of container */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
}

/* Category Sections */
.category-section {
    margin-bottom: var(--spacing-xl);
}

.category-main-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--spacing-sm);
    display: inline-block;
}

/* Product Grid/Shelf */
.product-grid {
    display: block;
}

.subcategory-section {
    margin-bottom: var(--spacing-lg);
}

.subcategory-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: var(--spacing-md);
    margin-left: var(--spacing-sm);
}

.products-shelf {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    /* Enable horizontal scrolling */
    padding: var(--spacing-md) var(--spacing-sm);
    /* Add padding for shadow visibility */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.products-shelf.active {
    cursor: grabbing;
}

/* Hide scrollbar for cleaner look */
.products-shelf::-webkit-scrollbar {
    height: 6px;
}

.products-shelf::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.products-shelf::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.product-card {
    background: var(--color-card-bg);
    border-radius: 8px;
    padding: var(--spacing-md);
    min-width: 160px;
    /* Fixed width for horizontal items */
    width: 160px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

/* Hover Zoom Effect */
.product-card:hover {
    transform: scale(1.1);
    /* Zoom effect requested */
    box-shadow: var(--shadow-hover);
    z-index: 10;
    border-color: #eee;
    background: white;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
    transition: transform 0.3s;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    padding: var(--spacing-xl);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-hover);
}

.close-modal {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}


/* Login Button (Static) */
.site-login-btn {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 24px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: white;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-login-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.search-container {
    margin-top: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

#product-search {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    transition: all 0.3s;
    outline: none;
    background: #fdfdfd;
}

#product-search:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(0, 68, 204, 0.1);
}

.btn-win {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 170, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-win:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 170, 0, 0.4);
}

/* Shelf Navigation - Restored Scrollbar & Drag */
.shelf-wrapper {
    /* No relative wrapper needed for arrows anymore */
    display: block;
}

/* Remove Arrow Button Styles if they exist */
.nav-btn {
    display: none;
}

.nav-left {
    margin-right: 10px;
}

.nav-right {
    margin-left: 10px;
}

.products-shelf {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: var(--spacing-md) var(--spacing-sm);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;

    /* Restore Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.products-shelf.active {
    cursor: grabbing;
}

.products-shelf::-webkit-scrollbar {
    height: 8px;
    /* Slightly thicker */
    display: block;
}

.products-shelf::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.products-shelf::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.products-shelf::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Footer Styles */
.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo-main {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-logo-claim {
    height: 45px;
    width: auto;
    object-fit: contain;
    margin-top: 10px;
    /* Push down slightly */
}

/* Navigation Helpers */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Win Product Extra Fields */
.win-description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-win-link {
    display: inline-block;
    padding: 8px 20px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.btn-win-link:hover {
    background: #0d2847;
    text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 60px 5px 20px;
        /* Reduced side padding */
    }

    /* 1. Reduce Header Font Size */
    .hero-header h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .hero-header p {
        font-size: 0.95rem;
        padding: 0 5px;
    }

    /* 2. Resize Search Bar */
    .search-container {
        padding: 0;
        width: 100%;
        margin-top: 20px;
    }

    #product-search {
        font-size: 0.95rem;
        padding: 10px 15px;
        width: 100%;
        /* Full width */
    }

    /* 3. Compact Filter Buttons */
    .filter-container {
        gap: 6px;
        padding: 0 5px;
        justify-content: flex-start;
        overflow-x: auto;
        /* Allow scrolling if needed */
        flex-wrap: nowrap;
        /* Single line scroll */
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        /* Space for scrollbar */
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
        flex: 0 0 auto;
        /* Don't shrink */
    }

    /* 4. Footer Logos Resize */
    .footer-flex {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-logo-main {
        height: 35px;
    }

    .footer-logo-claim {
        height: 25px;
        margin-top: 5px;
    }

    .win-card {
        width: 100%;
    }
}

/* Scroll Top Button */
#scrollTopBtn {
    display: none;
    /* JS will toggle */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: #0a1930;
    color: white;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

#scrollTopBtn:hover {
    background-color: #0044cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}