/* ========================================================
   TIENDA.CSS — Mobile-first Catalog / Store Frontend
   Modern App-like Experience with Premium Animations
   v2.0 — Modernized Design System
   ======================================================== */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
    /* Brand Colors */
    --primary: #6d5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5b4cc4;
    --primary-bg: #f0edff;
    --secondary: #f5a623;
    --secondary-dark: #e09516;
    --accent-green: #00c9a7;
    --accent-red: #ff6b6b;
    --accent-orange: #ff9f43;

    /* Surfaces */
    --bg: #ffffff;
    --bg-screen: #f7f7fb;
    --bg-card: #ffffff;
    --bg-input: #f3f4f6;
    --border: #e5e7eb;
    --border-focus: var(--primary);

    /* Typography Colors */
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-on-primary: #ffffff;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* Ambient Shadows (softer, longer, more premium) */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-primary: 0 8px 28px rgba(109,92,231,0.28);
    --shadow-secondary: 0 8px 28px rgba(245,166,35,0.28);

    /* Typography — Modern: Outfit */
    --font: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Layout */
    --bottom-nav-h: 68px;
    --header-h: 60px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* Transitions */
    --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: 20px;

    /* Touch targets (WCAG) */
    --touch-min: 44px;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font);
    background: var(--bg-screen);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100dvh;
    width: 100%;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
    font-family: inherit;
    font-size: 0.9375rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 92, 231, 0.12);
}

input::placeholder {
    color: var(--text-muted);
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- App Shell ---- */
.app-shell {
    position: relative;
    width: 100%;
    height: 100dvh;
    max-height: 100vh;
    background: var(--bg-screen);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.05); /* Softer shadow */
    scrollbar-width: none;
    /* Added flex structure for desktop centering */
    display: flex;
    flex-direction: column;
}

.app-shell::-webkit-scrollbar {
    display: none;
}

/* Remove old mobile-emulator forced width */
/* @media (min-width: 481px) { ... } */

/* ---- Views ---- */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-screen);
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.4s var(--transition-ease), opacity 0.3s ease;
    z-index: 1;
    will-change: transform, opacity;
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 2;
}

.view.slide-out-left {
    transform: translateX(-30%);
    opacity: 0.5;
}

.view.slide-in-left {
    transform: translateX(-100%);
}

/* ---- View Headers ---- */
.view-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    min-height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.view-header--home {
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: none;
}

.view-header--inner h1 {
    flex: 1;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
}

.header-spacer {
    width: 40px;
}

/* ---- Back Button ---- */
.btn-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    color: var(--text);
    transition: background 0.2s, transform 0.15s;
}

.btn-back:active {
    transform: scale(0.9);
    background: var(--bg-input);
}

/* ---- View Body ---- */
.view-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Desktop constraint inside the shell */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.view-body--padded {
    padding: 16px;
}

.view-body--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Scrollbar styles for desktop */
.view-body::-webkit-scrollbar {
    width: 6px;
}
.view-body::-webkit-scrollbar-track {
    background: transparent;
}
.view-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
.view-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
.view-body {
    /* scrollbar-width: none; removed to allow scrolling on Firefox Desktop */
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* ---- Search Pill (Home) ---- */
.search-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-input);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.search-pill i {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.search-pill span {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.search-pill:active {
    transform: scale(0.98);
    background: var(--border);
}

/* ---- Hero Carousel ---- */
.hero-carousel {
    padding: 12px 16px;
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    min-width: calc(100% - 16px);
    height: 150px;
    border-radius: var(--radius-lg);
    scroll-snap-align: start;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 60%);
}

.slide-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

.slide-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.slide-content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.slide-content p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s var(--transition-spring);
}

.carousel-dots .dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary);
}

