/* Attack Shark RUSSIA v5.0 — SPA Multi-page + Video */
:root {
    --bg: #1a1a1a;
    --card: #2a2a2a;
    --card-light: #333;
    --accent: #ec6c27;
    --accent-hover: #d45a1a;
    --text: #fff;
    --text2: #aaa;
    --text3: #777;
    --r: 14px;
    --r-sm: 8px;
    --gap: 10px;
    --pad: 14px;
    --nav-h: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); font-family: 'Onest', -apple-system, sans-serif; overflow-x: clip; -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(var(--nav-h) + var(--safe-bottom)); }
img { display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===== PAGE TRANSITIONS ===== */
.page { min-height: calc(100vh - var(--nav-h)); }
.page-forward { animation: slideIn .25s ease; }
.page-back { animation: slideBack .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideBack { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }

/* ===== BOTTOM NAV ===== */
.nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: #111; border-top: 1px solid #2a2a2a;
    display: flex; align-items: center; justify-content: space-around;
}
.nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 12px; position: relative; transition: color .2s;
    color: var(--text3); font-size: 10px; font-weight: 500;
}
.nav-btn.active { color: var(--accent); }
.nav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.ggwp { color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: 1px; }
.nav-btn.ggwp.active { color: var(--accent); }
.nav-btn .badge {
    position: absolute; top: 2px; right: 4px;
    background: var(--accent); color: #fff; font-size: 9px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}
.nav-search svg { stroke: var(--accent); }

/* ===== HOME PAGE ===== */
.home { padding: var(--pad); padding-top: 8px; }

/* Banner — full-width hero image */
.banner {
    width: calc(100% + 2 * var(--pad));
    margin-left: calc(-1 * var(--pad));
    margin-right: calc(-1 * var(--pad));
    margin-top: -8px;
    margin-bottom: 16px;
    overflow: hidden; position: relative; cursor: pointer;
    background: var(--bg);
}
.banner img { width: 100%; height: auto; display: block; }
.banner-css {
    height: 80px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 50%, #d0d0d0 100%);
    position: relative; aspect-ratio: 1; overflow: hidden; background: var(--card);
}
.banner-css::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5l22 12.5v25L30 55 8 42.5v-25z' fill='none' stroke='%23b0b0b0' stroke-width='.5'/%3E%3C/svg%3E") repeat;
    opacity: .4;
}
.banner-logo {
    position: relative; z-index: 1;
    font-size: 22px; font-weight: 900; color: #1a1a1a;
    display: flex; align-items: center; gap: 8px;
}
.banner-logo .shark {
    font-size: 28px; font-weight: 900;
}
.banner-logo .sub { font-size: 14px; font-weight: 700; color: #333; }

/* Section titles */
.section-title {
    font-size: 18px; font-weight: 700; color: var(--text);
    margin: 16px 0 10px;
}
.home-section-title {
    font-size: 13px; font-weight: 600; color: var(--text2);
    text-transform: uppercase; letter-spacing: 1px;
    margin: 20px 0 10px;
}

/* Category grid */
.cat-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
}
.cat-card-wrap {
    cursor: pointer;
}
.cat-card {
    position: relative; border-radius: var(--r); overflow: hidden;
    aspect-ratio: 4/3; background: var(--card);
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .3s; }
.cat-card-wrap:active .cat-card img { transform: scale(1.03); }
.cat-card .cat-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 48px; background: var(--card);
}
.cat-card .cat-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    font-size: 13px; font-weight: 800; color: #fff;
    letter-spacing: .5px;
}
.cat-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 2px;
}
.cat-footer-text {
    display: flex; flex-direction: column; gap: 1px;
}
.cat-footer-name {
    font-size: 14px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100vw / 2 - 60px);
}
.cat-footer-count {
    font-size: 12px; color: var(--text3);
}
.cat-arrow {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cat-arrow svg {
    width: 18px; height: 18px;
}

/* Promo block */
.promo-block {
    margin: 16px 0;
    background: var(--card); border-radius: var(--r);
    padding: 20px; display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.promo-text { font-size: 14px; color: var(--text2); line-height: 1.4; }
.promo-text b { color: var(--accent); }
.promo-btn {
    background: var(--accent); color: #fff; border-radius: var(--r-sm);
    padding: 10px 20px; font-size: 13px; font-weight: 700;
    white-space: nowrap; flex-shrink: 0;
    transition: background .2s;
}
.promo-btn:active { background: var(--accent-hover); }

/* Content grid */
.content-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
    margin-bottom: 16px;
}
.content-card {
    position: relative; border-radius: var(--r); overflow: hidden;
    aspect-ratio: 1; cursor: pointer;
    background: linear-gradient(135deg, #222 0%, #1a1a1a 100%);
}
.content-card img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.content-card:active img { transform: scale(1.03); }
.content-card .content-label {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; color: #fff; text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,.8);
    padding: 10px; line-height: 1.2;
    pointer-events: none;
}
/* Hide label when image loads successfully */
.content-card img + .content-label { display: none; }
.content-card img[style*="display: none"] + .content-label,
.content-card img[style*="display:none"] + .content-label { display: flex !important; }

/* CSS fallback hexagon pattern for content cards */
.content-card-bg {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 30%, #333 0%, #1a1a1a 70%);
    overflow: hidden;
}
.content-card-bg::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 8l28 16v32L40 72 12 56V24z' fill='none' stroke='%23444' stroke-width='.6'/%3E%3C/svg%3E") repeat;
    opacity: .5;
}

/* ===== SUB PAGES ===== */
.subpage { padding-bottom: 20px; }

.top-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 12px var(--pad) 12px var(--pad); padding-right: 52px;
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
}
.back-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--card);
}
.back-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-bar h1 { font-size: 20px; font-weight: 700; flex: 1; }
.top-bar .count { font-size: 14px; color: var(--text2); font-weight: 500; }

