/* ============================================================
   ESSENZA - Complete Professional Stylesheet
   Version: 5.0 (Mobile-First + Desktop Sidebar)
   Author: Essenza Team
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
    /* Colors */
    --bg-start: #08060a;
    --bg-mid: #0f0c13;
    --bg-end: #08060a;
    --surface: rgba(20, 16, 24, 0.7);
    --surface-solid: #141018;
    --glass: rgba(20, 16, 24, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-strong: rgba(212, 175, 55, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    --primary: #d4af37;
    --primary-dark: #b4942d;
    --primary-glow: rgba(212, 175, 55, 0.25);
    --primary-soft: rgba(212, 175, 55, 0.08);

    --gold: #e6c86e;
    --gold-dark: #c5a028;
    --gold-glow: rgba(230, 200, 110, 0.3);
    --gold-soft: rgba(230, 200, 110, 0.1);

    --emerald: #059669;
    --emerald-glow: rgba(5, 150, 105, 0.3);
    --rose: #9f1239;
    --rose-glow: rgba(159, 18, 57, 0.35);

    --text: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --danger: #dc2626;
    --success: #059669;

    /* Radii */
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 12px;
    --radius-xs: 10px;

    /* Shadows */
    --shadow-xl: 0 30px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-lg: 0 20px 45px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.4);

    /* Transitions */
    --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Nav */
    --nav-bg-glass: rgba(10, 8, 12, 0.92);
    --nav-border: rgba(255, 255, 255, 0.08);
    --nav-text: #a1a1aa;
    --nav-active: #e6c86e;

    /* Sidebar (desktop) */
    --sidebar-width-collapsed: 76px;
    --sidebar-width-expanded: 208px;
    --sidebar-right-offset: 24px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #050406;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    padding-bottom: 88px;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
    will-change: transform;
}
body::before {
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    animation: floatBlob1 20s ease-in-out infinite;
}
body::after {
    bottom: -15%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(159, 18, 57, 0.06) 0%, transparent 70%);
    animation: floatBlob2 25s ease-in-out infinite;
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 40px) scale(0.95); }
}
@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 30px) scale(1.05); }
    66% { transform: translate(20px, -20px) scale(0.9); }
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; height: auto; }
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
input, textarea, select { font-family: inherit; }

/* Scrollbar (desktop only) */
@media (min-width: 768px) {
    ::-webkit-scrollbar { width: 8px; height: 8px; }
    ::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
    ::-webkit-scrollbar-thumb {
        background: rgba(230, 200, 110, 0.3);
        border-radius: 8px;
    }
    ::-webkit-scrollbar-thumb:hover { background: rgba(230, 200, 110, 0.5); }
}

/* ============================================================
   3. LOADING SCREEN
   ============================================================ */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #050406;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loading-logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37, #b4942d, #e6c86e);
    background-size: 300% 300%;
    animation: shimmerLogo 4s ease infinite, pulseLogo 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 80px rgba(212, 175, 55, 0.3), 0 0 30px rgba(230, 200, 110, 0.2);
    margin-bottom: 24px;
    position: relative;
}
.loading-logo-circle::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: #0f0c13;
    z-index: 0;
}
.loading-logo-circle i {
    font-size: 46px;
    color: #e6c86e;
    filter: drop-shadow(0 0 15px rgba(230, 200, 110, 0.6));
    z-index: 1;
}
@keyframes shimmerLogo {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.loading-title {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #e6c86e 0%, #d4af37 50%, #b4942d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 3px;
}
.loading-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    letter-spacing: 2px;
}
.spinner-dots { display: flex; gap: 10px; }
.spinner-dots .dot {
    width: 9px;
    height: 9px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
}
.spinner-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
    background: #e6c86e;
}
.spinner-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dots .dot:nth-child(3) {
    animation-delay: 0s;
    background: var(--emerald);
}
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* ============================================================
   4. HEADER
   ============================================================ */
.app-header {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--nav-bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--nav-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    height: 58px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.header-logo-circle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(230, 200, 110, 0.3);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(230, 200, 110, 0.08);
    flex-shrink: 0;
}
.header-logo-circle .logo-fallback {
    font-size: 22px;
    color: #e6c86e;
    filter: drop-shadow(0 0 5px rgba(230, 200, 110, 0.5));
}
.header-search-area {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 10px;
    height: 36px;
    position: relative;
    transition: var(--transition-fast);
}
.header-search-area:focus-within {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}
.header-search-area > i {
    color: var(--text-muted);
    font-size: 16px;
    margin-left: 6px;
    flex-shrink: 0;
}
.header-search-area input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 12px;
    width: 100%;
    padding: 4px 0;
    font-weight: 500;
}
.header-search-area input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
.header-search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: rgba(20, 16, 24, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-md);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 200;
    box-shadow: var(--shadow-xl);
}
.header-search-results.show { display: block; }
.header-search-results .sr-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    transition: var(--transition-fast);
    color: inherit;
}
.header-search-results .sr-item:hover {
    background: rgba(212, 175, 55, 0.08);
}
.header-search-results .sr-item img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}
.header-search-results .sr-name {
    font-weight: 700;
    color: var(--text);
    font-size: 12px;
}
.header-search-results .sr-price {
    color: var(--gold);
    font-weight: 800;
    font-size: 11px;
}
.header-badge-area {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.header-badge-chip {
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    letter-spacing: 0.3px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    white-space: nowrap;
    color: inherit;
}
.header-badge-chip i { font-size: 16px; }
.header-badge-chip span:not(.cart-count-dot) {
    display: none;
}
@media (min-width: 520px) {
    .header-badge-chip span:not(.cart-count-dot) { display: inline; }
}
.badge-default {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.2), rgba(5, 150, 105, 0.1));
    color: var(--emerald);
    border-color: rgba(5, 150, 105, 0.3);
}
.badge-cart {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.2), rgba(197, 160, 40, 0.1));
    color: var(--gold);
    border-color: rgba(230, 200, 110, 0.3);
}
.cart-count-dot {
    position: absolute;
    top: -5px;
    left: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0c13;
    animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ============================================================
   5. PAGE CONTAINER
   ============================================================ */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 82px 14px 40px;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 200px);
    width: 100%;
    overflow-x: hidden;
}
.page-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    width: 100%;
}
.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}
.page-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}
.page-title i { font-size: 24px; }
.page-subtitle {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ============================================================
   6. CARDS
   ============================================================ */
.card {
    background: var(--surface);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--radius-xl);
    padding: 18px 16px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230, 200, 110, 0.15), transparent);
    pointer-events: none;
}
.card-accent { border-right: 3px solid var(--primary); }
.card-gold { border-right: 3px solid var(--gold); }
.card-emerald { border-right: 3px solid var(--emerald); }

.card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.2px;
}
.card-title.small { font-size: 13px; }
.card-title i {
    font-size: 22px;
    filter: drop-shadow(0 0 8px currentColor);
}
.card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 12px;
}
.card-footer-link {
    margin-top: 14px;
    text-align: center;
}

.icon-blue { color: #a78bfa; }
.icon-gold { color: #e6c86e; }
.icon-emerald { color: var(--emerald); }

/* ============================================================
   7. WELCOME BANNER
   ============================================================ */
.welcome-banner {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1), rgba(230, 200, 110, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 18px;
    position: relative;
    overflow: hidden;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(230, 200, 110, 0.15), transparent 70%);
    pointer-events: none;
}
.welcome-text {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    line-height: 1.5;
}
.welcome-text span { color: var(--gold); }
.welcome-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
    line-height: 1.7;
}
.welcome-badge {
    display: inline-block;
    background: rgba(230, 200, 110, 0.12);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    margin-top: 8px;
    border: 1px solid rgba(230, 200, 110, 0.2);
}

/* ============================================================
   8. STORIES
   ============================================================ */
.story-section {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 4px 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.story-section::-webkit-scrollbar { display: none; }
.story-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    min-width: 70px;
    transition: var(--transition-fast);
}
.story-avatar:active { transform: scale(0.95); }
.story-ring-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 0deg, #e6c86e, #d4af37, #b4942d, #9f1239, #e6c86e);
    background-size: 300% 300%;
    animation: spinGlow 6s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
@keyframes spinGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
.story-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 2.5px;
    background: #0f0c13;
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0f0c13;
}
.story-name {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-weight: 600;
}
.story-plus {
    position: absolute;
    bottom: 14px;
    right: -2px;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    border: 2.5px solid #0f0c13;
}

/* ============================================================
   9. HOME CAROUSEL
   ============================================================ */
.home-slider-section { margin-bottom: 16px; }
.home-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 4px;
}
.home-slider-header h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.see-all {
    font-size: 11px;
    color: var(--gold);
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    background: none;
    border: none;
}
.see-all:hover { background: rgba(230, 200, 110, 0.1); }

.home-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    touch-action: pan-y;
}
.home-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 1;
}
.home-carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}
.home-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 14px 14px;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0.95) 100%);
    color: #fff;
    pointer-events: none;
    z-index: 3;
}
.carousel-prod-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.85);
    color: #0f0c13;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 10px;
    margin-bottom: 5px;
}
.carousel-prod-name {
    font-size: 15px;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    margin-bottom: 3px;
}
.carousel-prod-price {
    font-size: 13px;
    font-weight: 800;
    color: #e6c86e;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.home-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 4;
}
.home-carousel-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}
.home-carousel-dots span.active {
    background: #e6c86e;
    width: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(230, 200, 110, 0.8);
}
.home-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}
@media (hover: hover) {
    .home-carousel-wrapper:hover .home-carousel-nav {
        opacity: 1;
        pointer-events: auto;
    }
}
.home-carousel-nav.prev { right: 8px; }
.home-carousel-nav.next { left: 8px; }
.home-carousel-nav:active {
    transform: translateY(-50%) scale(0.9);
    background: rgba(0, 0, 0, 0.7);
}
.home-carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #e6c86e, #d4af37);
    z-index: 5;
    box-shadow: 0 0 10px rgba(230, 200, 110, 0.5);
    width: 0;
}

