@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* {
    margin: 0;
    border: 0;
    transition: 300ms;

    --page-bg: #e9e9e9;
    --main-bg: #fff;
    --card-bg: #eee;
    --accent:  #00CC7C;
}

body {
    width: 100vw;
    background-color: var(--page-bg);
    display: flex;
    align-items: center;
    flex-direction: column;
    padding-top: 25px;
    gap: 25px;
    font-family: 'Inter';
}

header, main {
    width: 90vw;
    background-color: var(--main-bg);
    border-radius: 25px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

main {
    margin-top: 75px;
    min-height: 60vh;
}

section {
    width: calc(100% - 50px);
    height: fit-content;
}

.centered {
    text-align: center;
}

.opaque {
    opacity: 0.6;
}

section {
    padding: 25px;
}

select:focus {
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1); 
}
input:focus {
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1); /
}

/* --- NAVIGATION --- */

header {
    position: fixed;
    top: 25px;
    height: 45px;
    z-index: 100;
}

nav {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
}

    .logo {
        cursor: pointer;
    }


    header.nav-opened {
        background-color: #000;
        height: auto;
        padding-bottom: 100px;
    }

    header.nav-opened .logo {
        filter: invert(100%);
    } 

    header.nav-opened .bar {
        filter: invert(100%);
    } 

    header.nav-opened #bar1 { transform: rotate(-45deg) translateY(10px) translateX(1.5px);}
    header.nav-opened #bar2 { opacity: 0;}
    header.nav-opened #bar3 { transform: rotate(45deg) translateY(-10.5px) translateX(0.5px);}

    header.nav-opened .nav-link-list {
        display: flex;
    }

    header.nav-opened .icon {
        opacity: 0;
    }

.logo {
    margin-top: 7px;
    margin-bottom: 50px;
}

.menu {
    display: flex;
    flex-direction: column;
    height: 15px;
    justify-content: space-between;
    position: absolute;
    right: 25px;
    top: 12.5px;
    cursor: pointer;
}

    .bar {
        height: 2px;
        width: 20px;
        background-color: #000;
    }

.nav-link-list {
    width: calc(100% - 2 * 25px);
    display: none;
    flex-direction: column;
    list-style-type: none;

    font-weight: 500;
    font-size: calc(25px + 1.5vw);
    line-height: 30px;
    letter-spacing: -0.05em;
    color: #fff;
}

    .nav-link {
        padding: 15px 0px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    }

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

    .nav-link a {
        text-decoration: none;
        color: #fff;
    }

    nav .icon {
        position: absolute;
        left: 25px;
        top: 7px;
        border-radius: 8px;
    }

    .nav-link.dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--main-bg);
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        list-style: none;
        padding: 5px 0px 5px 0px;
        margin: 0;
        min-width: 200px;
        z-index: 50;
        overflow: hidden;
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 0;
        transform: translateY(10px);
    }
    
    .nav-link.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .dropdown-menu li a {
        padding: 12px 20px;
        display: block;
        color: #333;
        font-weight: 500;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
        font-size: calc(13px + 1.5vw);
        box-sizing: border-box;
        padding-left: 20px;
    }

    .dropdown-menu.categories-dropdown li:nth-child(1) a {
        padding-left: 10px;
    }
    
    .dropdown-menu li a:hover {
        background-color: var(--accent);
        color: #fff;
    }
    
    /* Optional: add a subtle separator line between items */
    .dropdown-menu li + li {
        border-top: 1px solid #eee;
    }

/* --- HERO SECTION --- */

.hero-section {
    display: flex;
    flex-direction: column;
}

.hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 25px;
    display: block;
    object-fit: cover;
}

.hero-img-container {
    position: relative;
    height: calc(90vw - 50px);
    min-height: fit-content;
    border-radius: 25px;
    overflow: hidden;
    width: calc(90vw - 50px);
}

/* keep your previews as is */
.preview-container {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 15px;
    display: flex;
    gap: 10px;
}

.preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Updated duration bar for animation */
.duration-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--accent);
    width: 0%; /* start at 0% and animate via JS */
    transition: width linear;
    border-radius: 0 25px 25px 0; /* soften edge */
}

.hero-title {
    font-weight: 500;
    font-size: calc(42px + 1.5vw) ;
    line-height: 85%;
    letter-spacing: -0.05em;
    margin-top: 15px;
}

.subtitle {
    font-weight: 300;
    font-size: calc(12px + 0.3vw);
    line-height: 1.2;
    margin-top: 10px;
    max-width: 70vw;
}

.main-cta {
    padding: 10px 0px;
    text-align: center;
    width: 100%;
    color: white;
    font-size: calc(16px + 0.3vw) ;
    text-decoration: none;
    background: var(--accent);
    border-radius: 25px;
    display: block;
    margin-top: 20px;
    border: 2px solid var(--accent);
}

.main-cta:hover {
    background: white;
    border: 2px solid var(--accent);
    color: var(--accent)
}

/* --- POPULAR PRODUCTS SECTION --- */

.popular-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popular-title {
    font-weight: 500;
    font-size: calc(25px + 1.5vw) ;
    letter-spacing: -0.05em;
    text-align: center;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .product-card {
    background: var(--card-bg, #f5f5f5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform .15s ease, box-shadow .15s ease;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  }
  
  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  }
  
  .product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    padding: 12px;
  }
  
  .product-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
    margin-top: 5px;
  }
  
  .product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    min-height: 40px;
    margin: 10px 0px;
  }
  
  .product-price {
    font-size: 15px;
    font-weight: 700;
    color: #000;
  }
  
  .product-shipping, .product-extra {
    font-size: 12px;
    color: #666;
    margin: 5px 0px;
  }
  

/* --- FOOTER --- */

footer {
    background-color: #000;
    color: white;
    min-height: 30vh;
    width: 90vw;
    border-radius: 25px;
    padding: 25px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    flex-direction: column;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.footer-logo {
    filter: invert(100%)
}

.footer-nav {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    padding: 0px;
    font-weight: 500;
    font-size: calc(25px + 3vw);
    line-height: 30px;
    letter-spacing: -0.03em;
    color: #fff;
    margin-top: 50px;
}

    .footer-nav .nav-link {
        font-size: calc(20px + 1.5vw);
        border-bottom: none;
        text-align: right;
        padding: 5px 0px;
    }

.copyright {
    font-size: calc(10px + 0.3vw);
    text-align: center;
    opacity: 0.4;
    margin-top: 25px;
}

/* OTHER PAGES */

.page-title {  
    font-weight: 500;
    font-size: calc(36px + 1.5vw);
    line-height: 85%;
    text-align: center;
    letter-spacing: -0.05em;
    margin-top: 50px;
}