/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 72px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #0f172a;
    white-space: nowrap;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid transparent;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.menu-toggle:hover {
    background: #f4f4f5;
    border-color: #e5e7eb;
}

.menu-toggle .icon {
    width: 22px;
    height: 22px;
    stroke: #1f2937;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Show hamburger icon by default, hide close icon */
.menu-toggle .close-icon {
    display: none;
}

.menu-toggle .hamburger-icon {
    display: block;
}

/* When menu is open, show close icon and hide hamburger */
.menu-toggle[aria-expanded="true"] .close-icon {
    display: block;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon {
    display: none;
}

.nav-menu {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
    padding: 10px 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #000;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: #000;
}

.nav-menu a.active {
    color: #000;
    font-weight: 600;
}

.nav-menu li.has-dropdown {
    position: relative;
}

.nav-menu .dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    display: none;
}

.nav-menu .dropdown li {
    padding: 0;
    list-style: none;
}

.nav-menu .dropdown a {
    display: block;
    padding: 10px 14px;
    white-space: nowrap;
}

.nav-menu .dropdown a:hover {
    background: #f6f6f6;
}

@media (hover:hover) {
    .nav-menu li.has-dropdown:hover>.dropdown {
        display: block;
    }
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: 1px solid transparent;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: #f4f4f5;
    border-color: #e5e7eb;
}

.cart-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #000;
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 6px;
    transform: translate(50%, -50%);
}

.cart-count[data-empty="true"] {
    background: #e5e7eb;
    color: #475569;
}

.cart-icon {
    position: relative;
}

.cart-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
    padding: 16px;
    display: none;
    flex-direction: column;
    z-index: 1200;
}

.cart-dropdown.open {
    display: flex;
}

.cart-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
}

.cart-dropdown__close {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    color: #9ca3af;
}

.cart-dropdown__body {
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cart-dropdown__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cart-dropdown__item:last-child {
    border-bottom: none;
}

.cart-dropdown__thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-dropdown__info {
    flex: 1;
}

.cart-dropdown__name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.cart-dropdown__meta {
    font-size: 13px;
    color: #6b7280;
}

.cart-dropdown__remove {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
}

.cart-dropdown__empty {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    padding: 20px 0;
}

.cart-dropdown__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-dropdown__total {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.cart-dropdown__checkout {
    border: none;
    background: #111827;
    color: #fff;
    border-radius: 999px;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.cart-dropdown__checkout:hover {
    opacity: 0.9;
}

.cart-dropdown__view {
    text-align: center;
    border-radius: 999px;
    padding: 10px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none !important;
    }

    .menu-overlay {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (max-width: 1023px) {
    .navbar {
        gap: 12px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        right: 0;
        top: 72px;
        flex-direction: column;
        background: #fff;
        padding: 16px 20px 24px;
        gap: 6px;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
        z-index: 1100;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        /* Animation properties */
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }


    .nav-menu a {
        width: 100%;
        padding: 12px 12px;
        border-radius: 10px;
    }

    .nav-menu li.has-dropdown>.dropdown {
        position: static;
        border: 0;
        box-shadow: none;
        padding: 6px 0 0;
        display: none;
    }

    .nav-menu li.has-dropdown.open>.dropdown {
        display: block;
    }

    .nav-menu .dropdown a {
        padding-left: 20px;
        font-weight: 500;
    }

    .nav-icons {
        gap: 8px;
    }

    .cart-dropdown {
        position: fixed;
        top: 76px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }

    .cart-dropdown__body {
        max-height: calc(100vh - 280px);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1558769132-cb1aea3c8240?w=1200') center/cover;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1.2s ease;
}

.btn-primary {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeInUp 1.4s ease;
}

.btn-primary:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Collection Section */
.collection {
    padding: 80px 0;
    background: #f8f8f8;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 2px solid #ddd;
    padding: 10px 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-quick-view {
    background: #fff;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-quick-view:hover {
    background: #000;
    color: #fff;
}

.badge-new,
.badge-sale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #000;
    color: #fff;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.badge-sale {
    background: #e74c3c;
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

.old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.btn-add-cart {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background: #333;
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 80px 0;
    background: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #666;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 20px;
}

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

.footer-col h3,
.footer-col h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col p {
    color: #aaa;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fff;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
}

.newsletter-form button {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #ddd;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

/* style for buttion */
.filter-tabs a.filter-btn {
    text-decoration: none;
    color: #333;
    display: inline-block;
    /* importan for padding */
}

/* style when hover */
.filter-tabs a.filter-btn:hover,
.filter-tabs a.filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}