/* ============================================================
   10. SHOP GRID & PRODUCT CARDS
   ============================================================ */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr));
    gap: 12px;
    width: 100%;
    min-width: 0;
}
.shop-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.product-card {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
    width: 100%;
    contain: layout style;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.3);
}
.product-card:active { transform: scale(0.97); }
.product-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(159, 18, 57, 0.05));
    transition: var(--transition);
    display: block;
}
.product-card:hover .product-card-img { transform: scale(1.05); }
.product-card-body {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.product-card-name {
    font-weight: 800;
    font-size: 12px;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.product-card-price {
    font-weight: 900;
    color: var(--gold);
    font-size: 13px;
}
.product-card-price .discount {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    margin-left: 4px;
    font-weight: 600;
}
.product-card-rating {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}
.product-card-stock {
    font-size: 10px;
    color: var(--emerald);
    font-weight: 700;
}
.product-card-stock.out { color: #f87171; }

/* List view */
.shop-list .product-card {
    flex-direction: row;
    min-height: 120px;
}
.shop-list .product-card-img {
    width: 120px;
    height: auto;
    min-height: 120px;
    aspect-ratio: auto;
    flex-shrink: 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* Favorite button */
.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}
.fav-btn:active { transform: scale(0.9); }
.fav-btn.active {
    color: #f43f5e;
    border-color: rgba(244, 63, 94, 0.3);
    background: rgba(244, 63, 94, 0.2);
}

/* ============================================================
   11. CATEGORY FILTER
   ============================================================ */
.category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px 2px 12px;
    margin-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.category-filter::-webkit-scrollbar { display: none; }
.category-chip {
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    transition: var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.category-chip:active { transform: scale(0.95); }
.category-chip.active {
    border-color: var(--gold);
    background: var(--gold-soft);
    color: var(--gold);
    box-shadow: 0 0 18px var(--gold-glow);
}

/* ============================================================
   12. BUTTONS
   ============================================================ */
.btn {
    background: linear-gradient(135deg, #d4af37 0%, #b4942d 100%);
    color: #0f0c13;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: var(--transition-fast);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 24px rgba(212, 175, 55, 0.25);
    letter-spacing: 0.2px;
    text-decoration: none;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b4942d 100%);
    color: #0f0c13;
}
.btn-gold {
    background: linear-gradient(135deg, #e6c86e 0%, #d4af37 100%);
    color: #0f0c13;
}
.btn-emerald {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    box-shadow: none;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline.danger {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}
.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: var(--radius-xs);
}
.btn-auto { width: auto; }

/* ============================================================
   13. FORM INPUTS
   ============================================================ */
.input-group { margin-bottom: 14px; }
.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.25);
    transition: var(--transition-fast);
    outline: none;
    color: var(--text);
    caret-color: var(--primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.input-field:focus {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
select.input-field option {
    background: #141018;
    color: var(--text);
}
textarea.input-field {
    resize: vertical;
    min-height: 76px;
}

/* ============================================================
   14. PRODUCT PAGE - LAYOUT
   ============================================================ */
.page-product {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
    width: 100%;
    min-width: 0;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    width: fit-content;
    transition: all 0.25s;
}
.back-link:hover {
    color: var(--gold);
    background: rgba(230, 200, 110, 0.08);
    border-color: rgba(230, 200, 110, 0.2);
}
.back-link i { font-size: 15px; }

/* Loading */
.product-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.spinner-large {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(230, 200, 110, 0.15);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   15. PRODUCT GALLERY
   ============================================================ */
.product-gallery {
    position: relative;
    width: 100%;
    min-width: 0;
}
.media-carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 25, 35, 0.6), rgba(15, 12, 18, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.06);
    touch-action: pan-y;
}
.media-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.media-carousel img.active {
    display: block;
    animation: fadeInImg 0.4s ease;
}
@keyframes fadeInImg {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 8, 12, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.25s;
    cursor: pointer;
}
.carousel-btn:active {
    transform: translateY(-50%) scale(0.9);
    background: rgba(10, 8, 12, 0.85);
}
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border-radius: 14px;
}
.carousel-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}
.carousel-dots span.active {
    background: var(--gold);
    width: 16px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(230, 200, 110, 0.6);
}
.fav-btn-big {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(10, 8, 12, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.25s;
    cursor: pointer;
}
.fav-btn-big:active { transform: scale(0.9); }
.fav-btn-big.active {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4);
}

/* ============================================================
   16. PRODUCT INFO
   ============================================================ */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 2px 0;
    min-width: 0;
}
.product-name-large {
    font-size: 19px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.45;
    letter-spacing: -0.3px;
    word-break: break-word;
}
.product-rating-row {
    font-size: 12px;
    color: #e6c86e;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.product-price-large {
    font-size: 22px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 0.2px;
    text-shadow: 0 0 20px rgba(230, 200, 110, 0.15);
    line-height: 1.2;
}

/* Similarity pill */
.similarity-container,
.no-taste-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
    flex-wrap: wrap;
}
.similarity-container {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.1), rgba(230, 200, 110, 0.04));
    border: 1px solid rgba(230, 200, 110, 0.2);
}
.similarity-container .label { color: var(--text-secondary); font-weight: 600; }
.similarity-container .percent { font-size: 16px; font-weight: 900; color: var(--gold); }
.similarity-container .level { font-size: 10px; color: var(--text-muted); }

.no-taste-message {
    background: rgba(255, 200, 50, 0.06);
    border: 1px solid rgba(255, 200, 50, 0.15);
    color: var(--text-secondary);
}
.no-taste-message span:first-child { font-size: 16px; }

/* ============================================================
   17. VARIANTS / VIALS
   ============================================================ */
#modal-buy-variants { margin: 2px 0; }
.variant-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin: 4px 0;
}
.variant-chip {
    padding: 11px 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.variant-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(230, 200, 110, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.variant-chip:active:not([style*="pointer-events:none"]) {
    transform: scale(0.96);
}
.variant-chip:hover:not([style*="pointer-events:none"]) {
    border-color: rgba(230, 200, 110, 0.35);
    background: rgba(230, 200, 110, 0.05);
    color: var(--text);
}
.variant-chip.selected {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(212, 175, 55, 0.05));
    color: var(--gold);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.2), inset 0 0 15px rgba(230, 200, 110, 0.05);
    transform: translateY(-1px);
}
.variant-chip.selected::before { opacity: 1; }
.variant-chip[style*="pointer-events:none"] {
    opacity: 0.35 !important;
    filter: grayscale(0.6);
    cursor: not-allowed;
}
.stock-info {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 2px 0;
}
.stock-info span { color: var(--emerald); font-weight: 800; }

/* ============================================================
   18. GIFT TOGGLE
   ============================================================ */
.gift-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 4px 0;
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.06), rgba(230, 200, 110, 0.02));
    border: 1px solid rgba(230, 200, 110, 0.15);
    border-radius: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.gift-toggle-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.gift-toggle-row label i {
    font-size: 20px;
    color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(230, 200, 110, 0.4));
    flex-shrink: 0;
}
.gift-toggle-row .gift-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gift-toggle-row .gift-label.active {
    color: var(--gold);
    font-weight: 800;
}
.gift-toggle-row > span:last-child {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider-round {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.slider-round::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .slider-round {
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(230, 200, 110, 0.4);
}
.switch input:checked + .slider-round::before {
    transform: translateX(22px);
}

/* Gift recipients */
#gift-recipients-area {
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.gift-recipients-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
}
.gift-recipients-container::-webkit-scrollbar { width: 4px; }
.gift-recipients-container::-webkit-scrollbar-thumb {
    background: rgba(230, 200, 110, 0.3);
    border-radius: 4px;
}
.gift-recipient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
    margin-bottom: 2px;
}
.gift-recipient-item:active { transform: scale(0.98); }
.gift-recipient-item:hover { background: rgba(255, 255, 255, 0.04); }
.gift-recipient-item.selected {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.05));
    border: 1px solid rgba(230, 200, 110, 0.3);
}
.gift-recipient-item .name {
    font-weight: 700;
    font-size: 12px;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}
.similarity-badge {
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
    background: rgba(230, 200, 110, 0.12);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    border: 1px solid rgba(230, 200, 110, 0.2);
}
.no-taste {
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* ============================================================
   19. QUANTITY + TOTAL + ADD TO CART
   ============================================================ */
.qty-row {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    padding: 10px 0;
    margin: 2px 0;
}
.qty-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}
.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.qty-btn:hover {
    background: rgba(230, 200, 110, 0.1);
    border-color: rgba(230, 200, 110, 0.3);
    color: var(--gold);
}
.qty-btn:active { transform: scale(0.9); }
.qty-num {
    font-size: 19px;
    font-weight: 900;
    min-width: 38px;
    text-align: center;
    color: #fff;
}

.total-row {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.total-row strong {
    color: var(--gold);
    font-size: 19px;
    font-weight: 900;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #e6c86e 0%, #d4af37 50%, #b4942d 100%);
    background-size: 200% 200%;
    color: #0f0c13;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 30px rgba(212, 175, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: inherit;
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
    animation: shimmerBtn 4s ease infinite;
}
@keyframes shimmerBtn {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.add-to-cart-btn:hover { transform: translateY(-2px); }
.add-to-cart-btn:active { transform: scale(0.97); }
.add-to-cart-btn i { font-size: 20px; }
.add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    box-shadow: none;
}

/* ============================================================
   20. TASTE COMPARISON SECTION
   ============================================================ */
.taste-compare-section {
    padding: 16px 14px;
    background: linear-gradient(160deg, rgba(168, 85, 247, 0.06), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.taste-compare-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08), transparent 60%);
    pointer-events: none;
}
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.section-header-row h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-header-row h3 i { color: var(--gold); font-size: 18px; }
.taste-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.taste-badge.level-excellent { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.taste-badge.level-high { background: rgba(212, 175, 55, 0.15); color: var(--gold); border-color: rgba(212, 175, 55, 0.3); }
.taste-badge.level-medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.taste-badge.level-low { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.taste-badge.level-none { background: rgba(160, 160, 160, 0.15); color: #a1a1aa; border-color: rgba(160, 160, 160, 0.25); }

/* Match circle */
.match-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 4px 0 14px;
    position: relative;
    z-index: 1;
}
.match-circle-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.match-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.match-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}
.match-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.match-circle-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.match-percent {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
}
.match-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.4px;
}
.match-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
}
.match-level-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid;
    width: fit-content;
}
.match-desc {
    font-size: 12px;
    line-height: 1.85;
    color: var(--text-secondary);
    max-width: 400px;
}