/* Search bar */
.search-bar {
    margin: 0 var(--pad) 12px; display: flex; align-items: center; gap: 8px;
    background: var(--card); border-radius: var(--r-sm); padding: 0 12px;
    position: sticky; top: 56px; z-index: 40;
}
.search-bar svg { width: 16px; height: 16px; fill: none; stroke: var(--text3); stroke-width: 2; flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round; }
.search-bar input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text); font-size: 14px; padding: 12px 0;
    font-family: inherit;
}
.search-bar input::placeholder { color: var(--text3); }

/* Products grid */
.products-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
    padding: 0 var(--pad);
}
.p-card {
    background: var(--card); border-radius: var(--r); overflow: hidden;
    cursor: pointer; transition: transform .15s;
}
.p-card:active { transform: scale(.97); }
.p-img {
    position: relative; aspect-ratio: 1; overflow: hidden; background: var(--card);
    display: flex; align-items: center; justify-content: center;
}
.p-img img { width: 100%; height: 100%; object-fit: contain; }
.p-ph { font-size: 48px; display: flex; align-items: center; justify-content: center; }
.badge-new {
    position: absolute; top: 8px; left: 8px;
    background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
    padding: 3px 8px; border-radius: 4px;
}
.badge-code {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.7); color: var(--accent); font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: 4px;
}
.p-info { padding: 10px 12px; }
.p-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-price { font-size: 15px; font-weight: 800; color: var(--accent); }

