@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════
   RESET & VARIABLES
═══════════════════════════════════════ */
:root {
    --nav-h: 60px;
    --light: #f8f9fa;
    --border: #eeeeee;
    --muted: #666;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #fff;
    color: #000;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 500;
    border-bottom: 1px solid var(--border);
}
.logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -1px; }
.nav-links {
    display: flex;
    gap: 28px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1px;
}
.nav-links a { color: #888; }
.nav-links a:hover { color: #000; }
.nav-icons {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.25rem;
}
.nav-icons i { cursor: pointer; }
.cart-icon-wrap { position: relative; display: flex; align-items: center; cursor: pointer; }
.cart-badge {
    position: absolute;
    top: -8px; right: -8px;
    background: #000; color: #fff;
    font-size: 9px; font-weight: 800;
    width: 17px; height: 17px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn { display: none !important; }

/* ═══════════════════════════════════════
   MOBILE NAV DRAWER
   Always hidden until .open is added by JS
═══════════════════════════════════════ */
.mobile-nav-overlay {
    display: none;          /* JS sets display:block when open */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1600;
}
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: -300px;           /* hidden off-screen */
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1700;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.mobile-nav-drawer.open { left: 0; }
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.mobile-nav-header i { font-size: 1.4rem; cursor: pointer; }
.mobile-nav-links { display: flex; flex-direction: column; padding: 8px 0; }
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    border-bottom: 1px solid #f5f5f5;
}
.mobile-nav-links a i { color: #999; font-size: 1.1rem; }
.mobile-nav-divider { height: 8px; background: #f8f8f8; }

/* ═══════════════════════════════════════
   SEARCH OVERLAY
   Hidden by default — shown by JS adding .show
═══════════════════════════════════════ */
.search-overlay {
    display: none;          /* hidden until JS adds .show */
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    padding: 90px 5% 0;
}
.search-overlay.show { display: flex; }
.search-box { position: relative; width: min(580px, 100%); }
.search-box input {
    width: 100%;
    padding: 15px 80px 15px 16px;
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 600;
    border: 2px solid #000;
    border-radius: 6px;
    outline: none;
}
.search-go, .search-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    cursor: pointer;
    color: #555;
}
.search-go { right: 44px; }
.search-close { right: 12px; }
.search-results {
    width: min(580px, 100%);
    margin-top: 6px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    max-height: 55vh;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}
.search-result-item:active { background: #f5f5f5; }
.search-no-result { padding: 20px; text-align: center; color: #888; font-size: 14px; }

/* ═══════════════════════════════════════
   PROFILE DROPDOWN
   Hidden by default — shown by JS adding .show
═══════════════════════════════════════ */
.profile-dropdown {
    display: none;          /* hidden until JS adds .show */
    position: fixed;
    top: calc(var(--nav-h) + 4px);
    right: 5%;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    width: 210px;
    z-index: 1500;
}
.profile-dropdown.show { display: block; }
.profile-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    text-decoration: none;
}
.profile-item:active { background: #f5f5f5; }
.profile-divider { height: 1px; background: #eee; }

/* ═══════════════════════════════════════
   CART DRAWER
   Hidden by default — shown by JS adding .open
═══════════════════════════════════════ */
.cart-overlay {
    display: none;          /* hidden until .show added by JS */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1800;
}
.cart-overlay.show { display: block; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: -110%;           /* hidden off-screen */
    width: 380px;
    height: 100%;
    background: #fff;
    z-index: 1900;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.cart-drawer.open { right: 0; }
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.cart-header i { cursor: pointer; font-size: 1.3rem; color: #555; }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aaa;
    text-align: center;
    gap: 12px;
    font-size: 14px;
}
.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: 13px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price { font-size: 12px; color: #888; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cart-item-qty button {
    width: 28px; height: 28px;
    border: 1px solid #ddd; background: #fff;
    border-radius: 4px; cursor: pointer;
    font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    touch-action: manipulation;
}
.cart-item-qty span { font-weight: 700; font-size: 14px; min-width: 22px; text-align: center; }
.cart-item-sub { font-weight: 800; font-size: 13px; min-width: 52px; text-align: right; flex-shrink: 0; }
.cart-remove { font-size: 1.1rem; color: #ccc; cursor: pointer; flex-shrink: 0; }
.cart-footer { padding: 16px 20px; border-top: 1px solid #eee; flex-shrink: 0; }
.cart-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 15px; margin-bottom: 14px; }

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 60px 10%;
    background: var(--light);
}
.hero-content h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
}
.hero-content p {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 30px;
    max-width: 480px;
    line-height: 1.65;
}
.btn-shop {
    display: inline-block;
    padding: 15px 38px;
    background: #000; color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 1.5px;
    border: 2px solid #000;
    cursor: pointer;
    touch-action: manipulation;
}
.btn-shop:active { opacity: 0.8; }

/* ═══════════════════════════════════════
   PRODUCTS SECTION
═══════════════════════════════════════ */
.section { padding: 70px 5%; }
.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 36px;
    text-align: center;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}
.product-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
/* Image box — always on top */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-initial { font-size: 2.5rem; font-weight: 800; color: #ccc; }
/* Text body — always below image */
.product-card-body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.product-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
    line-height: 1.3;
}
.product-card .price {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 12px;
    margin-top: auto;
}
.btn-add-cart {
    width: 100%;
    padding: 10px 0;
    background: #fff; color: #000;
    border: 2px solid #000;
    font-family: inherit;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    touch-action: manipulation;
}
.btn-add-cart:active { background: #000; color: #fff; }

/* ═══════════════════════════════════════
   NEWSLETTER
═══════════════════════════════════════ */
.newsletter-section {
    background: #000; color: #fff;
    padding: 80px 5%;
    text-align: center;
}
.newsletter-title { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; margin-bottom: 12px; }
.newsletter-sub { color: #666; margin-bottom: 28px; font-size: 0.95rem; }
.newsletter-form { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.newsletter-input {
    padding: 14px 16px;
    width: min(300px, 100%);
    border: none;
    font-family: inherit;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
}
.newsletter-btn {
    padding: 14px 26px;
    background: #fff; border: none;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    touch-action: manipulation;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer { padding: 60px 5%; background: #000; color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 36px;
}
.footer-col h4 { margin-bottom: 16px; font-size: 0.85rem; letter-spacing: 1px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; color: #777; font-size: 0.85rem; cursor: pointer; }
.footer-bottom {
    border-top: 1px solid #222;
    margin-top: 48px;
    padding-top: 22px;
    text-align: center;
    color: #555;
    font-size: 0.75rem;
}

/* ═══════════════════════════════════════
   TABLET  ≤ 1024px
═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .nav-links { gap: 22px; font-size: 0.75rem; }
    .hero { padding: 50px 7%; }
    .section { padding: 60px 6%; }
}

/* ═══════════════════════════════════════
   MOBILE  ≤ 768px
═══════════════════════════════════════ */
@media (max-width: 768px) {
    :root { --nav-h: 56px; }

    /* --- Navbar --- */
    .navbar { padding: 0 4%; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex !important; cursor: pointer; }
    .nav-icons { gap: 16px; font-size: 1.2rem; }
    .logo { font-size: 1.1rem; }

    /* --- Profile dropdown full width --- */
    .profile-dropdown { right: 4%; width: calc(100% - 8%); max-width: 300px; }

    /* --- Cart full width --- */
    .cart-drawer { width: 100%; right: -110%; }

    /* --- Hero --- */
    .hero {
        min-height: 65vh;
        padding: 48px 5% 56px;
        align-items: flex-start;
    }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p  { font-size: 0.88rem; max-width: 100%; margin-bottom: 24px; }
    .btn-shop        { width: 100%; text-align: center; padding: 15px; font-size: 0.88rem; display: block; }

    /* --- Products: 2-column grid --- */
    .section { padding: 36px 4%; }
    .section-title { font-size: 1.3rem; margin-bottom: 20px; }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-image { aspect-ratio: 1 / 1; }
    .product-card-body { padding: 10px 10px 12px; }
    .product-card h3  { font-size: 0.8rem; }
    .product-card .price { font-size: 0.88rem; margin-bottom: 8px; }
    .btn-add-cart { font-size: 10px; padding: 9px 4px; gap: 4px; }

    /* --- Newsletter --- */
    .newsletter-section { padding: 56px 5%; }
    .newsletter-form { flex-direction: column; align-items: center; }
    .newsletter-input, .newsletter-btn { width: 100%; max-width: 340px; }

    /* --- Footer --- */
    footer { padding: 48px 5%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ═══════════════════════════════════════
   SMALL PHONES  ≤ 400px
═══════════════════════════════════════ */
@media (max-width: 400px) {
    .logo { font-size: 1rem; letter-spacing: -0.5px; }
    .hero { padding: 38px 4% 48px; min-height: 55vh; }
    .hero-content h1 { font-size: 1.9rem; }
    .product-grid { gap: 8px; }
    .product-card-body { padding: 8px 8px 10px; }
    .product-card h3 { font-size: 0.75rem; }
    .product-card .price { font-size: 0.82rem; }
    .btn-add-cart { font-size: 9px; letter-spacing: 0.5px; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