/* CTA */
.taste-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 18px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(230, 200, 110, 0.3);
    border-radius: 14px;
    position: relative;
    z-index: 1;
}
.taste-cta > i {
    font-size: 38px;
    color: var(--gold);
    filter: drop-shadow(0 0 15px rgba(230, 200, 110, 0.4));
}
.taste-cta > div { max-width: 320px; }
.taste-cta-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 5px;
}
.taste-cta-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.taste-cta .btn {
    width: auto;
    padding: 10px 20px;
    font-size: 12px;
}

/* Family chart */
.family-chart {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}
.family-chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.family-chart-title i {
    color: var(--gold);
    font-size: 18px;
}
.chart-legend {
    margin-right: auto;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.chart-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
}
.chart-legend .dot.perfume { background: linear-gradient(135deg, #e6c86e, #d4af37); }
.chart-legend .dot.user { background: linear-gradient(135deg, #a855f7, #c084fc); }

.family-bars { display: flex; flex-direction: column; gap: 12px; }
.family-bar-row { display: flex; flex-direction: column; gap: 5px; }
.family-bar-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.family-name {
    font-weight: 700;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.family-pct {
    font-weight: 900;
    color: var(--gold);
    font-size: 12px;
    min-width: 34px;
    text-align: left;
}
.family-diff {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 8px;
    min-width: 32px;
    text-align: center;
}
.family-diff.pos { color: #10b981; background: rgba(16, 185, 129, 0.12); }
.family-diff.neg { color: #ef4444; background: rgba(239, 68, 68, 0.12); }
.family-diff.neutral { color: #a1a1aa; background: rgba(160, 160, 160, 0.1); }

.family-bar-track {
    position: relative;
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.family-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.family-bar-fill.perfume {
    right: 0;
    background: linear-gradient(90deg, #d4af37, #e6c86e);
    box-shadow: 0 0 10px rgba(230, 200, 110, 0.3);
    z-index: 2;
}
.family-bar-fill.user {
    left: 0;
    background: linear-gradient(90deg, #a855f7, #c084fc);
    opacity: 0.6;
    z-index: 1;
}
.family-bar-user-label {
    font-size: 9px;
    color: #c084fc;
    font-weight: 700;
    text-align: left;
}

/* ============================================================
   21. PRODUCT TABS
   ============================================================ */
.product-tabs-section { margin-top: 4px; }
.product-tabs-header {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.product-tabs-header::-webkit-scrollbar { display: none; }
.product-tab-btn {
    flex: 1;
    min-width: 88px;
    padding: 10px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
    border: none;
}
.product-tab-btn i { font-size: 15px; }
.product-tab-btn.active {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.05));
    color: var(--gold);
    box-shadow: 0 0 15px rgba(230, 200, 110, 0.1);
}
.product-tab-pane {
    display: none;
    animation: fadeInPane 0.35s ease;
}
.product-tab-pane.active { display: block; }
@keyframes fadeInPane {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   22. DESCRIPTION + NOTES
   ============================================================ */
.product-desc-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.95;
    padding: 4px 0;
}
.product-desc-extra {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}
.info-row i {
    color: var(--gold);
    font-size: 16px;
    flex-shrink: 0;
}
.info-row a {
    color: var(--text-secondary);
}
.info-row a:hover { color: var(--gold); }

/* Notes pyramid */
.notes-pyramid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pyramid-row {
    padding: 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 3px solid;
    position: relative;
    overflow: hidden;
}
.pyramid-row::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(30px);
    pointer-events: none;
}
.pyramid-row.top {
    border-right-color: #fbbf24;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.05), transparent 50%);
}
.pyramid-row.top::before { background: #fbbf24; }
.pyramid-row.middle {
    border-right-color: #f472b6;
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.05), transparent 50%);
}
.pyramid-row.middle::before { background: #f472b6; }
.pyramid-row.base {
    border-right-color: #34d399;
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.05), transparent 50%);
}
.pyramid-row.base::before { background: #34d399; }

.pyramid-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    position: relative;
    z-index: 1;
}
.pyramid-label small {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.pyramid-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    z-index: 1;
}
.note-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    transition: all 0.2s;
    cursor: default;
}
.note-chip:hover {
    background: rgba(230, 200, 110, 0.1);
    border-color: rgba(230, 200, 110, 0.25);
    color: var(--gold);
}

/* ============================================================
   23. REVIEWS
   ============================================================ */
.review-form-btn {
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    padding: 11px 18px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}
.review-form-btn:active { transform: scale(0.95); }

.review-form-inline {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}
.rating-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    justify-content: center;
}
.rating-stars .star {
    font-size: 28px;
    cursor: pointer;
    opacity: 0.25;
    transition: all 0.2s;
    filter: grayscale(1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.rating-stars .star.active {
    opacity: 1;
    filter: grayscale(0) drop-shadow(0 0 8px rgba(230, 200, 110, 0.5));
    transform: scale(1.05);
}
.review-form-inline textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 13px;
    resize: vertical;
    min-height: 76px;
    margin-bottom: 12px;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}
.review-form-inline textarea:focus {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
}
.submit-review-btn {
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    color: #0f0c13;
    padding: 11px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.submit-review-btn:active { transform: scale(0.95); }

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.review-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.review-user {
    font-weight: 800;
    font-size: 12px;
    color: #a78bfa;
    margin-bottom: 4px;
}
.review-item > div:nth-child(2) {
    font-size: 11px;
    margin-bottom: 6px;
}
.review-item p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin: 0;
}
.no-reviews {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* ============================================================
   24. AI CHAT
   ============================================================ */
.modal-ai-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 4px;
    margin-bottom: 12px;
    scrollbar-width: thin;
}
.modal-ai-chat::-webkit-scrollbar { width: 4px; }
.modal-ai-chat::-webkit-scrollbar-thumb {
    background: rgba(230, 200, 110, 0.3);
    border-radius: 4px;
}
.ai-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.8;
    word-wrap: break-word;
    animation: bubbleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    border-bottom-right-radius: 5px;
    font-weight: 600;
}
.ai-msg.assistant {
    align-self: flex-start;
    background: rgba(30, 25, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-bottom-left-radius: 5px;
}
.ai-msg .msg-time {
    font-size: 8px;
    opacity: 0.5;
    margin-top: 4px;
    display: block;
}
.ai-typing-dots {
    display: flex;
    gap: 5px;
    align-self: flex-start;
    padding: 10px 14px;
    background: rgba(30, 25, 35, 0.85);
    border-radius: 16px;
    border-bottom-left-radius: 5px;
}
.ai-typing-dots span {
    width: 7px;
    height: 7px;
    background: #a78bfa;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}
.ai-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ai-input-row input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}
.ai-input-row input:focus {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
}
.ai-input-row button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
    transition: all 0.2s;
}
.ai-input-row button:active { transform: scale(0.9); }

.ai-product-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    margin-top: 6px;
    color: inherit;
    text-decoration: none;
}
.ai-product-card:active { transform: scale(0.97); }
.ai-product-card img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.ai-product-info { line-height: 1.4; }
.ai-product-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.ai-product-price {
    font-size: 10px;
    color: var(--gold);
    font-weight: 800;
}

/* ============================================================
   25. SIMILAR PRODUCTS
   ============================================================ */
.similar-slider-section {
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.slider-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.slider-title i { color: var(--gold); font-size: 18px; }
.similar-slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    margin: 0 -4px;
}
.similar-slider-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 4px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.similar-slider-track::-webkit-scrollbar { display: none; }
.similar-item {
    flex: 0 0 130px;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
}
.similar-item:active { transform: scale(0.97); }
.similar-item:hover {
    border-color: rgba(230, 200, 110, 0.3);
    background: rgba(230, 200, 110, 0.05);
}
.similar-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.similar-item-info { padding: 8px 10px; }
.similar-item-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.similar-item-price {
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
    margin-top: 3px;
}
.similar-slider-nav {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(10, 8, 12, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
}
@media (hover: hover) {
    .similar-slider-wrapper:hover .similar-slider-nav {
        opacity: 1;
        pointer-events: auto;
    }
}
.similar-slider-nav:active { transform: translateY(-50%) scale(0.9); }
.similar-slider-nav.prev { right: 4px; }
.similar-slider-nav.next { left: 4px; }

/* ============================================================
   26. CART PAGE
   ============================================================ */
.cart-layout {
    display: grid;
    gap: 16px;
}
.cart-items-card,
.cart-checkout-card {
    background: var(--surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 18px 16px;
}
.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.cart-item-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cart-item-price {
    font-size: 12px;
    color: var(--gold);
    font-weight: 800;
}
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-qty-num {
    font-weight: 800;
    min-width: 22px;
    text-align: center;
    font-size: 14px;
}
.cart-item-remove {
    color: #f87171;
    font-size: 16px;
    padding: 6px;
    border-radius: 50%;
}
.cart-item-remove:hover { background: rgba(248, 113, 113, 0.1); }

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    font-weight: 900;
    font-size: 16px;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(230, 200, 110, 0.2);
}

.cart-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
}
.cart-empty-state i {
    font-size: 60px;
    opacity: 0.3;
    margin-bottom: 14px;
    display: block;
}
.cart-empty-state p { margin-bottom: 18px; }

/* Token */
.token-usage-section {
    background: rgba(230, 200, 110, 0.05);
    border: 1px solid rgba(230, 200, 110, 0.15);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 12px 0;
}
.token-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.token-row strong {
    color: var(--gold);
    font-weight: 800;
}
.token-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}
.token-slider-wrapper input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}
.token-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(230, 200, 110, 0.5);
    border: 2px solid #0f0c13;
}
.token-slider-wrapper input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    cursor: pointer;
    border: 2px solid #0f0c13;
}
.token-min, .token-max {
    font-size: 10px;
    color: var(--text-muted);
    min-width: 38px;
    text-align: center;
}
.token-apply-info {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.6;
}

/* Payment */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-wrap: wrap;
}
.payment-option:hover { background: rgba(255, 255, 255, 0.04); }
.payment-option.selected {
    border-color: var(--gold);
    background: var(--gold-soft);
}
.payment-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.po-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.payment-option.selected .po-radio { border-color: var(--gold); }
.payment-option.selected .po-radio::after {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
}
.po-icon {
    font-size: 24px;
    color: var(--gold);
    width: 30px;
    text-align: center;
}
.po-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    flex: 1;
}
.po-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}
.po-badge {
    font-size: 9px;
    background: rgba(230, 200, 110, 0.15);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 800;
}

