html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #111;
    --secondary-color: #f4f4f4;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #fff;
    color: var(--text-color);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-decoration: none;
    margin: 5px;
}

.logo2 {
    font-size: 18px;
    font-weight: 100;
}

.nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.nav-links a {
    margin: 5px 5px !important;
    text-decoration: none !important;
    color: #333 !important;
    font-weight: 400 !important;
    font-size: 75%;
    padding-bottom: 6px !important;
    border-bottom: 2px solid transparent !important;
    /* Forces baseline tracking */
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.nav-links a.active {
    font-weight: 600 !important;
    color: #111 !important;
    border-bottom: 2px solid #111 !important;
    /* Sharp, high-contrast underline */
}

.hero {
    height: 40vh;
    background: url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?ixlib=rb-1.2.1&w=1920&q=80') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.products {
    padding: 50px 5%;
}

.products h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.category-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 50px auto;
    gap: 30px;
    padding: 0 20px;
    justify-content: center;
}

.category-card {
    max-width: 280px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.category-image {
    width: 280px;
    height: 350px;
    object-fit: cover;
}

.category-title {
    padding: 20px;
    font-size: 1.2rem;
    background: #fff;
    margin: 0;
}

/*Size Guide Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.close-modal-btn:hover {
    color: #000;
}

#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    font-weight: 500;
}

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

footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

footer>p {
    font-size: 75%;
}

footer>p>a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #fff;
    padding: 2px;
}

@media (max-width: 767px) {

    /* 1. Hamburger Container Box */
    .hamburger-container {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        /* Must sit above the slide-out overlay menu */
        position: relative;
        margin-left: 10%;
    }

    /* Individual Menu Lines */
    .hamburger-line {
        width: 100%;
        height: 2px;
        background-color: #333;
        border-radius: 2px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            background-color 0.3s ease;
        /* Smooth transition when changing line colors */
        transform-origin: left center;
        /* Essential for exact X alignment */
    }

    /* 2. Hamburger Transform Key Animations ("X" morphing) */
    .hamburger-container.menu-active .hamburger-line {
        background-color: #ffffff;
        /* Turns lines white when dark menu slides out */
    }

    .hamburger-container.menu-active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(1px, -1px);
    }

    .hamburger-container.menu-active .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
        /* Clean fade-out collapse for middle line */
    }

    .hamburger-container.menu-active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(1px, 1px);
    }

    /* 3. Slide-In Right Menu Panel Configuration (Glassmorphism Fix) */
    #navbar.nav-links {
        display: flex !important;
        /* Keep active for transition processing engines */
        flex-direction: column !important;
        position: fixed;
        /* Lock layer positioning relative to viewport window */
        top: 0;
        right: 0;
        width: 280px;
        /* Clean sidebar menu panel width footprint */
        height: 100vh;
        /* Full viewport height container overlay */

        /* Premium aesthetic: Semi-transparent deep obsidian tint */
        background-color: rgba(24, 24, 27, 0.85);

        /* Native Hardware Blurred Backdrop Filter */
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        /* Safari Support */

        /* Soft, diffuse shadow depth outward from panel edge */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        /* Fine divider line */

        padding: 90px 0 20px 0;
        /* Extra top-padding so links sit beneath button layer */
        z-index: 1000;

        /* Hide menu completely off screen to the right side */
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Target state when menu is active: Slides menu out to x position 0 */
    #navbar.nav-links.mobile-open {
        transform: translateX(0);
    }

    /* Stack layout design formatting adjustments for vertical panels */
    #navbar.nav-links a {
        display: block !important;
        width: 100%;
        padding: 16px 30px !important;
        margin: 0 !important;
        border-bottom: none !important;
        font-size: 95% !important;

        /* Soft off-white for structural typography against the dark base */
        color: rgba(255, 255, 255, 0.7) !important;
        font-weight: 400 !important;
        letter-spacing: 0.5px;
        transition: all 0.2s ease !important;
    }

    /* Subtle hover slide-right nudge */
    #navbar.nav-links a:hover {
        color: #ffffff !important;
        padding-left: 35px !important;
        background-color: rgba(255, 255, 255, 0.03);
    }

    /* Active ScrollSpy navigation line style adjustments */
    #navbar.nav-links a.active {
        background-color: rgba(255, 255, 255, 0.08);
        color: #ffffff !important;
        font-weight: 600 !important;
        border-bottom: none !important;
        /* Cleans up horizontal desktop tracking rule */
        border-left: 4px solid #ffffff !important;
        /* Premium vertical sidebar accent rule */
        padding-left: 26px !important;
        /* Aligns text offset nicely with the left-border */
    }
}