/* ---- Sections ---- */
.section {
    padding: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h3 {
    font-size: 1.0625rem;
    font-weight: 700;
}

.section-link {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ---- Categories Scroll ---- */
.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s var(--transition-ease);
    flex-shrink: 0;
}

.category-chip i {
    font-size: 1rem;
}

.category-chip.active {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

.category-chip:active {
    transform: scale(0.95);
}

/* ---- Products Grid ---- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.5s var(--transition-ease) both;
}

.product-card:nth-child(1) { animation-delay: 0.0s; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }

.product-card:active {
    transform: scale(0.97);
}

.product-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-input);
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:active .product-img-wrap img {
    transform: scale(1.05);
}

.btn-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.25s;
    z-index: 2;
}

.btn-fav.active {
    color: var(--accent-red);
    background: rgba(255, 107, 107, 0.15);
}

.btn-fav:active {
    transform: scale(1.2);
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    background: var(--accent-red);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    z-index: 2;
}

.product-badge--new {
    background: var(--accent-green);
}

.product-info {
    padding: 10px;
    position: relative;
}

.product-name {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.product-price-old {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-add-cart {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-primary);
    transition: transform 0.2s var(--transition-spring), background 0.2s;
}

.btn-add-cart:active {
    transform: scale(0.85);
    background: var(--primary-dark);
}

@keyframes addCartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.btn-add-cart.pop {
    animation: addCartPop 0.35s var(--transition-spring);
}

/* ---- Bottom Spacer ---- */
.bottom-spacer {
    height: calc(var(--bottom-nav-h) + 40px + var(--safe-bottom));
}

.bottom-spacer-lg {
    height: calc(var(--bottom-nav-h) + 140px + var(--safe-bottom));
}

/* ================================================
   SEARCH VIEW
   ================================================ */
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    border: 1.5px solid transparent;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 20px;
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    background: var(--bg);
}

.search-input-wrap i {
    font-size: 1.2rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input-wrap input {
    border: none;
    padding: 0;
    background: transparent;
    flex: 1;
    font-size: 0.9375rem;
}

.search-input-wrap input:focus {
    box-shadow: none;
}

.search-clear-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-section {
    margin-bottom: 24px;
    animation: fadeInUp 0.4s var(--transition-ease) both;
}

.search-section:nth-child(2) { animation-delay: 0.1s; }
.search-section:nth-child(3) { animation-delay: 0.2s; }

.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.search-section h4 {
    font-size: 0.9375rem;
    font-weight: 700;
}

.text-btn {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.2s;
}

.text-btn:active {
    color: var(--primary);
}

.recent-list {
    list-style: none;
}

.recent-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.recent-list li:last-child {
    border-bottom: none;
}

.recent-list li:active {
    color: var(--primary);
}

.recent-list li i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tag:active {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(0.95);
}

.suggestion-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.suggestion-cards::-webkit-scrollbar {
    display: none;
}

.suggestion-card {
    min-width: 120px;
    background: var(--bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.suggestion-card:active {
    transform: scale(0.95);
}

.suggestion-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.suggestion-card p {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 8px 8px 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-card span {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    padding: 2px 8px 8px;
    display: block;
}

/* ================================================
   CART VIEW
   ================================================ */
.cart-section {
    margin-bottom: 20px;
}

.cart-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-section-header h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.4s var(--transition-ease) both;
    transition: transform 0.2s;
}

.cart-item:nth-child(1) { animation-delay: 0.0s; }
.cart-item:nth-child(2) { animation-delay: 0.08s; }
.cart-item:nth-child(3) { animation-delay: 0.16s; }

.cart-item.removing {
    animation: slideOutRight 0.35s var(--transition-ease) forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-input);
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}

.cart-item-price {
    font-size: 0.9375rem;
    font-weight: 700;
}

.cart-item-delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.2s;
}

.cart-item-delete:active {
    color: var(--accent-red);
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--primary-bg);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.qty-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    transition: background 0.15s;
}

.qty-btn:active {
    background: rgba(109, 92, 231, 0.2);
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

/* ---- Cart Summary ---- */
.cart-summary {
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.cart-summary h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.summary-row--total {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* ---- Coupon ---- */
.cart-coupon {
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.cart-coupon h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.coupon-input-wrap {
    display: flex;
    gap: 8px;
}

.coupon-input-wrap input {
    flex: 1;
}

.btn-apply {
    padding: 10px 20px;
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    white-space: nowrap;
    transition: transform 0.15s, background 0.2s;
    box-shadow: var(--shadow-primary);
}

.btn-apply:active {
    transform: scale(0.95);
    background: var(--primary-dark);
}

/* ---- Cart Bottom Actions ---- */
.cart-bottom-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px calc(12px + var(--safe-bottom));
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.btn-quick-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: #f5a623;
    color: #fff;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-secondary);
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-quick-buy:active {
    transform: scale(0.98);
}

.btn-quick-buy i {
    font-size: 1.2rem;
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-primary);
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-checkout:active {
    transform: scale(0.98);
}

.btn-price-badge {
    background: rgba(255,255,255,0.25);
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 700;
}

/* ================================================
   CHECKOUT VIEW
   ================================================ */
.checkout-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.4s var(--transition-ease) both;
}

.checkout-card:nth-child(1) { animation-delay: 0.0s; }
.checkout-card:nth-child(2) { animation-delay: 0.06s; }
.checkout-card:nth-child(3) { animation-delay: 0.12s; }
.checkout-card:nth-child(4) { animation-delay: 0.18s; }
.checkout-card:nth-child(5) { animation-delay: 0.24s; }
.checkout-card:nth-child(6) { animation-delay: 0.30s; }
.checkout-card:nth-child(7) { animation-delay: 0.36s; }

.checkout-card h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---- Phone Input ---- */
.phone-input-wrap {
    display: flex;
    gap: 8px;
}

.phone-prefix {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text);
}

.prefix-flag {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 700;
}

.phone-input-wrap input {
    flex: 1;
}

/* ---- Toggle Switch ---- */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.toggle-row--card {
    padding: 0;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: transform 0.3s var(--transition-spring);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ---- Geolocation Button ---- */
.btn-geo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-lg);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 12px 0;
    background: var(--primary-light);
    transition: all 0.2s;
}

.btn-geo:active {
    background: var(--primary);
    color: #fff;
    border-style: solid;
    transform: scale(0.98);
}

.btn-geo i {
    font-size: 1.2rem;
}

/* ---- Checkout Summary ---- */
.checkout-summary-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-summary-item img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.checkout-summary-info {
    flex: 1;
    min-width: 0;
}

.checkout-summary-info p {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.checkout-summary-info span {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.checkout-summary-price {
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Checkout Bottom Actions ---- */
.checkout-bottom-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px calc(12px + var(--safe-bottom));
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 20;
}

.btn-checkout--full {
    width: 100%;
}

/* ================================================
   PRODUCT DETAIL (Premium App Redesign)
   ================================================ */
.product-detail-info {
    padding: 0 24px 100px 24px;
    background: transparent;
}

.premium-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--text), #334155);
    color: white;
    border-radius: var(--radius-pill);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    margin-top: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-detail-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.product-detail-sku {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.product-detail-rating .stars {
    color: var(--secondary);
    display: flex;
    font-size: 1.1rem;
}

.product-detail-rating .reviews {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

.product-buy-box {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    margin-bottom: 32px;
}

.product-buy-box__price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.product-buy-box__price-main {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.product-buy-box__price-old {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

.product-desc-section {
    margin-bottom: 32px;
}

.product-desc-section h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.product-desc-section p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.var-chip {
    padding: 12px 20px;
    border: 2px solid var(--border);
    background: var(--bg-screen);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.var-chip.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(109,92,231,0.15);
}

.feature-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.feature-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.feature-card:active {
    transform: scale(0.96);
}

.feature-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.feature-card-icon--green {
    background: rgba(0, 201, 167, 0.1);
    color: var(--accent-green);
}

.feature-card-icon--blue {
    background: rgba(109, 92, 231, 0.1);
    color: var(--primary);
}

.feature-card-text {
    display: flex;
    flex-direction: column;
}

.feature-card-text strong {
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 700;
}

.feature-card-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================================
   EMPTY STATES
   ================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    animation: fadeInUp 0.5s var(--transition-ease);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--primary);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-primary);
    transition: transform 0.15s, background 0.2s;
}

.btn-primary:active {
    transform: scale(0.96);
    background: var(--primary-dark);
}

/* ================================================
   PROFILE VIEW
   ================================================ */
.profile-header-card {
    background: var(--primary);
    border-radius: var(--radius-xl);
    padding: 28px 20px;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: var(--shadow-primary);
}

.profile-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.profile-header-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
}

.profile-header-card p {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 4px;
}

.profile-menu {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background 0.15s;
    cursor: pointer;
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item:active {
    background: var(--bg-input);
}

.profile-menu-item i:first-child {
    font-size: 1.3rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.profile-menu-item span {
    flex: 1;
}

.profile-menu-item i:last-child {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-menu-item--danger i:first-child {
    color: var(--accent-red);
}

.profile-menu-item--danger span {
    color: var(--accent-red);
}

/* ================================================
   BOTTOM NAVIGATION BAR
   ================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    transition: transform 0.3s var(--transition-ease);
}

.bottom-nav.hidden {
    transform: translateY(100%);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    min-width: 56px;
    color: var(--text-muted);
    transition: color 0.25s;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    transition: transform 0.25s var(--transition-spring);
}

.bottom-nav-item span {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active i {
    transform: scale(1.15);
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 32px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--primary);
    transition: transform 0.3s var(--transition-spring);
}

.bottom-nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Cart FAB */
.bottom-nav-item--cart {
    margin-top: -22px;
}

.cart-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-primary);
    position: relative;
    transition: transform 0.25s var(--transition-spring);
}

.cart-fab:active {
    transform: scale(0.9);
}

.cart-fab i {
    font-size: 1.4rem;
    color: #fff;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--bg);
    animation: popIn 0.3s var(--transition-spring);
}

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ================================================
   TOAST NOTIFICATION
   ================================================ */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 20px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--text);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s var(--transition-spring);
    z-index: 100000;
    white-space: nowrap;
}

.toast i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, #e5e7eb 50%, var(--bg-input) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ================================================
   RIPPLE EFFECT
   ================================================ */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .4s, opacity .6s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 1;
    transition: 0s;
}

/* ================================================
   PRODUCT DETAIL VIEW
   ================================================ */
.d-flex-gap {
    display: flex;
    gap: 4px;
}

.view-header--transparent {
    background: var(--bg);
}

.btn-fav-detail.active i {
    color: var(--accent-red);
}

/* Product Detail Loading */
.product-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-muted);
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Product Hero Image */
.product-hero-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 380px;
    background: var(--bg-input);
    position: relative;
    overflow: hidden;
}