/* ============================================================
   27. MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 4, 6, 0.85);
    backdrop-filter: blur(16px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}
.modal-overlay.hidden { display: none; }
.modal-content {
    background: rgba(20, 16, 24, 0.98);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-strong);
    border-top: 1px solid var(--glass-highlight);
    border-radius: var(--radius-xl);
    padding: 24px 20px 20px;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
}
.modal-small { max-width: 380px; }
.modal-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-fast);
    z-index: 5;
}
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.modal-center {
    text-align: center;
    padding: 20px 0 0;
}
.modal-icon {
    font-size: 54px;
    color: #c084fc;
    display: block;
    margin-bottom: 14px;
}
.modal-center h3 {
    font-size: 18px;
    margin-bottom: 10px;
}
.modal-center p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 18px;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   28. TOAST
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}
.toast {
    background: rgba(20, 16, 24, 0.98);
    backdrop-filter: blur(20px);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    max-width: 90vw;
    pointer-events: auto;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(40px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   29. FOOTER
   ============================================================ */
.app-footer {
    margin-top: 40px;
    padding: 32px 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 900;
    color: var(--gold);
}
.footer-brand i { font-size: 24px; }
.footer-desc {
    color: var(--text-secondary);
    font-size: 12px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
    padding: 8px 0;
}
.footer-links a {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}
.footer-links a:hover { color: var(--gold); }
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 11px;
    align-items: center;
}
.footer-contact span {
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.footer-contact i { color: var(--gold); }
.footer-copy {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================================
   30. BOTTOM NAV  (mobile default)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    max-width: 500px;
    margin: 0 auto;
    background: var(--nav-bg-glass);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--nav-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 6px;
    height: 64px;
    z-index: 90;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 8px;
    border-radius: 18px;
    cursor: pointer;
    color: var(--nav-text);
    font-size: 9px;
    font-weight: 700;
    transition: var(--transition-fast);
    text-decoration: none;
    min-width: 46px;
    flex: 1;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav .nav-item i {
    font-size: 21px;
    transition: var(--transition-fast);
}
.bottom-nav .nav-item span {
    font-size: 9px;
    opacity: 0.7;
}
.bottom-nav .nav-item.active { color: var(--nav-active); }
.bottom-nav .nav-item.active i {
    filter: drop-shadow(0 0 12px rgba(230, 200, 110, 0.5));
}
.bottom-nav .nav-item:active { transform: scale(0.92); }
.bottom-nav .nav-more-btn {
    background: rgba(212, 175, 55, 0.05);
}

/* ============================================================
   31. FLOAT MENU
   ============================================================ */
.float-menu {
    position: fixed;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(10, 8, 12, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    padding: 8px 5px;
    width: 230px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 95;
}
.float-menu.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.float-menu .menu-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.float-menu .menu-option i {
    font-size: 18px;
    color: var(--gold);
    width: 24px;
    text-align: center;
}
.float-menu .menu-option:hover {
    background: rgba(212, 175, 55, 0.12);
}

/* ============================================================
   32. INVESTMENT PAGE
   ============================================================ */
.invest-hero {
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.1), rgba(230, 200, 110, 0.05), rgba(159, 18, 57, 0.05));
    border-radius: var(--radius-xl);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.invest-hero h2 {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #e6c86e, #d4af37, #b4942d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.invest-hero p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}
.invest-token-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    color: #0f0c13;
    padding: 9px 22px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 2px;
    margin-top: 12px;
}
.invest-feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.invest-feature-card i {
    font-size: 26px;
    color: var(--gold);
    flex-shrink: 0;
}
.invest-feature-card h4 {
    font-size: 13px;
    margin-bottom: 3px;
}
.invest-feature-card p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.invest-coming-soon {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(230, 200, 110, 0.05));
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    margin-top: 16px;
}
.invest-coming-soon h3 {
    font-size: 17px;
    color: var(--gold);
    margin-bottom: 8px;
}
.invest-coming-soon p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.85;
}
.invest-coming-soon .highlight {
    color: #fbbf24;
    font-weight: 700;
    margin-top: 6px;
}

/* ============================================================
   33. LOYALTY PAGE (basic)
   ============================================================ */
.referral-box {
    text-align: center;
    padding: 12px 0;
}
.referral-code {
    font-size: 22px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 18px;
    border-radius: 14px;
    display: inline-block;
    margin: 10px 0;
    border: 1px dashed rgba(230, 200, 110, 0.4);
}
.loyalty-info {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 2;
}
.loyalty-info strong { color: var(--gold); }
.text-muted {
    color: var(--text-muted);
    font-size: 11px;
}

/* ============================================================
   34. PROFILE
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #0f0c13;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.user-history {
    max-height: 280px;
    overflow-y: auto;
    font-size: 11px;
    color: var(--text-secondary);
}
.user-history::-webkit-scrollbar { width: 4px; }
.user-history::-webkit-scrollbar-thumb {
    background: rgba(230, 200, 110, 0.3);
    border-radius: 4px;
}

/* ============================================================
   35. WIZARD (Custom Perfume)
   ============================================================ */
.wizard-container {
    position: relative;
    min-height: 380px;
}
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.wizard-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.4s ease;
}
.wizard-dot.done {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #0f0c13;
}
.wizard-dot.current {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}
.wizard-line {
    width: 14px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}
.wizard-line.done { background: var(--emerald); }
.wizard-step { animation: fadeInPane 0.4s ease; }
.wizard-step-title {
    font-size: 17px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 6px;
}
.wizard-step-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}
.wizard-option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.wizard-option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}
.wizard-option-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.06);
}
.wizard-option-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}
.wizard-nav {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.wizard-nav button {
    flex: 1;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}
.wizard-prev-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.wizard-next-btn {
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
}
.wizard-submit-btn {
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    color: #0f0c13;
}

/* ============================================================
   36. SUPPORT CHAT + AI PAGE
   ============================================================ */
.support-card {
    display: flex;
    flex-direction: column;
    min-height: 60vh;
}
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 280px;
    max-height: 50vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
}
.chat-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.7;
    animation: bubbleIn 0.4s ease;
}
.chat-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    border-bottom-right-radius: 5px;
    font-weight: 600;
}
.chat-bubble.support {
    align-self: flex-start;
    background: rgba(40, 20, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-bottom-left-radius: 5px;
}
.chat-bubble .time {
    display: block;
    font-size: 8px;
    opacity: 0.6;
    margin-top: 3px;
}
.chat-quick-replies {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.chat-quick-btn {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
    font-family: inherit;
}
.chat-quick-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.chat-input-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.chat-input-row input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 22px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-size: 13px;
    outline: none;
    font-family: inherit;
}
.chat-input-row input:focus { border-color: var(--primary); }
.chat-send-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
    cursor: pointer;
    border: none;
}
.chat-send-btn:active { transform: scale(0.9); }

