:root {
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --bg: #f8fafc;
    --surface: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(226, 232, 240, 0.9);
    --blur: blur(25px);
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --wa-color: #25D366;
}

[data-theme="dark"] {
    --bg: #0b0f19;
    --surface: rgba(30, 41, 59, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(51, 65, 85, 0.6);
    --primary-glow: rgba(99, 102, 241, 0.3);
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    margin: 0; 
    background: var(--bg); 
    color: var(--text-main); 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    height: 100dvh; 
    overflow: hidden;
    display: flex; 
    flex-direction: column;
    padding-top: env(safe-area-inset-top); 
    padding-bottom: env(safe-area-inset-bottom);
}

body::before {
    content: ''; 
    position: fixed; 
    top: -10%; 
    left: -10%; 
    width: 120%; 
    height: 60%;
    background: radial-gradient(circle at 50% 0%, var(--primary-glow) 0%, transparent 75%);
    z-index: -1; 
    pointer-events: none;
}

.nav-shop {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 20px 24px; 
    flex-shrink: 0; 
    position: relative; 
    z-index: 100;
}

.btn-back {
    width: 44px; 
    height: 44px; 
    border-radius: 16px; 
    background: var(--surface);
    border: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--text-main); 
    cursor: pointer; 
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: 0 8px 16px rgba(0,0,0,0.03); 
    transition: 0.3s;
}

.btn-back:active { 
    transform: scale(0.9); 
}

.scroll-container { 
    flex: 1; 
    overflow-y: auto; 
    overflow-x: hidden; 
    width: 100%; 
    scroll-behavior: smooth; 
    position: relative; 
}

.scroll-container::-webkit-scrollbar { 
    width: 0; 
}

.content-wrapper { 
    max-width: 500px; 
    margin: 0 auto; 
    padding: 0 24px 100px; 
}

.header-wrapper { 
    position: sticky; 
    top: -1px; 
    z-index: 90; 
    padding: 20px 0 10px; 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

.header-wrapper.scrolled {
    background: var(--surface); 
    backdrop-filter: var(--blur); 
    -webkit-backdrop-filter: var(--blur);
    margin: 0 -24px 16px; 
    padding: 16px 24px; 
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.header h1 { 
    font-size: 34px; 
    font-weight: 900; 
    letter-spacing: -1.5px; 
    margin: 0;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary));
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    transition: all 0.4s ease; 
}

.header-wrapper.scrolled h1 {
    font-size: 20px; 
    letter-spacing: -0.5px;
}

.header p { 
    font-size: 14px; 
    color: var(--text-muted); 
    margin: 8px 0 0; 
    font-weight: 500; 
    line-height: 1.6;
    transition: all 0.4s ease; 
    opacity: 1;
    height: auto;
}

.header-wrapper.scrolled p { 
    height: 0; 
    opacity: 0; 
    margin: 0; 
    overflow: hidden;
}

.filter-tabs {
    display: flex; 
    gap: 10px; 
    margin-bottom: 24px; 
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 8px; 
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar { 
    display: none; 
}

.tab-item {
    flex-shrink: 0;
    padding: 10px 20px; 
    border-radius: 100px; 
    background: var(--surface);
    border: 1px solid var(--border); 
    font-size: 12px; 
    font-weight: 700;
    color: var(--text-muted); 
    white-space: nowrap; 
    cursor: pointer; 
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.tab-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-item:active { 
    transform: scale(0.95); 
    background: var(--text-main);
    color: var(--bg);
}

.shop-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 24px; 
}

.product-card {
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 32px;
    display: flex; 
    flex-direction: column; 
    text-decoration: none; 
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    overflow: hidden; 
    backdrop-filter: var(--blur); 
    -webkit-backdrop-filter: var(--blur);
    opacity: 0; 
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

.product-preview { 
    height: 200px; 
    width: 100%; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    overflow: hidden; 
    background: #111;
    cursor: pointer;
}

.preview-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: 1; 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-overlay {
    position: absolute; 
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6)); 
    z-index: 2;
}

.product-card:hover .preview-img,
.product-card:active .preview-img { 
    transform: scale(1.08); 
}

.floating-badge {
    position: absolute; 
    top: 16px; 
    right: 16px; 
    z-index: 10;
    background: rgba(0, 0, 0, 0.7); 
    color: var(--gold); 
    font-size: 10px; 
    font-weight: 800;
    padding: 6px 12px; 
    border-radius: 100px; 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.4); 
    letter-spacing: 1px;
}

.product-info { 
    padding: 24px; 
    flex: 1; 
}

.product-tag {
    font-size: 10px; 
    font-weight: 800; 
    padding: 6px 12px; 
    border-radius: 100px;
    margin-bottom: 12px; 
    display: inline-block; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    background: rgba(212, 175, 55, 0.1); 
    border: 1px solid rgba(212, 175, 55, 0.3); 
    color: var(--gold); 
}

.product-name { 
    font-size: 20px; 
    font-weight: 800; 
    margin: 0 0 8px; 
    letter-spacing: -0.5px; 
}

.product-desc { 
    font-size: 14px; 
    color: var(--text-muted); 
    line-height: 1.6; 
    margin-bottom: 24px; 
    font-weight: 500;
}

.price-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding-top: 20px; 
    border-top: 1px dashed var(--border); 
}

.price-col { 
    display: flex; 
    flex-direction: column; 
}

.price-strike { 
    font-size: 12px; 
    color: var(--text-muted); 
    text-decoration: line-through; 
    margin-bottom: -4px; 
    font-weight: 600;
}

.price-label { 
    font-family: 'Fira Code', monospace; 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--gold); 
}

.action-buttons { 
    display: flex; 
    gap: 8px; 
    flex-shrink: 0; 
}

.btn-action {
    padding: 10px 16px; 
    border-radius: 12px; 
    font-size: 12px; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
    cursor: pointer; 
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-action:active { 
    transform: scale(0.95); 
}

.btn-demo {
    background: transparent; 
    color: var(--text-main); 
    border: 1px solid var(--border);
}

.btn-order {
    background: var(--gold); 
    color: #000; 
    box-shadow: 0 8px 16px var(--gold-glow); 
}

.royal-card { 
    border: 1px solid rgba(212, 175, 55, 0.4) !important; 
}

.fab-wa {
    position: fixed; 
    bottom: 24px; 
    right: 24px; 
    background: var(--wa-color); 
    color: white;
    width: 56px; 
    height: 56px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4); 
    z-index: 100; 
    transition: transform 0.3s;
    border: none;
    cursor: pointer;
    padding: 0;
}

.fab-wa:active { transform: scale(0.9); }
.fab-wa svg { width: 28px; height: 28px; fill: currentColor; }

@keyframes fadeUp { 
    from { opacity: 0; transform: translateY(30px); } 
    to { opacity: 1; transform: translateY(0); } 
}

#preloader, .preloader, .overlay, #overlay, .loader, .loading-screen {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

button, a, .tab-item, .product-preview, .btn-action {
    position: relative;
    z-index: 99 !important;
    pointer-events: auto !important;
}

@media (min-width: 768px) {
    .content-wrapper { 
        max-width: 900px; 
        padding: 0 40px 100px; 
    }
    .shop-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 32px; 
    }
    .filter-tabs { 
        justify-content: center; 
    }
}

@media (min-width: 1024px) {
    .content-wrapper { 
        max-width: 1200px; 
    }
    .shop-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}