.product-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeIn 0.4s ease;
}

.product-hero-img .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--border);
}

/* Image Thumbnails */
.product-thumbs {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    margin-top: -28px;
    position: relative;
    z-index: 5;
    overflow-x: auto;
    scrollbar-width: none;
}

.product-thumbs::-webkit-scrollbar {
    display: none;
}

.product-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    padding: 2px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.product-thumb.active {
    border-color: var(--primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Product Detail Content */
.product-detail-content {
    padding: 16px 16px 0;
    animation: fadeInUp 0.4s var(--transition-ease);
}

.product-detail-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--text);
    color: #fff;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-detail-badge--discount {
    background: var(--accent-red);
}

.product-detail-badge--new {
    background: var(--accent-green);
}

.product-detail-name {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 8px;
}

.product-detail-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Rating */
.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.rating-stars {
    display: flex;
    color: #fbbf24;
    font-size: 1rem;
}

.rating-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Price */
.product-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}

.product-detail-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.product-detail-price-old {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Description & Specs */
.product-detail-section {
    margin-bottom: 20px;
}

.product-detail-section h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.product-detail-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Spec Table */
.spec-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.spec-row {
    display: flex;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row:nth-child(even) {
    background: var(--bg-input);
}

.spec-key {
    width: 40%;
    font-weight: 600;
    color: var(--text-secondary);
}

.spec-value {
    width: 60%;
    color: var(--text);
    font-weight: 500;
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}

.feature-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-card-icon--green {
    background: #f0fdf4;
    color: #16a34a;
}

.feature-card-icon--blue {
    background: #eff6ff;
    color: #2563eb;
}

.feature-card-text strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.feature-card-text span {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Product Not Found */
.product-not-found {
    text-align: center;
    padding: 60px 24px;
}

.product-not-found i {
    font-size: 48px;
    color: var(--text-muted);
}

.product-not-found h3 {
    margin-top: 16px;
    font-size: 1.125rem;
    color: var(--text);
}

.product-not-found p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-not-found .btn-primary {
    margin-top: 20px;
}

/* Bottom Add to Cart Bar */
.product-detail-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px calc(12px + var(--safe-bottom));
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 20;
    animation: fadeInUp 0.3s var(--transition-ease);
}

.qty-control--large {
    background: var(--bg-input);
    border: 1px solid var(--border);
}

.qty-control--large .qty-btn {
    width: 44px;
    height: 48px;
    font-size: 1.2rem;
    color: var(--text);
}

.qty-control--large .qty-value {
    width: 32px;
    font-size: 1rem;
    font-weight: 700;
}

.btn-checkout--detail {
    flex: 1;
    height: 50px;
    gap: 8px;
}

.btn-checkout--detail i {
    font-size: 1.2rem;
}

/* ================================================
   RESPONSIVE — Tablet & Desktop
   ================================================ */

/* Tablet (481px - 768px) */
@media (min-width: 481px) {
    body {
        overflow: auto;
    }

    .app-shell {
        max-width: 100%;
        height: auto;
        min-height: 100dvh;
        max-height: none;
        overflow: visible;
    }

    .view {
        position: relative;
        height: auto;
        min-height: 100dvh;
        display: none;
    }

    .view.active {
        display: flex;
    }

    .view-body {
        overflow: visible;
    }

    .carousel-slide {
        min-width: calc(100% - 16px);
        height: 180px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .bottom-nav {
        max-width: 100%;
    }
}

/* Desktop (769px+) */
@media (min-width: 769px) {
    .app-shell {
        max-width: 1280px;
        margin: 0 auto;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    .view-header--home {
        padding: 14px 24px;
    }

    .search-pill {
        max-width: 480px;
    }

    /* Hero Carousel */
    .hero-carousel {
        padding: 16px 24px;
    }

    .carousel-slide {
        min-width: calc(50% - 8px);
        height: 200px;
    }

    /* Sections wider padding */
    .section {
        padding: 16px 24px;
    }

    .view-body--padded {
        padding: 20px 24px;
    }

    /* Products: 3 columns */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    /* Cart items wider */
    .cart-item {
        grid-template-columns: 80px 1fr auto;
        gap: 16px;
        padding: 18px;
    }

    .cart-item-img {
        width: 80px;
        height: 80px;
    }

    /* Checkout: 2 column form */
    .checkout-card {
        max-width: 100%;
    }

    /* Product Detail: side-by-side */
    .product-hero-img {
        max-height: 500px;
    }

    /* Feature cards */
    .feature-cards {
        max-width: 400px;
    }

    /* Profile */
    .profile-header-card {
        max-width: 400px;
        margin: 0 auto 20px;
    }

    .profile-menu {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Bottom nav stays centered */
    .bottom-nav {
        max-width: 600px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        box-shadow: var(--shadow-lg);
    }

    /* Cart bottom actions */
    .cart-bottom-actions {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .checkout-bottom-actions {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .product-detail-actions {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    /* Empty states */
    .empty-state {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Desktop XL (1025px+) */
@media (min-width: 1025px) {
    /* Products: 4 columns */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .carousel-slide {
        min-width: calc(33.333% - 8px);
        height: 220px;
    }

    .hero-carousel {
        padding: 20px 24px;
    }

    /* Wider search */
    .search-pill {
        max-width: 560px;
    }

    /* Search view: suggestions grid */
    .suggestion-cards {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow: visible;
    }

    /* Cart: 2-col layout */
    .cart-section {
        max-width: 100%;
    }

    .cart-summary {
        max-width: 100%;
    }

    /* Checkout: 2-col checklist */
    #view-checkout .view-body--padded {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }

    #view-checkout .checkout-card:last-child {
        grid-column: 1 / -1;
    }
}

/* Mobile sticky actions for Product Detail */
#product-detail-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px calc(16px + var(--safe-bottom));
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    border-top: 1px solid var(--border);
    width: 100%;
}

/* Ultra-wide (1400px+) */
@media (min-width: 1400px) {
    .app-shell {
        max-width: 1440px;
    }

    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ================================================
   DESKTOP RESPONSIVE (Fase 3: Capsule Navbar & 2-Column Product)
   ================================================ */
@media (min-width: 768px) {
    /* Navbar type capsule */
    .bottom-nav {
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 600px;
        max-width: 90%;
        height: 72px;
        padding: 0 32px;
        border-radius: 100px; /* Pill shape */
        box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.05);
        border: 1px solid rgba(255,255,255,0.8);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .bottom-nav.hidden {
        transform: translateX(-50%) translateY(150px);
    }

    .bottom-spacer { height: 120px; }
    .bottom-spacer-lg { height: 160px; }

    /* Adjust Cart FAB for capsule */
    .bottom-nav-item--cart {
        margin-top: -36px;
    }
    .cart-fab {
        width: 64px;
        height: 64px;
        border: 4px solid var(--bg-screen);
    }
    .cart-fab i {
        font-size: 1.8rem;
    }

    /* 2-Column Product Detail Layout */
    .product-detail-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 48px;
        align-items: start;
        padding: 40px 24px 120px 24px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .product-detail-layout__image {
        position: sticky;
        top: 80px;
        border-radius: var(--radius-xl);
        overflow: hidden;
        box-shadow: var(--shadow-md);
        background: var(--bg);
        aspect-ratio: 1/1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-detail-layout__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-detail-layout__info {
        background: transparent;
        padding: 0;
    }

    /* Remove the sticky actions bar on bottom for desktop, put it inside info */
    #product-detail-actions {
        position: static;
        box-shadow: none;
        padding: 24px 0 0 0;
        border-top: 1px solid var(--border);
        background: transparent;
        margin-top: auto; /* Push to bottom of col if needed */
    }

    .product-hero-img {
        /* Override old inline hero image styles if applied */
        position: static !important;
        height: auto !important;
        border-radius: var(--radius-xl);
    }
}

/* ================================================
   v2.0 — SKELETON LOADERS
   ================================================ */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}
.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.skeleton-img {
    aspect-ratio: 1/1;
    background: linear-gradient(90deg, var(--bg-input) 25%, #e9ecef 37%, var(--bg-input) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}
.skeleton-text {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bg-input) 25%, #e9ecef 37%, var(--bg-input) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    margin: 10px 10px 0;
}
.skeleton-text--short { width: 60%; }
.skeleton-text--price {
    height: 18px;
    width: 40%;
    margin-bottom: 10px;
}
.skeleton-banner {
    height: 150px;
    margin: 12px 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--bg-input) 25%, #e9ecef 37%, var(--bg-input) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}
.skeleton-chips {
    display: flex; gap: 8px; padding: 0 16px; overflow: hidden;
}
.skeleton-chip {
    width: 80px; height: 36px; border-radius: var(--radius-pill); flex-shrink: 0;
    background: linear-gradient(90deg, var(--bg-input) 25%, #e9ecef 37%, var(--bg-input) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

/* ================================================
   v2.0 — GLASSMORPHISM UTILITIES
   ================================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

/* ================================================
   v2.0 — DYNAMIC GRADIENT BACKGROUND
   ================================================ */
.gradient-bg {
    background: linear-gradient(-45deg, #6d5ce7, #a29bfe, #f0edff, #ddd6fe);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ================================================
   v2.0 — DRAWER / BOTTOM-SHEET MODAL
   ================================================ */
.drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 500; opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--transition-ease);
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.35s var(--transition-ease);
    z-index: 501;
    overflow-y: auto;
    padding-bottom: calc(var(--space-lg) + var(--safe-bottom));
}
.drawer.active { transform: translateY(0); }

.drawer-handle {
    width: 40px; height: 5px;
    background: var(--border);
    border-radius: 3px;
    margin: 12px auto;
}
.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-size: 1.0625rem; font-weight: 700; }
.drawer-body { padding: var(--space-md); }

/* ================================================
   v2.0 — BREADCRUMBS
   ================================================ */
.breadcrumbs {
    display: flex; align-items: center; gap: 6px;
    padding: 10px var(--space-md);
    font-size: 0.8125rem; color: var(--text-muted);
    overflow-x: auto; white-space: nowrap;
    scrollbar-width: none;
}
.breadcrumbs::-webkit-scrollbar { display: none; }
.breadcrumbs a {
    color: var(--text-secondary); font-weight: 500;
    transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .bc-sep { color: var(--border); font-size: 0.75rem; }
.breadcrumbs .bc-current { color: var(--text); font-weight: 600; }

/* ================================================
   v2.0 — DISCOUNT BADGE & STOCK COUNTER
   ================================================ */
.product-badge--discount {
    background: linear-gradient(135deg, var(--accent-red), #ee5a24);
    font-weight: 800; letter-spacing: 0.3px;
    padding: 4px 10px;
}
.product-badge--low-stock {
    background: var(--accent-orange);
    font-size: 0.625rem; font-weight: 700;
    padding: 3px 8px;
    position: absolute; bottom: 8px; left: 8px; top: auto;
}

/* ================================================
   v2.0 — PULL TO REFRESH
   ================================================ */
.ptr-indicator {
    position: absolute; top: -50px; left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    transition: top 0.3s var(--transition-ease), opacity 0.3s;
    z-index: 50; opacity: 0;
}
.ptr-indicator.pulling { top: 16px; opacity: 1; }
.ptr-indicator.refreshing { top: 16px; opacity: 1; }
.ptr-indicator .ptr-spinner {
    width: 20px; height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
}
.ptr-indicator.refreshing .ptr-spinner {
    animation: spin 0.7s linear infinite;
}

/* ================================================
   v2.0 — SWIPE GALLERY
   ================================================ */
.swipe-gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.swipe-gallery::-webkit-scrollbar { display: none; }
.swipe-gallery img {
    min-width: 100%; height: 100%; object-fit: cover;
    scroll-snap-align: start; flex-shrink: 0;
}
.gallery-dots {
    display: flex; justify-content: center; gap: 6px;
    padding: 10px 0;
}
.gallery-dots .gdot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); transition: all 0.3s var(--transition-spring);
}
.gallery-dots .gdot.active {
    width: 22px; border-radius: 4px; background: var(--primary);
}

/* ================================================
   v2.0 — RECENTLY VIEWED & RELATED PRODUCTS
   ================================================ */
.horizontal-scroll-section {
    margin-top: var(--space-lg);
}
.horizontal-scroll-section h4 {
    font-size: 1rem; font-weight: 700;
    padding: 0 var(--space-md); margin-bottom: var(--space-sm);
}
.horizontal-scroll-row {
    display: flex; gap: 12px;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 var(--space-md) var(--space-sm);
    -webkit-overflow-scrolling: touch;
}
.horizontal-scroll-row::-webkit-scrollbar { display: none; }
.mini-product-card {
    min-width: 140px; max-width: 160px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mini-product-card:active { transform: scale(0.96); }
.mini-product-card img {
    width: 100%; aspect-ratio: 1/1; object-fit: cover;
}
.mini-product-card .mini-info {
    padding: 8px;
}
.mini-product-card .mini-name {
    font-size: 0.75rem; font-weight: 500;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.3; margin-bottom: 4px;
}
.mini-product-card .mini-price {
    font-size: 0.8125rem; font-weight: 700; color: var(--primary);
}

/* ================================================
   v2.0 — WHATSAPP SHARE BUTTON
   ================================================ */
.btn-whatsapp-share {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: #25D366; color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 600; font-size: 0.875rem;
    box-shadow: 0 4px 14px rgba(37,211,102,0.3);
    transition: transform 0.15s, box-shadow 0.2s;
    border: none; cursor: pointer;
}
.btn-whatsapp-share:active { transform: scale(0.95); }
.btn-whatsapp-share i { font-size: 1.2rem; }

/* ================================================
   v2.0 — SEARCH RESULTS (instant search)
   ================================================ */
.search-result-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:active { background: var(--bg-input); }
.search-result-item img {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    object-fit: cover; flex-shrink: 0;
}
.search-result-item .sr-info { flex: 1; min-width: 0; }
.search-result-item .sr-name {
    font-size: 0.875rem; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-item .sr-price {
    font-size: 0.8125rem; font-weight: 700; color: var(--primary);
}

/* ================================================
   v2.0 — ERROR BOUNDARY UI
   ================================================ */
.error-boundary {
    text-align: center; padding: 40px 20px;
    animation: fadeInUp 0.4s var(--transition-ease);
}
.error-boundary i { font-size: 3rem; color: var(--accent-red); margin-bottom: 12px; }
.error-boundary h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; }
.error-boundary p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 16px; }
.error-boundary .btn-retry {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; background: var(--primary); color: #fff;
    border-radius: var(--radius-md); font-weight: 600;
    border: none; cursor: pointer;
    box-shadow: var(--shadow-primary);
}

/* ================================================
   v2.0 — ACCESSIBILITY (WCAG)
   ================================================ */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Ensure min touch target sizes */
button, a, input, select, .category-chip, .tag, .profile-menu-item {
    min-height: var(--touch-min);
}

@media (min-width: 481px) {
    .skeleton-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 769px) {
    .skeleton-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 16px 24px; }
}
@media (min-width: 1025px) {
    .skeleton-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
@media (min-width: 1400px) {
    .skeleton-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ================================================
   v2.0 — AUTH & PROFILE STYLES
   ================================================ */
.tabs-container {
    display: flex;
    background: var(--bg-input);
    border-radius: var(--radius-pill);
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.auth-box { display: none; animation: fadeInUp 0.3s var(--transition-ease) both; }
.auth-box.active { display: block; }

.profile-pic-updater {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    margin-bottom: 24px;
}
.current-pic {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.current-pic img { width: 100%; height: 100%; object-fit: cover; }

.address-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}
.address-card.is-default {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(109, 92, 231, 0.1);
}
.address-card .badge-default {
    display: inline-block;
    padding: 4px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.address-card .address-actions {
    position: absolute; right: 16px; top: 16px; display: flex; gap: 8px;
}
.address-card .address-actions button {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--bg-input);
    color: var(--text-secondary); transition: all 0.2s;
}
.address-card .address-actions button:hover { background: var(--border); color: var(--text); }
.address-card .address-actions button.btn-delete:hover { background: rgba(255,107,107,0.1); color: var(--accent-red); }

.config-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}
.config-card h4 { margin-bottom: 16px; font-size: 1rem; font-weight: 700; }

.profile-header-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
}
.profile-header-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.profile-header-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.profile-menu {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: background 0.2s;
    cursor: pointer;
}
.profile-menu-item:last-child {
    border-bottom: none;
}
.profile-menu-item:active {
    background: var(--bg-input);
}
.profile-menu-item i:first-child {
    font-size: 1.25rem;
    color: var(--primary);
}
.profile-menu-item i:last-child {
    margin-left: auto;
    color: var(--text-muted);
}
.profile-menu-item--danger i:first-child,
.profile-menu-item--danger span {
    color: var(--accent-red);
}
/* ============================================= */
/* MODERN AUTHENTICATION UI                      */
/* ============================================= */
.auth-welcome-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 24px;
}
.auth-welcome-hero {
    margin-bottom: 24px;
}
.auth-welcome-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(109, 92, 231, 0.2);
}
.auth-welcome-hero h2 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}
.auth-welcome-hero p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.auth-tabs-modern {
    display: flex;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab-modern {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.3s ease;
    cursor: pointer;
}
.auth-tab-modern.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-input-group {
    position: relative;
    margin-bottom: 16px;
}
.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}
.auth-input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px 16px 14px 48px !important;
    color: var(--text) !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}
.auth-input-group input:focus {
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(109, 92, 231, 0.1) !important;
}
.auth-input-row {
    display: flex;
    gap: 12px;
}
.auth-input-row .auth-input-group {
    flex: 1;
}

.btn-auth-primary {
    width: 100%;
    background: var(--primary);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(109, 92, 231, 0.25);
    margin-top: 24px;
}
.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(109, 92, 231, 0.35);
}
.btn-auth-primary:active {
    transform: translateY(0);
}

.auth-terms {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.auth-terms a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-welcome-container {
    max-width: 400px;
    margin: 0 auto 24px auto;
    box-sizing: border-box;
}