/* AI Page */
.ai-page .ai-card {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}
.ai-chat-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.ai-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 280px;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px;
}
.ai-bubble {
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.85;
    word-wrap: break-word;
    animation: bubbleIn 0.4s ease;
}
.ai-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    border-bottom-right-radius: 5px;
    font-weight: 600;
}
.ai-bubble.assistant {
    align-self: flex-start;
    background: rgba(30, 25, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 5px;
}
.ai-typing {
    display: flex;
    gap: 5px;
    padding: 8px 12px;
    align-self: flex-start;
}
.ai-typing span {
    width: 8px;
    height: 8px;
    background: #a78bfa;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================================
   37. MAP + ENAMAD
   ============================================================ */
.map-wrapper {
    width: 100%;
    height: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
}
.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.enamad-wrapper {
    text-align: center;
    padding: 16px 0;
}
.enamad-wrapper img {
    display: inline-block;
    max-width: 110px;
}

/* ============================================================
   38. UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 14px; }
.mt-3 { margin-top: 20px; }
.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 16px 0;
}
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 50px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}
.empty-state p {
    font-size: 12px;
    margin: 0;
}
.text-center-muted {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
}
.load-more-wrapper {
    text-align: center;
    margin-top: 14px;
}
.load-more-wrapper .btn {
    max-width: 240px;
    margin: 0 auto;
    display: inline-flex;
}

/* ============================================================
   39. RESPONSIVE - TABLET (>= 640px)
   ============================================================ */
@media (min-width: 640px) {
    :root {
        --radius-xl: 26px;
        --radius-lg: 22px;
    }
    .app-main { padding: 90px 20px 50px; }
    .app-header {
        top: 12px;
        left: 12px;
        right: 12px;
        height: 62px;
        padding: 8px 14px;
        border-radius: 22px;
    }
    .header-logo-circle { width: 44px; height: 44px; min-width: 44px; }
    .header-logo-circle .logo-fallback { font-size: 24px; }
    .header-search-area { height: 40px; padding: 0 14px; border-radius: 20px; }
    .header-search-area > i { font-size: 18px; }
    .header-search-area input { font-size: 13px; }
    .header-badge-chip { font-size: 11px; padding: 6px 12px; }

    .page-title { font-size: 22px; }
    .page-title i { font-size: 26px; }

    .card { padding: 20px 18px; }
    .card-title { font-size: 16px; }
    .card-title i { font-size: 24px; }

    .welcome-text { font-size: 18px; }
    .welcome-sub { font-size: 12px; }

    .story-ring-wrapper { width: 70px; height: 70px; }
    .story-name { font-size: 11px; max-width: 74px; }

    .home-carousel-wrapper { height: 240px; }
    .carousel-prod-name { font-size: 16px; }
    .carousel-prod-price { font-size: 14px; }

    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 14px;
    }
    .product-card-name { font-size: 13px; }
    .product-card-price { font-size: 14px; }

    .media-carousel { max-height: 420px; }
    .product-name-large { font-size: 22px; }
    .product-price-large { font-size: 26px; }
    .variant-chips {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .variant-chip { font-size: 13px; padding: 13px 12px; }
    .qty-btn { width: 44px; height: 44px; }
    .qty-num { font-size: 20px; }
    .add-to-cart-btn { padding: 17px; font-size: 15px; }

    .match-overall {
        flex-direction: row;
        align-items: center;
        gap: 22px;
        padding: 8px 0 18px;
    }
    .match-circle-wrapper { width: 132px; height: 132px; }
    .match-percent { font-size: 32px; }
    .match-info { align-items: flex-start; text-align: right; }
    .match-desc { font-size: 13px; }

    .taste-cta {
        flex-direction: row;
        text-align: right;
        padding: 20px;
        gap: 16px;
    }
    .taste-cta > i { font-size: 42px; }
    .taste-cta > div { flex: 1; max-width: none; }

    .family-name { font-size: 13px; }
    .family-pct { font-size: 13px; }
    .family-bar-track { height: 12px; }

    .product-tab-btn { min-width: 100px; font-size: 13px; padding: 11px 14px; }
    .product-tab-btn i { font-size: 17px; }

    .pyramid-label { font-size: 14px; }
    .note-chip { font-size: 12px; padding: 7px 14px; }

    .similar-item { flex: 0 0 150px; }
    .similar-item img { height: 140px; }

    .cart-layout { grid-template-columns: 1.3fr 1fr; align-items: start; }
    .cart-item-img { width: 64px; height: 64px; }

    .map-wrapper { height: 340px; }
}

/* ============================================================
   40. RESPONSIVE - DESKTOP (>= 900px)
   Bottom nav becomes an elegant right-side vertical sidebar
   ============================================================ */
@media (min-width: 900px) {
    body {
        padding-bottom: 0;
        padding-right: 0;
    }
    .app-main {
        padding: 100px 24px 60px;
        max-width: 1200px;
        /* push content slightly left to give the sidebar breathing space */
        padding-left: 24px;
    }

    /* ---- Sidebar (was bottom-nav) ---- */
    .bottom-nav {
        top: 50%;
        bottom: auto;
        right: var(--sidebar-right-offset);
        left: auto;
        transform: translateY(-50%);
        width: var(--sidebar-width-collapsed);
        height: auto;
        max-width: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        padding: 12px 10px;
        border-radius: 24px;
        margin: 0;
        transition:
            width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
            padding 0.35s ease,
            box-shadow 0.3s ease,
            border-color 0.3s ease;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
        z-index: 95;
    }
    .bottom-nav::before {
        content: '';
        position: absolute;
        top: -1px;
        left: 20%;
        right: 20%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(230, 200, 110, 0.5), transparent);
        opacity: 0.6;
        pointer-events: none;
    }
    .bottom-nav:hover,
    .bottom-nav:focus-within {
        width: var(--sidebar-width-expanded);
        padding: 12px 14px;
        box-shadow:
            0 25px 70px rgba(0, 0, 0, 0.65),
            0 0 60px rgba(230, 200, 110, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        border-color: rgba(230, 200, 110, 0.25);
    }

    .bottom-nav .nav-item {
        flex: 0 0 auto;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 0;
        min-width: 0;
        width: 100%;
        padding: 12px;
        border-radius: 16px;
        font-size: 13px;
        font-weight: 700;
        color: var(--nav-text);
        transition:
            background 0.25s ease,
            color 0.25s ease,
            padding 0.3s ease,
            transform 0.2s ease;
        position: relative;
        overflow: hidden;
    }
    .bottom-nav .nav-item i {
        font-size: 22px;
        flex-shrink: 0;
        transition: transform 0.25s ease, color 0.25s ease;
    }
    .bottom-nav .nav-item span {
        opacity: 0;
        max-width: 0;
        margin-right: 0;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.3px;
        transition:
            opacity 0.25s ease 0.05s,
            max-width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
            margin-right 0.3s ease;
    }
    .bottom-nav:hover .nav-item,
    .bottom-nav:focus-within .nav-item {
        gap: 14px;
        padding: 12px 14px;
    }
    .bottom-nav:hover .nav-item span,
    .bottom-nav:focus-within .nav-item span {
        opacity: 1;
        max-width: 140px;
        margin-right: 0;
    }

    .bottom-nav .nav-item:hover {
        background: rgba(230, 200, 110, 0.08);
        color: var(--gold);
    }
    .bottom-nav .nav-item:hover i {
        transform: scale(1.1) rotate(-3deg);
    }
    .bottom-nav .nav-item.active {
        color: var(--nav-active);
        background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.04));
        box-shadow: inset 0 0 0 1px rgba(230, 200, 110, 0.25);
    }
    .bottom-nav .nav-item.active i {
        filter: drop-shadow(0 0 12px rgba(230, 200, 110, 0.55));
    }
    .bottom-nav .nav-item.active::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 60%;
        border-radius: 3px;
        background: linear-gradient(180deg, #e6c86e, #b4942d);
        box-shadow: 0 0 12px rgba(230, 200, 110, 0.6);
    }
    .bottom-nav .nav-more-btn {
        background: linear-gradient(135deg, rgba(230, 200, 110, 0.18), rgba(230, 200, 110, 0.05));
        color: var(--gold);
        box-shadow: inset 0 0 0 1px rgba(230, 200, 110, 0.25);
    }
    .bottom-nav .nav-more-btn i {
        transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .bottom-nav .nav-more-btn:hover i {
        transform: rotate(90deg) scale(1.1);
    }

    /* ---- Float menu (repurposed as sidebar flyout) ---- */
    .float-menu {
        top: 50%;
        bottom: auto;
        left: auto;
        right: calc(var(--sidebar-right-offset) + var(--sidebar-width-collapsed) + 14px);
        transform: translateY(-50%) translateX(-8px);
        width: 230px;
        opacity: 0;
        pointer-events: none;
    }
    .float-menu.show {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* ---- Content width pushes past the sidebar ---- */
    .app-main,
    .app-header,
    .app-footer .footer-inner {
        max-width: calc(1200px);
    }

    /* ---- Product page: two-column grid ---- */
    .page-product {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px 32px;
        align-items: start;
        max-width: 1100px;
        margin: 0 auto;
    }
    .product-gallery {
        grid-column: 1;
        grid-row: 1;
        position: sticky;
        top: 90px;
    }
    .product-info {
        grid-column: 2;
        grid-row: 1;
        padding-top: 0;
    }
    .taste-compare-section,
    .product-tabs-section,
    .similar-slider-section {
        grid-column: 1 / -1;
    }

    .media-carousel { max-height: 520px; }
    .product-name-large { font-size: 26px; }
    .product-price-large { font-size: 30px; }

    .home-carousel-wrapper { height: 320px; }

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

    .product-tabs-header { justify-content: flex-start; gap: 6px; }
    .product-tab-btn { min-width: 120px; padding: 12px 18px; }

    .similar-slider-nav { opacity: 1; pointer-events: auto; }

    /* ---- Cart two-column desktop ---- */
    .cart-layout { grid-template-columns: 1.6fr 1fr; gap: 22px; }

    /* ---- Larger hero paddings on desktop ---- */
    .welcome-banner { padding: 26px 24px; }
    .welcome-text { font-size: 22px; }
    .welcome-sub { font-size: 13px; }

    .card { padding: 24px 22px; }
}

/* ============================================================
   40b. WIDE DESKTOP (>= 1400px) — more breathing room
   ============================================================ */
@media (min-width: 1400px) {
    :root {
        --sidebar-right-offset: 32px;
        --sidebar-width-collapsed: 82px;
        --sidebar-width-expanded: 224px;
    }
    .app-main { padding-right: 32px; }
}

/* ============================================================
   41. VERY SMALL SCREENS (max-width: 360px)
   ============================================================ */
@media (max-width: 360px) {
    .app-main { padding: 78px 10px 40px; }
    .app-header { top: 8px; left: 8px; right: 8px; padding: 6px 8px; height: 54px; }
    .header-logo-circle { width: 36px; height: 36px; min-width: 36px; }
    .header-logo-circle .logo-fallback { font-size: 20px; }
    .header-badge-chip { padding: 5px 8px; }
    .header-badge-chip i { font-size: 15px; }
    .header-search-area { height: 32px; padding: 0 8px; }
    .header-search-area input { font-size: 11px; }

    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .product-card-name { font-size: 11px; }
    .product-card-price { font-size: 12px; }

    .media-carousel { max-height: none; }
    .product-name-large { font-size: 17px; }
    .product-price-large { font-size: 20px; }
    .variant-chips {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .variant-chip { font-size: 11px; padding: 10px 6px; }
    .qty-btn { width: 36px; height: 36px; font-size: 16px; }
    .qty-num { font-size: 17px; min-width: 32px; }

    .match-circle-wrapper { width: 108px; height: 108px; }
    .match-percent { font-size: 24px; }

    .product-tab-btn {
        min-width: 76px;
        padding: 9px 8px;
        font-size: 11px;
    }
    .product-tab-btn i { font-size: 13px; }

    .pyramid-chips { gap: 4px; }
    .note-chip { font-size: 10px; padding: 5px 10px; }

    .gift-recipient-avatar { width: 34px; height: 34px; font-size: 12px; }
    .gift-sim-badge { font-size: 9px; padding: 3px 8px; }
    .gift-better-btn { width: 26px; height: 26px; font-size: 12px; }
    .gift-actions .btn { padding: 9px 10px; font-size: 11px; }
    .better-choice-item img { width: 44px; height: 44px; }
}

/* ============================================================
   42. ACCESSIBILITY
   ============================================================ */
.variant-chip:focus-visible,
.qty-btn:focus-visible,
.add-to-cart-btn:focus-visible,
.product-tab-btn:focus-visible,
.fav-btn-big:focus-visible,
.carousel-btn:focus-visible,
.btn:focus-visible,
.category-chip:focus-visible,
.payment-option:focus-visible,
.gift-recipient-item:focus-visible,
.chat-quick-btn:focus-visible,
.bottom-nav .nav-item:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ============================================================
   43. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .match-fill,
    .family-bar-fill {
        transition: none !important;
    }
}

/* ============================================================
   44. PRINT
   ============================================================ */
@media print {
    .app-header,
    .bottom-nav,
    .float-menu,
    #toast-container,
    .app-footer {
        display: none !important;
    }
    body { padding: 0; background: #fff; color: #000; }
    .app-main { padding: 0; }
}

/* ============================================================
   GIFT MODE - Full Styles
   ============================================================ */
.gift-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 8px 0;
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.06), rgba(230, 200, 110, 0.02));
    border: 1px solid rgba(230, 200, 110, 0.15);
    border-radius: 14px;
    justify-content: space-between;
    flex-wrap: wrap;
    transition: all 0.3s;
}
.gift-toggle-row:hover { border-color: rgba(230, 200, 110, 0.3); }
.gift-toggle-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.gift-toggle-row label i {
    font-size: 20px;
    color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(230, 200, 110, 0.4));
    flex-shrink: 0;
}
.gift-toggle-row .gift-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gift-toggle-row .gift-label.active {
    color: var(--gold);
    font-weight: 800;
}
.gift-hint {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.gift-selected-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 8px 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gift-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #047857);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.gift-summary-icon i { font-size: 20px; color: #fff; }
.gift-summary-info { flex: 1; min-width: 0; }
.gift-summary-title {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 3px;
}
.gift-summary-name {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.gift-summary-sim { font-size: 11px; font-weight: 700; }
.gift-summary-clear {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}
.gift-summary-clear:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

#gift-recipients-area {
    margin-top: 8px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(230, 200, 110, 0.15);
    border-radius: 14px;
    animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-recipients-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.gift-recipients-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
}
.gift-recipients-label i {
    font-size: 16px;
    filter: drop-shadow(0 0 6px rgba(230, 200, 110, 0.4));
}
.gift-recipients-refresh {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
}
.gift-recipients-refresh:hover {
    background: rgba(230, 200, 110, 0.1);
    color: var(--gold);
    transform: rotate(180deg);
}

.gift-recipients-container {
    max-height: 260px;
    overflow-y: auto;
    border-radius: 12px;
    margin-bottom: 10px;
    scrollbar-width: thin;
}
.gift-recipients-container::-webkit-scrollbar { width: 4px; }
.gift-recipients-container::-webkit-scrollbar-thumb {
    background: rgba(230, 200, 110, 0.3);
    border-radius: 4px;
}

.gift-recipient-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s;
    margin-bottom: 6px;
    position: relative;
}
.gift-recipient-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(230, 200, 110, 0.2);
}
.gift-recipient-item.selected {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.04));
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.15);
}
.gift-recipient-item.selected::before {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    color: #0f0c13;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(230, 200, 110, 0.5);
}
.gift-recipient-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #b4942d);
    color: #0f0c13;
    font-weight: 900;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.gift-recipient-info { flex: 1; min-width: 0; }
