/* Global Styles & Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --color-primary: #2D5A27;
    /* Forest Green */
    --color-primary-light: #4A7A42;
    --color-secondary: #8FBC8F;
    /* Sage */
    --color-accent: #D4C4A8;
    /* Sand */
    --color-bg: #F9F7F2;
    /* Cream */
    --color-white: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-light: #666666;
    --color-border: #E5E5E5;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

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

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-heading);
}

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

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

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

.section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--color-text);
}

/* Footer */
.footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 80px 0 40px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer h4 {
    color: var(--color-white);
    margin-bottom: 24px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Product Card */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-secondary);
}

.product-image {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: #f0f0f0;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.product-price {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-primary);
}

.product-actions {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-icon-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Mobile Responsive */
.filters-header-mobile {
    display: none;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        /* Simple hide for now, would need JS for burger */
    }

    .section {
        padding: 40px 0;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grids */
.reveal-delay-100 {
    transition-delay: 0.1s;
}

.reveal-delay-200 {
    transition-delay: 0.2s;
}

.reveal-delay-300 {
    transition-delay: 0.3s;
}

/* Home Page Specifics */
.hero {
    height: 80vh;
    min-height: 600px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    position: relative;
    border-radius: 0 0 40px 40px;
    margin-bottom: 60px;
}

.hero-content {
    max-width: 800px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
    font-size: 64px;
    color: var(--color-white);
    margin-bottom: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    position: relative;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: var(--color-white);
}

.category-overlay h3 {
    color: var(--color-white);
    font-size: 24px;
    margin-bottom: 8px;
}

/* Category Page Specifics */
.page-header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0;
    margin-bottom: 60px;
    border-radius: 0 0 40px 40px;
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
}

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

.filters {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-md);
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

.filter-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--color-text-light);
}

.filter-list li:hover {
    color: var(--color-primary);
}

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

/* Product Page Specifics */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.product-gallery {
    display: grid;
    gap: 20px;
}

.main-image {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border: 2px solid var(--color-primary);
}

.product-info-detail h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.price-large {
    font-size: 32px;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 24px;
}

.meta-info {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 32px;
}

.add-to-cart-form {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.quantity-input {
    width: 80px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    text-align: center;
    font-size: 16px;
}

.description-tabs {
    margin-bottom: 40px;
}

.tab-headers {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.tab-btn {
    padding-bottom: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text-light);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Mobile Menu Styles */
.burger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-primary);
    z-index: 101;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--color-white);
    z-index: 999;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-link {
    display: block;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Mobile Filter Styles */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    text-align: left;
    font-weight: 500;
    align-items: center;
    justify-content: space-between;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 10px;
    }

    .nav-menu {
        display: none;
    }

    .header-actions {
        display: none;
        /* Hide desktop actions on mobile if we move them to menu or keep simplified */
    }

    .burger-btn {
        display: block;
    }

    /* Show some header actions on mobile next to burger? */
    .header-actions-mobile {
        display: flex;
        gap: 15px;
        align-items: center;
    }

    /* Category Page Mobile */
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filters {
        display: none;
        /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        overflow-y: auto;
        border-radius: 0;
    }

    .filters.show-mobile {
        display: block;
    }

    .mobile-filter-toggle {
        display: flex;
    }

    .filters-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--color-border);
    }

    /* Product Page Mobile */
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-info-detail h1 {
        font-size: 28px;
    }

    .product-gallery {
        margin-bottom: 20px;
    }

    .add-to-cart-form {
        flex-direction: column;
    }

    .quantity-input {
        width: 100%;
        margin-bottom: 10px;
    }

    .tab-headers {
        overflow-x: auto;
        padding-bottom: 5px;
        white-space: nowrap;
    }
}

/* Collapsible Filter Styles */
.filter-group h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-group h4::after {
    content: '\f078';
    /* FontAwesome chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.filter-group.collapsed h4::after {
    transform: rotate(-90deg);
}

.filter-group.collapsed .filter-list,
.filter-group.collapsed input[type="range"],
.filter-group.collapsed div[style*="display: flex"] {
    display: none !important;
}