/* --- General Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* --- Announcement Bar --- */
.announcement-bar {
    background-color: #443b3f;
    color: white;
    text-align: center;
    padding: 8px 16px;
    font-size: 14px;
}

/* --- Header & Navigation --- */
header {
    background-color: white;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

nav a {
    color: #111;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 10px 0;
    display: inline-block;
}

nav a:hover {
    color: #666;
}

/* --- Dropdown Logic --- */
.dropdown {
    position: relative;
    display: inline-block;
}

nav > .dropdown > .menu-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #111;
    font-weight: 500;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    padding: 8px 0;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    top: 100%;
}

.dropdown-content a,
.dropdown-content .menu-label {
    color: black;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    width: 100%;
    white-space: nowrap;
}

.dropdown-content a:hover,
.sub-dropdown:hover > .menu-label {
    background-color: #f5f5f5;
}

.dropdown:hover > .dropdown-content {
    display: block;
}

/* --- Sub-Dropdowns --- */
.sub-dropdown {
    position: relative;
}

.sub-dropdown-content {
    display: none;
    position: absolute;
    left: 100%;
    top: -8px;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border: 1px solid #e5e5e5;
    z-index: 2;
}

.sub-dropdown:hover .sub-dropdown-content {
    display: block;
}

/* --- Icons / Arrows --- */
.arrow-down, .arrow-right {
    font-size: 12px;
    margin-left: 8px;
    display: inline-block;
}

.arrow-right {
    float: right;
    margin-top: 4px;
}

/* --- Hero Section --- */
.hero, .collection {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero { background-image: url('../images/103539.png?q=80&w=2000&auto=format&fit=crop'); }
.collection { background-image: url('../images/Collections.png?q=80&w=2000&auto=format&fit=crop'); }

.hero::before, .collection::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-content, .collection-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 0 16px;
}

.hero h2, .collection h2 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p, .collection p {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: bold;
    margin-bottom: 32px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background-color: transparent;
    color: white;
    border: 2px solid #14b8a6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: rgba(20, 184, 166, 0.1);
}

/* --- Container & Grids --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

section {
    padding: 64px 0;
}

h2.section-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: #111;
    margin-bottom: 48px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Updated: Product card behaves as a link */
a.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e5e5;
}

a.product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: #f9fafb;
    padding: 16px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 16px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    margin-bottom: 8px;
    min-height: 40px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price {
    font-size: 14px;
    font-weight: 500;
    color: #111;
}

/* --- Footer & Social --- */
.follow-section {
    text-align: center;
    padding: 64px 0;
}

/* Gray Follow Button */
.btn-follow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 32px;
    background-color: #f0f2f5;
    color: #1c1e21;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-follow:hover {
    background-color: #e4e6eb;
}

.btn-follow:active {
    transform: scale(0.98);
}

/* Sizing for the Facebook logo image */
.btn-follow img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

footer {
    background-color: white;
    border-top: 1px solid #e5e5e5;
    margin-top: 64px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 16px;
    text-align: center;
}

.footer-text {
    margin-bottom: 8px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

/* --- Responsive Layout --- */
/* --- Desktop: Hide the Hamburger --- */
.menu-toggle {
    display: none; /* Hidden by default on large screens */
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #111;
}

/* Hide close icon by default */
.icon-close {
    display: none;
}

/* --- Mobile: Automatic Switch --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        z-index: 1001; /* Ensure button stays above the menu */
    }

/* When the nav has the 'mobile-open' class, swap the icons */
    nav.mobile-open + .menu-toggle .icon-open {
        display: none;
    }
    nav.mobile-open + .menu-toggle .icon-close {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        border-bottom: 1px solid #e5e5e5;
        z-index: 1000;
    }

    nav.mobile-open, nav.is-active {
        display: flex;
    }

    .dropdown-content, .sub-dropdown-content {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
    }

    .dropdown.is-open > .dropdown-content,
    .sub-dropdown.is-open > .sub-dropdown-content {
        display: block;
    }
    
    .arrow-right {
        transform: rotate(90deg);
    }

    .sub-dropdown-content {
        max-height: 300px;
        overflow-y: auto;
        background-color: #f9f9f9;
        border-left: 2px solid #14b8a6;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .sub-dropdown-content a {
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }

    /* Sets mobile to 2 columns */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
} /* This correctly closes the media query */

/* --- Pagination Styles (Outside the media query for centering) --- */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 48px 0;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    text-decoration: none;
    color: #111;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    background-color: white;
}

.pagination-link.active {
    background-color: #f0f2f5;
    border-color: #ddd;
    font-weight: 600;
}

.pagination-link.disabled {
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Thumbnail Styles --- */
.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.thumbnail.active {
    border-color: #14b8a6;
}

.search-form { display: flex; align-items: center; margin: 0 15px; }
.search-form input { padding: 5px 10px; border: 1px solid #ccc; border-radius: 4px 0 0 4px; }
.search-form button { padding: 5px 10px; background: #A31E22; color: white; border: none; border-radius: 0 4px 4px 0; cursor: pointer; }