.gift-recipient-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.gift-recipient-phone {
    font-size: 10px;
    color: var(--text-muted);
    direction: ltr;
    text-align: right;
}
.gift-recipient-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gift-sim-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    border: 1px solid;
}
.gift-sim-badge.excellent {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}
.gift-sim-badge.high {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.3);
}
.gift-sim-badge.medium {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}
.gift-sim-badge.low {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.gift-sim-badge.none {
    background: rgba(160, 160, 160, 0.1);
    color: var(--text-muted);
    border-color: rgba(160, 160, 160, 0.2);
    font-size: 9px;
    padding: 4px 8px;
}

.gift-better-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
}
.gift-better-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(168, 85, 247, 0.15));
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.gift-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.gift-actions .btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 12px;
}

.gift-loading,
.gift-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}
.gift-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(230, 200, 110, 0.15);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.gift-empty i {
    font-size: 40px;
    opacity: 0.4;
    color: var(--gold);
}
.gift-empty span {
    line-height: 1.7;
    max-width: 260px;
}

/* Better Choices Modal */
.better-choices-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
    margin: -4px;
}
.better-choices-list::-webkit-scrollbar { width: 4px; }
.better-choices-list::-webkit-scrollbar-thumb {
    background: rgba(230, 200, 110, 0.3);
    border-radius: 4px;
}
.better-choice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}
.better-choice-item:hover {
    background: rgba(230, 200, 110, 0.06);
    border-color: rgba(230, 200, 110, 0.3);
    transform: translateX(-3px);
}
.better-choice-item:active { transform: scale(0.98); }
.better-choice-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    color: #0f0c13;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(230, 200, 110, 0.4);
}
.better-choice-item img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.better-choice-info { flex: 1; min-width: 0; }
.better-choice-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.better-choice-price {
    font-size: 11px;
    color: var(--gold);
    font-weight: 800;
    margin-bottom: 3px;
}
.better-choice-sim {
    font-size: 10px;
    font-weight: 700;
}
.better-choice-arrow {
    color: var(--text-muted);
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.better-choice-item:hover .better-choice-arrow {
    color: var(--gold);
    transform: translateX(-3px);
}

/* Cart Gift Info */
.cart-gift-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin: 12px 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    animation: slideDown 0.3s ease;
}
.cart-gift-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #047857);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.cart-gift-icon i { color: #fff; font-size: 18px; }
.cart-gift-content { flex: 1; min-width: 0; }
.cart-gift-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.cart-gift-name {
    font-size: 13px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 6px;
}
.cart-gift-remove {
    font-size: 10px;
    color: #f87171;
    background: none;
    border: none;
    padding: 2px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}
.cart-gift-remove:hover { text-decoration: underline; }

/* ============================================================
   ORDERS PAGE
   ============================================================ */
.orders-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    min-width: 0;
}
.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}
.stat-icon.emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.stat-icon.gold {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.stat-icon.rose {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
}
.stat-info { min-width: 0; flex: 1; }
.stat-value {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.2;
}
.stat-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-filter {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.orders-filter::-webkit-scrollbar { display: none; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}
.filter-chip i { font-size: 14px; }
.filter-chip:active { transform: scale(0.95); }
.filter-chip.active {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 15px rgba(230, 200, 110, 0.15);
}

.orders-loading {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}
.orders-loading p {
    font-size: 12px;
    margin-top: 12px;
}
.orders-error {
    text-align: center;
    padding: 30px 20px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}
.orders-error i {
    font-size: 44px;
    color: #ef4444;
    display: block;
    margin-bottom: 12px;
    opacity: 0.7;
}
.orders-error p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.orders-filter-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.orders-filter-empty i {
    font-size: 44px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}
.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(230, 200, 110, 0.3), transparent);
    pointer-events: none;
}
.order-card:hover {
    border-color: rgba(230, 200, 110, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.order-card:active { transform: scale(0.99); }

.order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.order-card-id {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}
.order-card-id i {
    color: var(--gold);
    font-size: 16px;
}
.order-gift-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(244, 63, 94, 0.1));
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.3);
    margin-right: 4px;
}
.order-gift-badge i { font-size: 11px; }

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 12px;
    border: 1px solid;
    white-space: nowrap;
}
.order-status i { font-size: 12px; }
.order-status.status-paid {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}
.order-status.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}
.order-status.status-cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.order-status.status-shipped {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}
.order-status.status-delivered {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.3);
}
.order-status.status-processing {
    background: rgba(230, 200, 110, 0.12);
    color: var(--gold);
    border-color: rgba(230, 200, 110, 0.3);
}

.order-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 11px;
    color: var(--text-secondary);
}
.order-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.order-meta-item i {
    font-size: 13px;
    color: var(--gold);
}

.order-items-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.order-item-thumb {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}
.order-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.order-item-thumb .order-item-qty {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-top-right-radius: 8px;
}
.order-item-thumb.more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(230, 200, 110, 0.1);
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
}

.order-gift-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: 10px;
    padding: 8px 10px;
}
.order-gift-info i {
    color: #f43f5e;
    font-size: 14px;
}
.order-gift-info strong {
    color: #fff;
    font-weight: 800;
}

.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.order-total {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
}
.order-total-label {
    font-size: 11px;
    color: var(--text-muted);
}
.order-total-value {
    font-size: 15px;
    font-weight: 900;
    color: var(--gold);
}
.order-total-currency {
    font-size: 10px;
    color: var(--text-muted);
}
.order-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.06));
    border: 1px solid rgba(230, 200, 110, 0.3);
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.order-detail-btn:hover {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.25), rgba(230, 200, 110, 0.1));
    transform: translateY(-1px);
}
.order-detail-btn:active { transform: scale(0.95); }
.order-detail-btn i { font-size: 14px; }

/* ============================================================
   ORDER DETAIL MODAL
   ============================================================ */
.order-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.order-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(230, 200, 110, 0.3);
}
.order-detail-icon i {
    font-size: 22px;
    color: #0f0c13;
}

.order-detail-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.order-detail-date {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.order-detail-date i { font-size: 12px; color: var(--gold); }

.order-detail-gift {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.1), rgba(244, 63, 94, 0.03));
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 12px;
    margin-bottom: 16px;
}
.order-detail-gift-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f43f5e, #be123c);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}
.order-detail-gift-icon i { color: #fff; font-size: 18px; }
.order-detail-gift-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.order-detail-gift-name {
    font-size: 13px;
    font-weight: 800;
    color: #f43f5e;
}

.order-detail-section {
    margin-bottom: 16px;
}
.order-detail-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.order-detail-section-title i {
    color: var(--gold);
    font-size: 15px;
}

.order-detail-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.order-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}
.order-detail-item img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.order-detail-item-info {
    flex: 1;
    min-width: 0;
}
.order-detail-item-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-detail-item-variant {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.order-detail-item-price {
    font-size: 10px;
    color: var(--text-secondary);
}
.order-detail-item-total {
    font-size: 12px;
    font-weight: 900;
    color: var(--gold);
    white-space: nowrap;
    flex-shrink: 0;
}

.order-detail-prices {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 14px;
}
.order-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 0;
}
.order-price-row.discount {
    color: #f43f5e;
    font-weight: 700;
}
.order-price-row.total {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 6px;
    padding-top: 10px;
    font-size: 13px;
    color: var(--text);
    font-weight: 800;
}
.order-price-row.total strong {
    color: var(--gold);
    font-size: 16px;
    font-weight: 900;
}

.order-detail-tracking {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}
.order-detail-tracking strong {
    color: #60a5fa;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
}

.order-detail-address {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.order-detail-address strong {
    color: var(--text);
    font-weight: 800;
}

/* ============================================================
   LOYALTY CLUB - Complete Styling
   ============================================================ */
.loyalty-hero {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    padding: 32px 20px;
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.15), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(230, 200, 110, 0.25);
    text-align: center;
}
.loyalty-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(230, 200, 110, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.12), transparent 50%);
    pointer-events: none;
}
.loyalty-hero-content {
    position: relative;
    z-index: 1;
}
.loyalty-crown {
    width: 70px;
    height: 70px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37, #b4942d);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(230, 200, 110, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.4);
    animation: floatCrown 4s ease-in-out infinite;
}
@keyframes floatCrown {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}
.loyalty-crown i {
    font-size: 38px;
    color: #0f0c13;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
}
.loyalty-title {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #e6c86e, #d4af37, #b4942d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.loyalty-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.loyalty-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    border: 1.5px solid;
}
.loyalty-tier-badge.tier-bronze {
    background: rgba(180, 130, 90, 0.15);
    color: #d4a373;
    border-color: rgba(180, 130, 90, 0.4);
}
.loyalty-tier-badge.tier-silver {
    background: rgba(200, 200, 220, 0.15);
    color: #c0c0e0;
    border-color: rgba(200, 200, 220, 0.4);
}
.loyalty-tier-badge.tier-gold {
    background: rgba(230, 200, 110, 0.15);
    color: var(--gold);
    border-color: rgba(230, 200, 110, 0.4);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.2);
}