/* Content list */
.content-list { padding: 0 var(--pad); display: flex; flex-direction: column; gap: 12px; }
.v-card {
    display: flex; flex-direction: column; background: var(--card); border-radius: var(--r);
    overflow: hidden; cursor: pointer; transition: transform .15s;
}
.v-card:active { transform: scale(.98); }
.v-thumb {
    width: 100%; aspect-ratio: 16/10; flex-shrink: 0;
    background: #333; position: relative; overflow: hidden;
}
.v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.3);
}
.v-play svg { width: 36px; height: 36px; fill: #fff; opacity: .9; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.v-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.v-type { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.v-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.empty { padding: 40px 20px; text-align: center; color: var(--text3); font-size: 14px; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.open { display: block; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); animation: fadeIn .2s; }
.modal-sheet {
    position: absolute; bottom: 0; left: 0; right: 0;
    max-height: 90vh; background: var(--bg); border-radius: 20px 20px 0 0;
    overflow-y: auto; animation: sheetUp .3s ease;
    padding: 20px var(--pad) calc(20px + var(--safe-bottom));
}
.modal-close {
    position: sticky; top: 0; float: right; z-index: 1;
    width: 32px; height: 32px; border-radius: 50%; background: var(--card);
    display: flex; align-items: center; justify-content: center;
}
.modal-close svg { width: 16px; height: 16px; fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
/* Fullscreen content detail */
.modal.modal-full .modal-bg { display: none; }
.modal.modal-full .modal-sheet {
    max-height: 100vh; height: 100vh; border-radius: 0;
    padding-top: 0;
}
.modal-full .modal-close {
    position: fixed; top: 12px; right: 12px; z-index: 210;
    background: rgba(0,0,0,.5); backdrop-filter: blur(8px);
}
.modal-full .modal-close svg { stroke: #fff; }
.modal-full #modalBody { padding-top: 0; }
.modal-full .video-container {
    border-radius: 0; margin-bottom: 0;
    width: 100vw; margin-left: calc(-1 * var(--pad));
    padding-bottom: 0; height: 55vh;
}
.modal-full .detail-info {
    padding: 16px var(--pad) calc(16px + var(--safe-bottom));
}
.modal-full .detail-badge { margin-top: 12px; }
.modal-full .modal-name { font-size: 18px; }
.modal-full .modal-desc { font-size: 14px; color: var(--text2); margin-top: 8px; line-height: 1.5; }
.modal-full .modal-actions { margin-top: 16px; }
.modal-full .modal-actions .btn-secondary {
    width: 100%; justify-content: center;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-img-wrap { display: flex; align-items: center; justify-content: center; height: 340px; padding: 16px; box-sizing: border-box; background: var(--card); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; clear: both; position: relative; }
.modal-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.modal-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.modal-badge {
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 4px;
}
.modal-badge.new { background: var(--accent); color: #fff; }
.modal-badge.code { background: var(--card-light); color: var(--accent); }
.modal-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal-price { font-size: 20px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.modal-price-usd { font-size: 14px; color: var(--text3); margin-bottom: 12px; }
.color-selector { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.color-label { font-size: 13px; font-weight: 600; color: var(--text2); margin-right: 2px; }
.color-hint { font-size: 11px; color: var(--text3); margin-left: 4px; }
.color-chip {
    padding: 5px 12px; border-radius: 16px; font-size: 12px; font-weight: 600;
    background: var(--card); color: var(--text2); border: 2px solid rgba(255,255,255,0.12);
    cursor: pointer; transition: all .2s; -webkit-tap-highlight-color: transparent;
}
.color-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(236,108,39,0.35); }
.color-chip:not(.active):hover { border-color: var(--accent); color: var(--text); }
.color-chip:not(.active):active { background: var(--card-light); transform: scale(0.95); }
/* Linked product variants */
.linked-variants { margin: 10px 0 14px; }
.linked-label { font-size: 12px; color: var(--text2); font-weight: 600; display: block; margin-bottom: 6px; }
.linked-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.linked-chip {
    display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px;
    border-radius: 20px; border: 1.5px solid var(--card-light); background: var(--card);
    color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.linked-chip:active { transform: scale(0.96); }
.linked-chip:hover { border-color: var(--accent); }
.linked-chip.linked-active { border-color: var(--accent); background: rgba(255,107,0,0.15); pointer-events: none; }
.linked-thumb { width: 28px; height: 28px; object-fit: contain; border-radius: 50%; }
.modal-img { transition: opacity .25s ease; }
.modal-desc { font-size: 14px; color: var(--text2); line-height: 1.5; margin-bottom: 16px; }
.modal-specs { margin-bottom: 20px; }
.modal-specs h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.spec-row {
    display: flex; justify-content: space-between; padding: 10px 12px;
    background: var(--card); border-radius: var(--r-sm); margin-bottom: 4px;
    font-size: 13px;
}
.spec-row .spec-key { color: var(--text2); }
.spec-row .spec-val { font-weight: 700; word-break: break-word; text-align: right; max-width: 55%; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-primary {
    width: 100%; padding: 14px; border-radius: var(--r-sm);
    background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
    text-align: center; transition: background .2s;
}
.btn-primary:active { background: var(--accent-hover); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-secondary {
    flex: 1; padding: 12px; border-radius: var(--r-sm);
    background: var(--card); color: var(--text); font-size: 13px; font-weight: 600;
    text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-secondary svg { width: 16px; height: 16px; }
.btn-driver {
    flex: 1; padding: 12px; border-radius: var(--r-sm);
    background: #1e3a5f; color: #6db3f2; font-size: 13px; font-weight: 600;
    text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-driver svg { width: 16px; height: 16px; }

/* ===== MENU OVERLAY ===== */
.menu-overlay { position: fixed; inset: 0; z-index: 300; display: none; }
.menu-overlay.open { display: block; }
.menu-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fadeIn .2s; }
.menu-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: 280px; max-width: 85vw;
    background: var(--bg); animation: menuIn .25s ease;
    padding: 20px;
}
@keyframes menuIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.menu-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.menu-head span { font-size: 20px; font-weight: 700; }
.menu-head button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.menu-head button svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.menu-items { display: flex; flex-direction: column; gap: 4px; }
.menu-items button {
    display: flex; align-items: center; gap: 14px; padding: 14px 12px;
    border-radius: var(--r-sm); font-size: 15px; font-weight: 500;
    transition: background .15s; width: 100%; text-align: left;
}
.menu-items button:active { background: var(--card); }
.menu-items button svg { width: 20px; height: 20px; fill: none; stroke: var(--text2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ===== SEARCH OVERLAY ===== */
.search-overlay { position: fixed; inset: 0; z-index: 250; background: var(--bg); display: none; overflow-y: scroll; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.search-overlay.open { display: block; animation: fadeIn .15s; }
.search-head {
    position: sticky; top: 0; z-index: 1; background: var(--bg);
    display: flex; align-items: center; gap: 10px; padding: 10px var(--pad);
    border-bottom: 1px solid #2a2a2a;
}
.search-head button { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-head button svg { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-head input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text); font-size: 16px; font-family: inherit; padding: 10px 0;
}
.search-head input::placeholder { color: var(--text3); }
.search-results { padding: var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-content: start; }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--card-light); color: var(--text); padding: 12px 24px;
    border-radius: var(--r); font-size: 14px; font-weight: 600;
    opacity: 0; transition: all .3s; z-index: 500; white-space: normal; max-width: 90%; text-align: center;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== LOADING ===== */
.loading {
    position: fixed; inset: 0; z-index: 999; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
}
.loading.hide { display: none; }
.spinner {
    width: 32px; height: 32px; border: 3px solid var(--card);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 0; }

/* Driver Popup */
.driver-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.6); z-index: 1100;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn .2s;
}
.driver-popup {
    background: var(--bg-card, #242424); border-radius: 16px;
    padding: 24px; width: 280px; text-align: center;
}
.driver-popup-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.driver-popup-model { font-size: 13px; color: var(--text-sec, #888); margin-bottom: 16px; }
.driver-popup-btn {
    display: block; width: 100%; padding: 12px; border: none;
    border-radius: 10px; font-size: 15px; font-weight: 600;
    cursor: pointer; margin-bottom: 8px; transition: opacity .2s;
}
.driver-popup-btn:active { opacity: .7; }
.driver-popup-btn.web { background: #4a9eff; color: #fff; }
.driver-popup-btn.soft { background: #34c759; color: #fff; }
.driver-popup-btn.close { background: rgba(255,255,255,.1); color: #fff; margin-bottom: 0; }

/* ===== DRIVERS PAGE ===== */
.drv-btns { display: flex; gap: 6px; margin-top: 6px; }
.drv-btns .btn-driver { font-size: 12px; padding: 8px 0; flex: 1; }


/* ===== BIG CONTENT CARDS ===== */
.big-cards-grid {
    display: flex; flex-direction: column; gap: 14px;
    padding: 0 var(--pad);
}
.big-card {
    background: var(--card); border-radius: var(--r); overflow: hidden;
    cursor: pointer; transition: transform .15s;
}
.big-card:active { transform: scale(.98); }
.big-card-img {
    position: relative; width: 100%; aspect-ratio: 4/3;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.big-card-img img { width: 100%; height: 100%; object-fit: contain; }
.big-card-ph {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}
.big-card-ph svg { width: 48px; height: 48px; }
.big-card-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.big-card-play svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.big-card-body { padding: 14px 16px; }
.big-card-type {
    font-size: 11px; font-weight: 700; color: var(--accent);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}
.big-card-title {
    font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 4px;
}
.big-card-desc {
    font-size: 13px; color: var(--text2); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== VIDEO CONTAINER (Rutube embed) ===== */
.video-container {
    position: relative; width: 100%; padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--r); overflow: hidden; margin-bottom: 16px;
    background: #000;
}
.video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

/* Detail thumb (non-video) */
.detail-thumb {
    width: 100%; border-radius: var(--r); overflow: hidden; margin-bottom: 16px;
    background: #333;
}
.detail-thumb img { width: 100%; height: auto; display: block; }

/* Detail badge */
.detail-badge {
    display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
    background: rgba(236, 108, 39, 0.15); padding: 4px 10px; border-radius: 4px;
}

/* Sale button accent in nav */
.nav-btn.sale-btn { color: var(--accent); }
.nav-btn.sale-btn.active { color: var(--accent); }
.nav-btn.sale-btn svg { fill: none; stroke: var(--accent); stroke-width: 1.8; }

/* Sale page */
.sale-page { padding-bottom: 20px; }
.sale-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--card); border-radius: var(--r);
    padding: 10px 14px; margin: 0 var(--pad) 12px;
}
.sale-search svg {
    width: 20px; height: 20px; fill: none; stroke: var(--text2);
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.sale-search input {
    flex: 1; background: none; border: none; color: var(--text);
    font-size: 15px; outline: none; font-family: inherit;
}
.sale-search input::placeholder { color: var(--text2); }
.sale-filters {
    display: flex; gap: 6px; padding: 0 var(--pad) 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.sale-filters::-webkit-scrollbar { display: none; }
.sale-chip {
    white-space: nowrap; padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 500; border: 1px solid rgba(255,255,255,0.12);
    background: transparent; color: var(--text2); cursor: pointer;
    transition: all 0.15s; flex-shrink: 0; font-family: inherit;
}
.sale-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sale-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: var(--gap); padding: 0 var(--pad);
}
.sale-card {
    background: var(--card); border-radius: var(--r); overflow: hidden;
    cursor: pointer; transition: transform 0.15s;
}
.sale-card:active { transform: scale(0.97); }
.sale-card-img {
    width: 100%; aspect-ratio: 1; background: var(--card-light);
    display: flex; align-items: center; justify-content: center;
}
.sale-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sale-noimg { color: var(--text3); }
.sale-noimg svg { width: 40px; height: 40px; }
.sale-card-info { padding: 10px 12px 12px; }
.sale-card-name {
    font-size: 13px; font-weight: 600; color: var(--text);
    line-height: 1.3; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sale-card-condition {
    font-size: 11px; color: var(--text2); margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sale-card-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sale-old-price {
    font-size: 12px; color: var(--text3);
    text-decoration: line-through;
}
.sale-new-price {
    font-size: 15px; font-weight: 700; color: #ff4444;
}

/* Search section titles in global search */
.search-section-title {
    font-size: 12px; font-weight: 700; color: var(--text2);
    text-transform: uppercase; letter-spacing: 1px;
    padding: 8px 0 4px;
}

/* HLS Video Player */
.video-loading {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    background: #222; border-radius: 12px;
}
.video-error {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    color: #e74c3c; font-size: 14px; text-align: center;
    background: #222; border-radius: 12px; padding: 20px;
}
#hlsPlayer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; border-radius: 12px; object-fit: contain;
}
/* Video Controls */
.vp-controls {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    padding: 24px 8px 6px; border-radius: 0 0 12px 12px;
    opacity: 0; transition: opacity .3s; z-index: 5;
}
.vp-controls.vp-visible { opacity: 1; }
.vp-progress {
    height: 4px; background: rgba(255,255,255,.2); border-radius: 2px;
    margin-bottom: 6px; cursor: pointer; position: relative;
}
.vp-progress-bar {
    height: 100%; background: var(--accent, #00c6ff); border-radius: 2px;
    width: 0; transition: width .1s linear;
}
.vp-bottom {
    display: flex; align-items: center; gap: 6px;
}
.vp-btn {
    background: none; border: none; color: #fff; cursor: pointer;
    padding: 4px; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.vp-time {
    font-size: 11px; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.vp-spacer { flex: 1; }
.vp-quality {
    font-size: 11px; font-weight: 700; padding: 2px 6px;
    border: 1px solid rgba(255,255,255,.4); border-radius: 4px;
    color: #fff; background: none; cursor: pointer;
    margin-right: 8px;
    -webkit-tap-highlight-color: transparent;
}
.vp-fullscreen { margin-left: 4px; }
.vp-fullscreen svg { display: block; }
/* Quality Menu */
.vp-quality-menu {
    position: absolute; bottom: 40px; right: 8px;
    background: rgba(20,20,20,.95); border-radius: 8px;
    padding: 4px 0; min-width: 110px; z-index: 20;
    display: none; backdrop-filter: blur(8px);
    max-height: 200px; overflow-y: auto;
}
.vp-quality-menu.vp-qm-open { display: block; }
.vp-qm-item {
    padding: 10px 16px; font-size: 14px; color: #ccc; cursor: pointer;
    white-space: nowrap;
}
.vp-qm-item:active { background: rgba(255,255,255,.1); }
.vp-qm-item.vp-qm-active { color: var(--accent, #00c6ff); font-weight: 700; }
/* CSS Fullscreen (works in TG WebApp) */
.video-container.vp-fs {
    position: fixed !important; top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100vw !important; height: 100vh !important;
    padding-bottom: 0 !important; margin: 0 !important;
    z-index: 99999; border-radius: 0 !important;
    background: #000 !important;
}
.video-container.vp-fs #hlsPlayer {
    border-radius: 0; object-fit: contain;
}
.video-container.vp-fs .vp-controls {
    border-radius: 0; padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.video-container.vp-fs .vp-quality-menu {
    bottom: 48px;
}

.v-desc { font-size: 12px; color: #aaa; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

/* Floating close button — always visible */
.float-close {
    position: fixed; top: 12px; right: 14px; z-index: 200;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(30,30,30,.85); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
    cursor: pointer; transition: transform .15s, background .15s;
}
.float-close:active { transform: scale(.9); background: rgba(50,50,50,.9); }
.float-close svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; fill: none; }

/* Rutube iframe embed */
.rutube-embed {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    background: #000;
    display: block;
}

/* Visual fixes */
.content-label { text-shadow: 0 2px 8px rgba(0,0,0,0.8); }
.cat-card-label { text-shadow: 0 2px 6px rgba(0,0,0,0.7); overflow: hidden; text-overflow: ellipsis; }

/* Share button in product modal */
.btn-share {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; padding: 0;
    transition: background .15s, transform .15s;
}
.btn-share:active { background: rgba(0,0,0,.7); transform: scale(.9); }
.btn-share svg { width: 18px; height: 18px; stroke: #fff; fill: none; }
