/* Global Styles & Tokens */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --h: 220;
    --s: 10%;
    --bg-primary: hsl(var(--h), var(--s), 98%);
    --bg-secondary: hsl(var(--h), var(--s), 95%);
    --text-primary: hsl(var(--h), var(--s), 10%);
    --text-secondary: hsl(var(--h), var(--s), 40%);
    --accent: #000000;
    --accent-soft: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 60px;
    --header-height: 56px;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --saT: env(safe-area-inset-top);
    --saB: env(safe-area-inset-bottom);
    --saL: env(safe-area-inset-left);
    --saR: env(safe-area-inset-right);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--saB);
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.app-container {
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background-color: white;
    overflow-x: hidden;
}

@media (min-width: 600px) {
    .app-container {
        max-width: 600px;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 1200px;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.96);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-height) + var(--saT));
    padding-top: var(--saT);
    z-index: 1000;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-links {
    display: none;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        gap: 24px;
    }

    .nav-links a {
        text-decoration: none;
        color: var(--text-secondary);
        font-weight: 500;
    }
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Hero */
.hero {
    padding: calc(var(--header-height) + var(--spacing-lg) + var(--saT)) 20px 60px;
    background: radial-gradient(circle at 50% 0%, #fff, #f4f4f4);
    text-align: center;
}

.flash-sale-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #000;
    color: white;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 24px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.1;
    color: var(--text-primary);
    max-width: 100%;
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.5;
}

.hero-cta {
    background-color: var(--accent);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
}

/* Video Section */
.video-section {
    padding: 0 16px;
    margin-top: -30px;
    position: relative;
    z-index: 1;
}

.video-container {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-md);
    background: black;
}

.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Category Bar */
.category-bar {
    padding: 30px 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    padding-left: 16px;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.pills-container {
    display: inline-flex;
    gap: 10px;
    padding-right: 16px;
}

.category-pill {
    padding: 10px 20px;
    border-radius: 50px;
    background-color: #f5f5f5;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.category-pill.active {
    background-color: black;
    color: white;
}

/* Product Section */
.product-section {
    padding: 10px 16px 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Product Card */
.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #f0f0f0;
}

.product-img-wrap {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f8f8f8;
    overflow: hidden;
    position: relative;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: white;
    color: black;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.product-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
}

.quick-add {
    width: 32px;
    height: 32px;
    background-color: black;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* MINIMAL FOOTER */
footer {
    background-color: black;
    color: white;
    padding: 40px 20px calc(40px + var(--saB));
    margin-top: 60px;
}

.footer-minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .footer-minimal {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }
}

.footer-left {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.footer-sub {
    font-size: 0.7rem;
    font-weight: 700;
    color: #666;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-right a {
    color: white;
    text-decoration: none;
    font-style: normal;
    font-size: 1rem;
}

.footer-right .icon {
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Cart Drawer */
.cart-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: none;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-overlay.open {
    display: flex;
    opacity: 1;
}

.cart-drawer {
    width: 100%;
    max-width: 100%;
    background-color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

@media (min-width: 480px) {
    .cart-drawer {
        max-width: 450px;
    }
}

.cart-overlay.open .cart-drawer {
    transform: translateX(0);
}

.cart-header {
    padding: 20px 24px;
    padding-top: max(20px, var(--saT));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background: white;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.shipping-progress-wrap {
    padding: 16px 24px;
    background-color: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.shipping-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-align: center;
    color: #444;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #10b981;
    transition: width 0.6s ease;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f9f9f9;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 90px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    background: #f4f4f4;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 4px;
}

.cart-item-price {
    color: #666;
    font-size: 0.95rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 8px;
    width: fit-content;
}

.quantity-controls button {
    font-size: 1.2rem;
    line-height: 1;
    color: #333;
    padding: 0 4px;
}

.quantity-controls span {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.cart-footer {
    padding: 24px;
    padding-bottom: max(24px, var(--saB));
    border-top: 1px solid #f0f0f0;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.02);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}

.cart-summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: black;
    margin-top: 16px;
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px dashed #ddd;
}

.checkout-btn {
    width: 100%;
    background-color: black;
    color: white;
    padding: 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cart-note {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 16px;
}

/* Modal Styles maintained... */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 900px) {
    .modal-overlay {
        align-items: center;
    }
}

.modal-overlay.open {
    display: flex;
}

.modal-panel {
    background: white;
    width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .modal-panel {
        width: 90%;
        max-width: 1100px;
        border-radius: 20px;
        height: 90vh;
        max-height: 800px;
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 0;
        animation: fadeIn 0.3s;
        overflow: hidden;
    }
}

.close-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 100;
}

.modal-gallery {
    background-color: #f8f8f8;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

@media (min-width: 900px) {
    .modal-gallery {
        padding: 40px;
    }
}

.gallery-main-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
}

.gallery-thumb.active {
    border-color: black;
    opacity: 1;
}

.modal-info {
    padding: 30px 20px 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    background: white;
}

@media (min-width: 900px) {
    .modal-info {
        padding: 40px;
    }
}

.breadcrumb {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}

.product-badge {
    background-color: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
}

.modal-title {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
    font-family: var(--font-display);
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #fbbf24;
}

.modal-price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.modal-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
}

.modal-old-price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.2rem;
}

.option-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.size-selector {
    display: flex;
    gap: 12px;
}

.size-pill {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
}

.size-pill.active {
    background: black;
    color: white;
    border-color: black;
}

.action-row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.quantity-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 30px;
    height: 50px;
}

.quantity-stepper button {
    width: 40px;
    height: 100%;
    font-size: 1.2rem;
}

.quantity-stepper span {
    width: 30px;
    text-align: center;
    font-weight: 600;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    height: 50px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-cart {
    background: #111827;
    color: white;
}

.btn-buy-now {
    background: #d4a017;
    color: white;
}

.tabs-header {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid #eee;
    margin-top: 30px;
}

.tab-btn {
    padding: 10px 0;
    font-weight: 600;
    color: #888;
    position: relative;
    cursor: pointer;
}

.tab-btn.active {
    color: black;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: black;
}

.tab-content {
    padding: 20px 0;
    display: none;
}

.tab-content.active {
    display: block;
}

.review-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.big-rating {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f9f9f9;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
}