.loyalty-wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.wallet-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.wallet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}
.wallet-card:hover {
    transform: translateY(-2px);
    border-color: rgba(230, 200, 110, 0.3);
}
.wallet-card.tokens-card { color: var(--gold); }
.wallet-card.balance-card { color: #10b981; }
.wallet-card.referral-card { color: #c084fc; }
.wallet-card.tier-card { color: #f59e0b; }

.wallet-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.9;
}
.wallet-icon i {
    font-size: 20px;
    color: #0f0c13;
}
.wallet-info { min-width: 0; flex: 1; }
.wallet-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 2px;
}
.wallet-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.2;
}
.wallet-sub {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 600;
}

.taste-level-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 8px 0 20px;
    margin-bottom: 10px;
}
.taste-level-track::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 0;
}
.taste-level-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.taste-level-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.taste-level-dot i {
    font-size: 20px;
    color: var(--text-muted);
}
.taste-level-step.active .taste-level-dot {
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.5);
}
.taste-level-step.active .taste-level-dot i {
    color: #0f0c13;
}
.taste-level-step.current .taste-level-dot {
    transform: scale(1.15);
    animation: pulseTaste 2s ease-in-out infinite;
}
@keyframes pulseTaste {
    0%, 100% { box-shadow: 0 0 20px rgba(230, 200, 110, 0.5); }
    50% { box-shadow: 0 0 35px rgba(230, 200, 110, 0.8); }
}
.taste-level-label {
    text-align: center;
}
.taste-level-num {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
}
.taste-level-step.active .taste-level-num { color: var(--gold); }
.taste-level-name {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 1px;
}
.taste-level-step.active .taste-level-name { color: var(--text-secondary); }

.taste-info-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(230, 200, 110, 0.06);
    border: 1px solid rgba(230, 200, 110, 0.15);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.taste-info-msg i { color: var(--gold); font-size: 16px; flex-shrink: 0; }
.taste-info-msg.success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
}
.taste-info-msg.success i { color: #10b981; }

.referral-code-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 18px 16px;
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.08), rgba(230, 200, 110, 0.02));
    border: 1.5px dashed rgba(230, 200, 110, 0.35);
    border-radius: 16px;
    margin-bottom: 14px;
}
.referral-code-display {
    font-size: 26px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(230, 200, 110, 0.3);
    direction: ltr;
    padding: 4px 12px;
}
.referral-code-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.referral-link-display { margin-top: 8px; }
.referral-link-display label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}
.referral-link-input {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px;
    align-items: center;
}
.referral-link-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-size: 11px;
    padding: 6px 8px;
    font-family: inherit;
    min-width: 0;
    text-overflow: ellipsis;
}
.referral-link-input button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    color: #0f0c13;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    transition: all 0.2s;
}
.referral-link-input button:active { transform: scale(0.9); }

.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.campaign-card {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.06), rgba(230, 200, 110, 0.02));
    border: 1.5px solid rgba(230, 200, 110, 0.2);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.campaign-card.eligible {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}
.campaign-card.claimed {
    border-color: rgba(160, 160, 160, 0.25);
    opacity: 0.7;
}
.campaign-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.campaign-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.campaign-icon i {
    font-size: 20px;
    color: #0f0c13;
}
.campaign-title-wrap {
    flex: 1;
    min-width: 0;
}
.campaign-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
}
.campaign-condition {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.campaign-condition i { font-size: 12px; color: var(--gold); }
.campaign-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    background: rgba(230, 200, 110, 0.12);
    border-radius: 10px;
    border: 1px solid rgba(230, 200, 110, 0.25);
    flex-shrink: 0;
}
.reward-value {
    font-size: 16px;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
}
.reward-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}
.campaign-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}
.campaign-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.campaign-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
}
.campaign-status.eligible {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.campaign-status.claimed {
    background: rgba(160, 160, 160, 0.15);
    color: #a1a1aa;
}
.campaign-status.not-eligible {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.campaign-end {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.campaign-end i { color: var(--gold); font-size: 12px; }
.campaign-btn {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s;
}
.campaign-btn.active {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.campaign-btn.active:active { transform: scale(0.97); }
.campaign-btn.disabled {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.reward-rules-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reward-rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.25s;
}
.reward-rule-item:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}
.reward-rule-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.reward-rule-icon i {
    font-size: 18px;
    color: #10b981;
}
.reward-rule-info {
    flex: 1;
    min-width: 0;
}
.reward-rule-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
}
.reward-rule-desc {
    font-size: 10px;
    color: var(--text-muted);
}
.reward-rule-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
}
.rule-token {
    font-size: 14px;
    font-weight: 900;
    color: #10b981;
    line-height: 1;
    direction: ltr;
}
.rule-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}

.referrals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.referral-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.25s;
}
.referral-item:hover {
    background: rgba(192, 132, 252, 0.05);
    border-color: rgba(192, 132, 252, 0.2);
}
.referral-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}
.referral-info { flex: 1; min-width: 0; }
.referral-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.referral-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.referral-taste-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid;
}
.referral-taste-badge.level-1 { background: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.referral-taste-badge.level-2 { background: rgba(52, 211, 153, 0.1); color: #10b981; border-color: rgba(52, 211, 153, 0.25); }
.referral-taste-badge.level-3 { background: rgba(230, 200, 110, 0.12); color: var(--gold); border-color: rgba(230, 200, 110, 0.25); }
.referral-taste-badge.level-4 { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border-color: rgba(245, 158, 11, 0.25); }
.referral-taste-badge.level-5 { background: linear-gradient(135deg, rgba(230, 200, 110, 0.2), rgba(168, 85, 247, 0.15)); color: var(--gold); border-color: rgba(230, 200, 110, 0.4); }
.referral-taste-badge.none { background: rgba(160, 160, 160, 0.1); color: var(--text-muted); border-color: rgba(160, 160, 160, 0.2); }
.referral-family {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(230, 200, 110, 0.1);
    color: var(--gold);
    border: 1px solid rgba(230, 200, 110, 0.2);
}
.referral-detail-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
    font-size: 15px;
}
.referral-detail-btn:hover {
    background: rgba(230, 200, 110, 0.15);
    color: var(--gold);
    border-color: rgba(230, 200, 110, 0.3);
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 2px;
}
.transactions-list::-webkit-scrollbar { width: 4px; }
.transactions-list::-webkit-scrollbar-thumb {
    background: rgba(230, 200, 110, 0.3);
    border-radius: 4px;
}
.txn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.25s;
}
.txn-item.incoming {
    border-right: 3px solid #10b981;
}
.txn-item.outgoing {
    border-right: 3px solid #ef4444;
}
.txn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.txn-item.incoming .txn-icon {
    background: rgba(16, 185, 129, 0.15);
}
.txn-item.incoming .txn-icon i { color: #10b981; font-size: 18px; }
.txn-item.outgoing .txn-icon {
    background: rgba(239, 68, 68, 0.15);
}
.txn-item.outgoing .txn-icon i { color: #ef4444; font-size: 18px; }
.txn-info { flex: 1; min-width: 0; }
.txn-reason {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.txn-date {
    font-size: 10px;
    color: var(--text-muted);
}
.txn-amount {
    font-size: 14px;
    font-weight: 900;
    direction: ltr;
    flex-shrink: 0;
}
.txn-amount.incoming { color: #10b981; }
.txn-amount.outgoing { color: #ef4444; }

.loyalty-loading,
.loyalty-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 12px;
}
.loyalty-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.spinner-small {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(230, 200, 110, 0.15);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loyalty-empty i {
    font-size: 44px;
    opacity: 0.3;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
}
.loyalty-empty p {
    margin: 0;
    line-height: 1.6;
}
.loyalty-empty-small {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-muted);
}
.loyalty-empty-small i { font-size: 18px; color: var(--text-muted); }

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    color: #0f0c13;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 900;
    margin-right: auto;
}

.referral-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}
.referral-detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}
.referral-detail-section {
    margin-bottom: 16px;
}
.referral-detail-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.referral-detail-title i {
    color: var(--gold);
    font-size: 16px;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.info-cell {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.info-cell-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 3px;
}
.info-cell-value {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
}
.ai-recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-rec-item {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(168, 85, 247, 0.02));
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 10px;
}
.ai-rec-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 2px;
}
.ai-rec-brand {
    font-size: 10px;
    color: #c084fc;
    font-weight: 700;
    margin-bottom: 4px;
}
.ai-rec-reason {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (min-width: 640px) {
    .loyalty-wallet-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .wallet-card { flex-direction: column; text-align: center; gap: 8px; }
    .wallet-icon { width: 44px; height: 44px; }
    .wallet-icon i { font-size: 22px; }
    .wallet-value { font-size: 20px; }
    .referral-code-box { flex-direction: row; justify-content: space-between; }
    .referral-code-display { font-size: 30px; }
    .taste-level-dot { width: 50px; height: 50px; }
    .taste-level-dot i { font-size: 22px; }
}

@media (max-width: 480px) {
    .loyalty-hero { padding: 24px 14px; }
    .loyalty-crown { width: 60px; height: 60px; }
    .loyalty-crown i { font-size: 32px; }
    .loyalty-title { font-size: 18px; }
    .wallet-value { font-size: 16px; }
    .referral-code-display { font-size: 22px; letter-spacing: 3px; }
    .taste-level-dot { width: 36px; height: 36px; }
    .taste-level-dot i { font-size: 16px; }
    .taste-level-num { font-size: 9px; }
    .taste-level-name { display: none; }
    .info-grid { grid-template-columns: 1fr; }
    .campaign-reward { padding: 5px 9px; }
    .reward-value { font-size: 14px; }
}

/* ============================================================
   SHOP PAGE v3 - Professional
   ============================================================ */
.shop-filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 6px;
}
.shop-filter-tabs::-webkit-scrollbar { display: none; }
.shop-filter-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.shop-filter-tab i { font-size: 16px; }
.shop-filter-tab:active { transform: scale(0.95); }
.shop-filter-tab.active {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.05));
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.15);
}

.shop-count-badge {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.shop-mode-panel {
    animation: fadeInPane 0.3s ease;
}

.taste-panel {
    background: linear-gradient(160deg, rgba(168, 85, 247, 0.06), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
}
.taste-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.taste-panel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(230, 200, 110, 0.3);
}
.taste-panel-icon i {
    font-size: 22px;
    color: #0f0c13;
}
.taste-panel-icon.family {
    background: linear-gradient(135deg, #a855f7, #c084fc);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}
.taste-panel-icon.custom {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.taste-panel-text { flex: 1; min-width: 0; }
.taste-panel-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 3px;
}
.taste-panel-sub {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.slider-wrapper {
    padding: 12px 0 4px;
}
.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
}
.slider-labels strong { color: var(--gold); font-weight: 800; }
.slider-value {
    font-size: 15px;
    font-weight: 900;
    color: var(--gold);
    background: rgba(230, 200, 110, 0.12);
    padding: 3px 12px;
    border-radius: 12px;
    border: 1px solid rgba(230, 200, 110, 0.25);
    min-width: 60px;
    text-align: center;
}
input[type="range"]#taste-slider,
input[type="range"]#family-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(to left,
        rgba(230, 200, 110, 0.4) 0%,
        rgba(230, 200, 110, 0.4) 50%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.08) 100%);
    outline: none;
    margin: 6px 0 10px;
    direction: ltr;
}
input[type="range"]#taste-slider::-webkit-slider-thumb,
input[type="range"]#family-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    cursor: pointer;
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.4);
    border: 3px solid #0f0c13;
    transition: transform 0.15s;
}
input[type="range"]#taste-slider::-webkit-slider-thumb:active,
input[type="range"]#family-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}
input[type="range"]#taste-slider::-moz-range-thumb,
input[type="range"]#family-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6c86e, #d4af37);
    cursor: pointer;
    border: 3px solid #0f0c13;
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.6);
}
.slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    padding: 0 4px;
}

.taste-panel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.taste-stat {
    text-align: center;
}
.taste-stat-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--gold);
    line-height: 1.1;
    margin-bottom: 3px;
}
.taste-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.family-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.family-selector::-webkit-scrollbar { display: none; }
.family-chip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
    min-width: 160px;
    -webkit-tap-highlight-color: transparent;
}
.family-chip:active { transform: scale(0.97); }
.family-chip.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
    border-color: #c084fc;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}
.family-chip[data-no-taste="1"] {
    opacity: 0.6;
}
.family-chip-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #c084fc);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.family-chip.active .family-chip-avatar {
    background: linear-gradient(135deg, #c084fc, #e9d5ff);
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.5);
}
.family-chip-info { min-width: 0; flex: 1; text-align: right; }
.family-chip-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.family-chip-status { font-size: 10px; }
.family-status-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 800;
}
.family-status-level.level-1,
.family-status-level.level-2 {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
.family-status-level.level-3,
.family-status-level.level-4 {
    background: rgba(230, 200, 110, 0.15);
    color: var(--gold);
}
.family-status-level.level-5 {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.25), rgba(168, 85, 247, 0.15));
    color: var(--gold);
}
.family-status-none {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(160, 160, 160, 0.12);
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 700;
}

.custom-presets {
    margin-bottom: 16px;
}
.presets-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 10px;
}
.presets-title i { font-size: 15px; }
.presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.preset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    text-align: right;
    -webkit-tap-highlight-color: transparent;
}
.preset-btn i {
    font-size: 18px;
    color: var(--gold);
    flex-shrink: 0;
}
.preset-btn:active { transform: scale(0.96); }
.preset-btn.active {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.15), rgba(230, 200, 110, 0.05));
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 20px rgba(230, 200, 110, 0.15);
}
.preset-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-sliders {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
}
.custom-slider-row {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    gap: 10px;
    align-items: center;
}
.custom-slider-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}
.custom-slider-icon { font-size: 14px; }
.custom-slider-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    direction: ltr;
}
.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #047857);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
    border: 2px solid #0f0c13;
}
.custom-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #047857);
    cursor: pointer;
    border: 2px solid #0f0c13;
}
.custom-slider-value {
    font-size: 11px;
    font-weight: 800;
    color: #10b981;
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 6px;
    border-radius: 8px;
    min-width: 34px;
}
.custom-actions {
    display: flex;
    gap: 8px;
}

.product-card-media {
    position: relative;
    overflow: hidden;
}
.product-card-media img {
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-media img {
    transform: scale(1.05);
}

.product-similarity-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 900;
    backdrop-filter: blur(8px);
    border: 1px solid;
    z-index: 2;
}
.product-similarity-badge i { font-size: 12px; }
.product-similarity-badge.excellent {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}
.product-similarity-badge.high {
    background: rgba(212, 175, 55, 0.9);
    color: #0f0c13;
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}
.product-similarity-badge.medium {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
    border-color: rgba(245, 158, 11, 0.5);
}
.product-similarity-badge.low {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.5);
}

.product-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.card-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}
.card-action-btn i { font-size: 14px; }
.card-action-btn:active { transform: scale(0.94); }
.card-action-btn.details-btn {
    flex: 1;
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.12), rgba(230, 200, 110, 0.04));
    color: var(--gold);
    border-color: rgba(230, 200, 110, 0.25);
}
.card-action-btn.details-btn:hover {
    background: linear-gradient(135deg, rgba(230, 200, 110, 0.2), rgba(230, 200, 110, 0.08));
}
.card-action-btn.share-btn-card {
    width: 36px;
    padding: 8px;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.2);
}
.card-action-btn.share-btn-card:hover {
    background: rgba(96, 165, 250, 0.2);
}

.share-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.share-modal-header i {
    font-size: 26px;
    color: var(--gold);
}
.share-modal-header h3 {
    font-size: 16px;
    font-weight: 900;
}
.share-product-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin-bottom: 14px;
}
.share-product-preview img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.share-product-info { min-width: 0; flex: 1; }
.share-product-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.share-product-price {
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
}
.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}
.share-option i {
    font-size: 22px;
    color: var(--gold);
}
.share-option:active { transform: scale(0.96); }
.share-option:hover {
    background: rgba(230, 200, 110, 0.08);
    border-color: rgba(230, 200, 110, 0.3);
}

.shop-loading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.shop-skeleton-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    padding-bottom: 12px;
}
.skeleton-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite;
}
.skeleton-line {
    height: 12px;
    margin: 10px 12px 0;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite;
}
.skeleton-line.short { width: 60%; }
@keyframes skeleton-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.shop-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.shop-empty i {
    font-size: 60px;
    opacity: 0.3;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
}
.shop-empty p {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}
.shop-empty-hint {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

@media (min-width: 640px) {
    .presets-grid { grid-template-columns: repeat(4, 1fr); }
    .custom-slider-row { grid-template-columns: 130px 1fr 50px; }
}

@media (max-width: 480px) {
    .shop-filter-tab { padding: 8px 12px; font-size: 11px; }
    .shop-filter-tab i { font-size: 14px; }
    .taste-panel { padding: 14px 12px; }
    .taste-panel-icon { width: 38px; height: 38px; }
    .taste-panel-icon i { font-size: 18px; }
    .taste-panel-title { font-size: 13px; }
    .slider-value { font-size: 13px; padding: 2px 10px; min-width: 52px; }
    .taste-stat-value { font-size: 15px; }
    .family-chip { min-width: 140px; padding: 8px 10px; }
    .family-chip-avatar { width: 32px; height: 32px; font-size: 12px; }
    .custom-slider-row { grid-template-columns: 80px 1fr 34px; gap: 6px; }
    .custom-slider-name { font-size: 10px; }
    .preset-btn { font-size: 10px; padding: 8px 10px; }
    .preset-btn i { font-size: 16px; }
    .share-options { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   SHOP v4 - Taste CTA & Warning tab
   ============================================================ */
.shop-filter-tab.warning-tab {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}
.shop-filter-tab.warning-tab.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.taste-cta-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    margin-top: 8px;
}
.taste-cta-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}
.taste-cta-icon i {
    font-size: 28px;
    color: #fff;
}
.taste-cta-text { max-width: 340px; }
.taste-cta-title {
    font-size: 14px;
    font-weight: 800;
    color: #f59e0b;
    margin-bottom: 6px;
}
.taste-cta-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

@media (min-width: 640px) {
    .taste-cta-inline {
        flex-direction: row;
        text-align: right;
        padding: 20px;
        gap: 18px;
    }
    .taste-cta-text { flex: 1; max-width: none; }
    .taste-cta-text .btn { margin-top: 0; }
    .taste-cta-inline .btn { align-self: center; }
}

/* ============================================================
   45. MOBILE PRODUCT-PAGE OVERFLOW FIXES
   (prevents the page from growing / breaking after load)
   ============================================================ */
.page-product,
.product-info,
.product-gallery,
.product-desc-text,
.media-carousel,
.variant-chips,
.similar-slider-track {
    max-width: 100%;
    min-width: 0;
}

.page-product * {
    min-width: 0;
}

.product-name-large,
.product-card-name,
.cart-item-name,
.order-card-id,
.family-name,
.review-item p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Fix iOS Safari 100vh bug */
@supports (height: 100dvh) {
    .app-main {
        min-height: calc(100dvh - 200px);
    }
    body {
        min-height: 100dvh;
    }
}

/* Lazy-loading image placeholder to prevent layout shift */
.product-card-img,
.media-carousel img,
.similar-item img,
.home-carousel-slide img {
    background-color: rgba(20, 16, 24, 0.5);
    background-image: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.8s ease-in-out infinite;
}
.product-card-img[src]:not([src=""]),
.media-carousel img[src]:not([src=""]),
.similar-item img[src]:not([src=""]),
.home-carousel-slide img[src]:not([src=""]) {
    animation: none;
    background-image: none;
    background-color: transparent;
}

/* ============================================================
   46. RTL / LTR SAFETY
   ============================================================ */
[dir="rtl"] .family-bar-fill.perfume { right: 0; }
[dir="rtl"] .family-bar-fill.user { left: 0; }

/* ============================================================
   END OF STYLESHEET
   ============================================================ */