:root {
    --ink: #15213c;
    --ink-soft: #5b6680;
    --surface: #ffffff;
    --surface-alt: #f5f7fc;
    --surface-deep: #eef2ff;
    --line: #dfe5f1;
    --brand: #5b5ce2;
    --brand-dark: #3f3fb5;
    --brand-soft: #ececff;
    --accent: #10a889;
    --accent-soft: #dcfaf2;
    --danger: #c9364f;
    --danger-soft: #fff0f2;
    --warning: #b66a00;
    --warning-soft: #fff5df;
    --success: #087a60;
    --success-soft: #e0f8f1;
    --shadow-sm: 0 8px 24px rgba(22, 33, 60, .07);
    --shadow-md: 0 18px 50px rgba(22, 33, 60, .11);
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --container: 1180px;
    --sidebar: 270px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    padding: .78rem .9rem;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(91, 92, 226, .12);
}
input[readonly] { background: var(--surface-alt); color: var(--ink-soft); }
textarea { resize: vertical; min-height: 120px; }
label > span:not(.status-badge) { display: block; margin-bottom: .38rem; color: var(--ink); font-size: .91rem; font-weight: 700; }
code {
    border-radius: 8px;
    background: #eef0f8;
    color: #34366e;
    padding: .18rem .45rem;
    font-size: .88em;
    overflow-wrap: anywhere;
}
h1, h2, h3, h4 { margin: 0 0 .65rem; line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(2.1rem, 5vw, 4.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1rem; }
small { color: var(--ink-soft); }

.container { width: min(calc(100% - 2rem), var(--container)); margin-inline: auto; }
.container.narrow, .narrow { max-width: 760px; }
.section { padding: 5rem 0; }
.section-tight { padding: 2rem 0; }
.section-muted { background: var(--surface-alt); }
.muted { color: var(--ink-soft); }
.danger { color: var(--danger); }
.display-block { display: block; }
.lead { color: var(--ink-soft); font-size: clamp(1.02rem, 2vw, 1.18rem); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .85rem;
    color: var(--brand-dark);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 999px; background: currentColor; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--brand);
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    padding: .68rem 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 10px 24px rgba(91, 92, 226, .18); }
.button:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(91, 92, 226, .28); outline-offset: 3px; }
.button-ghost { background: #fff; color: var(--brand-dark); border-color: var(--line); box-shadow: none; }
.button-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: #c9c9fa; }
.button-ghost.active { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.button-small { min-height: 36px; padding: .48rem .78rem; border-radius: 10px; font-size: .88rem; }
.button-large { min-height: 52px; padding: .85rem 1.35rem; border-radius: 14px; }
.button-block { width: 100%; }
.text-link { color: var(--brand-dark); font-weight: 800; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-button { border: 0; background: transparent; color: inherit; padding: 0; font-weight: 700; }
.inline-form { display: inline-flex; margin: 0; }

/* Public header */
.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid rgba(223, 229, 241, .88);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
}
.topbar { background: #17213e; color: #dce3ff; font-size: .78rem; }
.topbar-inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hotline-links { display: flex; align-items: center; gap: 1.2rem; }
.hotline-links a:hover { color: #fff; }
.header-main { min-height: 76px; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #8d55e8);
    color: #fff;
    font-size: .88rem;
    box-shadow: 0 8px 18px rgba(91, 92, 226, .24);
}
.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.main-nav a { border-radius: 9px; padding: .48rem .62rem; color: #46516a; font-size: .91rem; font-weight: 700; }
.main-nav a:hover { background: var(--surface-alt); color: var(--brand-dark); }
.main-nav a.active, .main-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.header-actions { display: flex; align-items: center; gap: .65rem; }
.language-switch { display: flex; align-items: center; gap: .25rem; color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.language-switch a.active, .language-switch a:hover { color: var(--brand-dark); }
.nav-toggle, .admin-menu-button {
    display: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: .55rem .75rem;
    font-weight: 800;
}

/* Hero and home */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 0%, rgba(110, 92, 240, .22), transparent 36%),
        radial-gradient(circle at 90% 10%, rgba(16, 168, 137, .16), transparent 32%),
        linear-gradient(180deg, #f8f8ff 0%, #fff 100%);
    padding: 5.8rem 0 4.8rem;
}
.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -160px auto;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(91, 92, 226, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(91, 92, 226, .03), 0 0 0 110px rgba(91, 92, 226, .02);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: 4rem; }
.hero-copy h1 { max-width: 770px; }
.hero-copy > p { max-width: 680px; color: var(--ink-soft); font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; filter: drop-shadow(0 28px 38px rgba(39, 51, 92, .16)); }
.hero-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 2.2rem; }
.hero-stat-grid div { border-left: 2px solid #d9daf8; padding-left: .82rem; }
.hero-stat-grid strong, .hero-stat-grid span { display: block; }
.hero-stat-grid strong { font-size: 1.08rem; }
.hero-stat-grid span { color: var(--ink-soft); font-size: .76rem; }
.page-hero { padding: 4.2rem 0 3.2rem; background: linear-gradient(135deg, #f0f0ff, #f8fbff 55%, #edfbf7); border-bottom: 1px solid var(--line); }
.page-hero.small { padding: 2.8rem 0 2.4rem; }
.page-hero.small h1 { font-size: clamp(1.8rem, 4vw, 3rem); }

.filter-panel {
    display: grid;
    grid-template-columns: auto repeat(2, minmax(180px, .9fr)) minmax(240px, 1.5fr) auto;
    gap: .8rem;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}
.filter-heading { align-self: center; padding: 0 .5rem; }
.filter-panel label span { font-size: .75rem; color: var(--ink-soft); }
.filter-search { display: flex; gap: .45rem; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .85rem; }
.category-grid a {
    display: flex;
    align-items: center;
    gap: .8rem;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    padding: .95rem 1rem;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(22, 33, 60, .04);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.category-grid a:hover { transform: translateY(-2px); border-color: #c7c9f5; box-shadow: var(--shadow-sm); }
.category-grid span:first-child { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading h2 { margin-bottom: 0; }
.product-store-section { padding-block: 2.25rem; }
.product-store-section .section-heading { margin-bottom: 1rem; }
.result-count { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .84rem; font-weight: 900; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2rem; row-gap: .45rem; }
.product-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card.product-store-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: .95rem;
    min-width: 0;
    min-height: 112px;
    padding: .72rem 0;
    border: 0;
    border-bottom: 1px solid rgba(18, 26, 49, .07);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color .18s ease, border-color .18s ease;
}
.product-card.product-store-card:hover { transform: none; border-color: rgba(18, 26, 49, .13); box-shadow: none; background: rgba(255,255,255,.38); }
.product-store-icon {
    position: relative;
    display: block;
    width: 88px;
    height: 88px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid rgba(18,26,49,.08);
    border-radius: 21px;
    background: linear-gradient(135deg, #eef0ff, #eefbf8);
    box-shadow: 0 4px 14px rgba(22,33,60,.07);
}
.product-store-icon img { width: 100%; height: 100%; object-fit: cover; transition: transform .22s ease; }
.product-store-card:hover .product-store-icon img { transform: scale(1.025); }
.product-store-copy { min-width: 0; padding: 0; }
.product-store-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.25; letter-spacing: -.018em; }
.product-store-card h3 a:hover { color: var(--brand-dark); }
.product-store-card p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.4; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-store-meta { display: flex; align-items: center; gap: .35rem .55rem; min-width: 0; margin-top: .18rem; color: #7b8291; font-size: .74rem; line-height: 1.3; }
.product-store-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-store-access::before { content: '•'; margin-right: .55rem; color: #b4bac6; }
.product-store-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 40px;
    border-radius: 999px;
    background: #edf3ff;
    color: #1769e8;
    padding: .55rem 1rem;
    font-size: .86rem;
    font-weight: 850;
    white-space: nowrap;
    transition: background-color .16s ease, transform .16s ease, color .16s ease;
}
.product-store-action:hover { background: #e1ebff; color: #0759d6; transform: translateY(-1px); }
.product-store-action:focus-visible { outline: 3px solid rgba(23,105,232,.2); outline-offset: 2px; }
.access-badge, .soft-badge, .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    padding: .3rem .62rem;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.2;
}
.access-demo { background: #e8efff; color: #3158a5; }
.access-free { background: var(--success-soft); color: var(--success); }
.access-paid { background: #fff0e2; color: #a04f00; }
.soft-badge { background: var(--surface-alt); color: var(--ink-soft); }
.stars { color: #f2a50c; letter-spacing: .03em; white-space: nowrap; }
.stars-muted { color: #d5d9e3; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.article-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 1.3rem; box-shadow: var(--shadow-sm); }
.article-card > span { color: var(--ink-soft); font-size: .78rem; }
.article-card h3 { margin-top: .7rem; font-size: 1.2rem; }
.article-card p { color: var(--ink-soft); }
.empty-state { display: grid; place-items: center; min-height: 260px; border: 1px dashed #cfd6e6; border-radius: var(--radius); background: #fbfcff; padding: 2rem; text-align: center; color: var(--ink-soft); }
.empty-state img { width: 170px; margin-bottom: 1rem; }
.empty-state.compact { min-height: 120px; }

/* Product detail */
.product-detail-hero { padding: 4.2rem 0; background: linear-gradient(180deg, #f8f9ff, #fff); }
.product-detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 3.2rem; align-items: start; }
.product-gallery { min-width: 0; }
.product-gallery-modern { position: relative; }
.gallery-stage { position: relative; border-radius: 30px; background: linear-gradient(145deg, #eef1ff 0%, #f8f9ff 45%, #eefaf8 100%); padding: 10px; box-shadow: 0 24px 64px rgba(27, 37, 75, .12); }
.gallery-main { position: relative; overflow: hidden; border: 1px solid rgba(216,221,235,.9); border-radius: 22px; background: linear-gradient(160deg, #111a31, #1d2948); aspect-ratio: 16/10; outline: none; isolation: isolate; }
.gallery-main:focus-visible { box-shadow: 0 0 0 4px rgba(91,92,226,.2); }
.gallery-main > img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; cursor: zoom-in; transition: opacity .18s ease, transform .28s ease; }
.gallery-main > img.is-changing { opacity: .2; transform: scale(.992); }
.gallery-stage-shade { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(7,14,35,0) 62%, rgba(7,14,35,.18)); }
.gallery-toolbar { position: absolute; z-index: 3; top: .8rem; right: .8rem; display: flex; align-items: center; gap: .45rem; }
.gallery-counter, .gallery-expand { border: 1px solid rgba(255,255,255,.66); background: rgba(18,26,49,.72); color: #fff; box-shadow: 0 8px 24px rgba(12,18,35,.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.gallery-counter { display: inline-flex; align-items: center; min-height: 38px; border-radius: 999px; padding: .42rem .72rem; font-size: .76rem; font-weight: 900; }
.gallery-expand { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; padding: 0; font-size: 1.05rem; }
.gallery-expand:hover { background: rgba(18,26,49,.94); transform: translateY(-1px); }
.gallery-arrow { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: rgba(18,26,49,.7); color: #fff; font-size: 2rem; line-height: 1; transform: translateY(-50%); box-shadow: 0 10px 30px rgba(12,18,35,.2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: opacity .16s ease, background-color .16s ease, transform .16s ease; }
.gallery-arrow:hover { background: rgba(18,26,49,.94); transform: translateY(-50%) scale(1.04); }
.gallery-prev { left: .8rem; }
.gallery-next { right: .8rem; }
.gallery-filmstrip { position: relative; margin-top: .85rem; }
.gallery-thumbs { display: flex; gap: .62rem; overflow-x: auto; padding: .18rem .15rem .65rem; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #cfd5e4 transparent; }
.gallery-thumbs::-webkit-scrollbar { height: 6px; }
.gallery-thumbs::-webkit-scrollbar-thumb { border-radius: 999px; background: #cfd5e4; }
.gallery-thumb { position: relative; flex: 0 0 clamp(112px, 22%, 150px); overflow: hidden; border: 2px solid transparent; border-radius: 16px; background: #fff; padding: 3px; scroll-snap-align: center; box-shadow: 0 5px 18px rgba(28,39,70,.06); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease; }
.gallery-thumb:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(28,39,70,.11); }
.gallery-thumb.active, .gallery-thumb[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,92,226,.12), 0 9px 24px rgba(28,39,70,.1); }
.gallery-thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 11px; }
.gallery-thumb-index { position: absolute; z-index: 2; top: 8px; left: 8px; display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: rgba(18,26,49,.72); color: #fff; padding-inline: .35rem; font-size: .68rem; font-weight: 900; backdrop-filter: blur(8px); }
.gallery-lightbox[hidden] { display: none !important; }
.gallery-lightbox { position: fixed; z-index: 1000; inset: 0; display: grid; grid-template-rows: 1fr auto; place-items: center; background: rgba(6,10,23,.88); opacity: 0; padding: clamp(1rem, 3vw, 2.5rem); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: opacity .16s ease; }
.gallery-lightbox.open { opacity: 1; }
.gallery-lightbox-stage { display: grid; place-items: center; width: min(1180px, 88vw); height: min(78vh, 820px); }
.gallery-lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.gallery-lightbox-close, .gallery-lightbox-arrow { position: fixed; z-index: 1002; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.gallery-lightbox-close { top: 1.25rem; right: 1.25rem; width: 46px; height: 46px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.gallery-lightbox-arrow { top: 50%; width: 54px; height: 54px; border-radius: 50%; font-size: 2.2rem; transform: translateY(-50%); }
.gallery-lightbox-prev { left: 1.2rem; }
.gallery-lightbox-next { right: 1.2rem; }
.gallery-lightbox-close:hover, .gallery-lightbox-arrow:hover { background: rgba(255,255,255,.2); }
.gallery-lightbox-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1180px, 88vw); color: #fff; padding-top: .9rem; }
.gallery-lightbox-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-lightbox-meta span { flex: 0 0 auto; color: rgba(255,255,255,.76); font-size: .86rem; font-weight: 800; }
html.gallery-lightbox-open, html.gallery-lightbox-open body { overflow: hidden; }
.product-summary { padding-top: .4rem; }
.product-summary h1 { margin: .15rem 0 .35rem; font-size: clamp(2rem, 4vw, 3.5rem); }
.product-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .55rem; }
.product-store-heading { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1.15rem; align-items: center; margin-bottom: 1.25rem; }
.product-app-icon { width: 112px; height: 112px; object-fit: cover; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-md); }
.product-store-copy { min-width: 0; }
.store-version { display: inline-flex; color: var(--ink-soft); font-size: .82rem; font-weight: 800; }
.rating-line { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; color: var(--ink-soft); font-size: .88rem; }
.product-facts, .payment-facts { display: grid; gap: 0; margin: 1.5rem 0; border-block: 1px solid var(--line); }
.product-facts div, .payment-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .68rem 0; border-bottom: 1px solid #edf0f5; }
.product-facts div:last-child, .payment-facts div:last-child { border-bottom: 0; }
dt { color: var(--ink-soft); font-size: .84rem; }
dd { margin: 0; font-weight: 800; text-align: right; }
.price-large { color: var(--brand-dark); font-size: 1.45rem; font-weight: 900; }
.product-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.product-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr); gap: 1.2rem; align-items: start; }
.card-panel, .form-card, .admin-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}
.prose { overflow-wrap: anywhere; }
.prose p, .prose li { color: #3d4962; }
.prose h2, .prose h3 { margin-top: 1.6rem; }
.rating-picker { display: flex; gap: .15rem; margin-bottom: 1rem; }
.rating-picker button { border: 0; background: transparent; color: #d8dce5; padding: .15rem; font-size: 2rem; line-height: 1; }
.rating-picker button.active, .rating-picker button:hover { color: #f2a50c; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.video-card { display: flex; align-items: center; gap: .8rem; min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 1rem; font-weight: 700; }
.video-card span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; }
.comments-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr); gap: 1.3rem; align-items: start; }
.comment-list, .comment-moderation-list { display: grid; gap: .8rem; }
.comment-card { display: grid; grid-template-columns: 42px 1fr; gap: .8rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.comment-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; }
.comment-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.comment-meta span { color: var(--ink-soft); font-size: .77rem; }

/* Forms */
.stack-form { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.checkbox-label { display: flex; align-items: flex-start; gap: .65rem; }
.checkbox-label input { width: 18px; height: 18px; margin-top: .18rem; flex: 0 0 auto; }
.checkbox-label > span { margin: 0; font-weight: 600; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .65rem; }
.field-error { color: var(--danger); font-size: .78rem; font-weight: 700; }
.validation-summary { border: 1px solid #fac6cf; border-radius: 12px; background: var(--danger-soft); color: var(--danger); padding: .8rem 1rem; }
.validation-summary p { margin: 0; }
.media-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .7rem; }
.media-preview img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.product-media-editor { display: grid; gap: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt); padding: 1.15rem; }
.media-editor-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.media-editor-heading h2 { margin: .15rem 0 0; font-size: 1.25rem; }
.media-editor-heading p { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: .84rem; text-align: right; }
.media-upload-grid { align-items: end; }
.current-icon-card { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: .8rem; }
.current-icon-card img { width: 82px; height: 82px; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
.current-icon-card strong, .current-icon-card small { display: block; }
.current-icon-card small { margin-top: .25rem; color: var(--ink-soft); }
.admin-slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .85rem; }
.admin-slide-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.admin-slide-card > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-bottom: 1px solid var(--line); }
.admin-slide-controls { display: grid; gap: .65rem; padding: .75rem; }
.admin-slide-controls label > span { font-size: .78rem; }
.admin-slide-controls input[type=number] { min-height: 40px; }
.radio-line { display: flex; align-items: center; gap: .55rem; }
.radio-line input { width: 18px; height: 18px; }
.danger-check span { color: var(--danger); }
.existing-video-list { display: grid; gap: .6rem; }
.existing-video-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: .7rem .8rem; }
.existing-video-row a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.captcha-row { display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: .65rem; }
.captcha-row img { border-radius: 10px; }

/* Flash */
.flash-wrap { position: fixed; z-index: 90; top: 92px; right: 1rem; width: min(420px, calc(100% - 2rem)); display: grid; gap: .55rem; pointer-events: none; }
.flash { border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: .8rem 1rem; box-shadow: var(--shadow-md); pointer-events: auto; font-weight: 700; animation: flash-in .25s ease; }
.flash-success { border-color: #a8e3d3; background: var(--success-soft); color: var(--success); }
.flash-error { border-color: #fac6cf; background: var(--danger-soft); color: var(--danger); }
@keyframes flash-in { from { transform: translateY(-8px); opacity: 0; } }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 1.3rem; align-items: start; }
.checkout-product { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1fr); gap: 1.3rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; background: var(--surface-alt); }
.checkout-product img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 14px; }
.payment-page { min-height: 70vh; background: radial-gradient(circle at 50% 0, rgba(91, 92, 226, .13), transparent 42%), var(--surface-alt); }
.payment-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: clamp(1.2rem, 4vw, 2.5rem); box-shadow: var(--shadow-md); text-align: center; }
.payment-card-header h1 { font-size: clamp(1.6rem, 4vw, 2.55rem); }
.payment-status { display: inline-flex; margin: .3rem auto 1rem; border-radius: 999px; padding: .35rem .75rem; font-size: .8rem; font-weight: 900; }
.qr-image { width: min(100%, 360px); margin: 1rem auto; border: 1px solid var(--line); border-radius: 18px; }
.payment-facts { max-width: 520px; margin-inline: auto; text-align: left; }
.payment-note { color: var(--ink-soft); }

/* Status */
.status-active, .status-published, .status-approved, .status-paid { background: var(--success-soft); color: var(--success); }
.status-pending, .status-draft { background: var(--warning-soft); color: var(--warning); }
.status-rejected, .status-failed, .status-suspended, .status-spam { background: var(--danger-soft); color: var(--danger); }
.status-archived, .status-expired, .status-cancelled { background: #eef0f5; color: #596277; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { border-bottom: 1px solid #edf0f5; padding: .8rem .9rem; text-align: left; vertical-align: top; }
th { background: #f8f9fc; color: #5a647b; font-size: .75rem; letter-spacing: .045em; text-transform: uppercase; }
td { font-size: .88rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcff; }
.table-product { display: flex; align-items: center; gap: .75rem; min-width: 220px; }
.table-product img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.table-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: 1.3rem; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .85rem; font-weight: 800; }
.pagination .active { border-color: var(--brand); background: var(--brand); color: #fff; }

/* Footer */
.site-footer { background: #121a31; color: #c6cee2; padding-top: 4rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2rem; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.footer-grid h3 { color: #fff; }
.brand-footer { color: #fff; margin-bottom: .6rem; }
.commerce-box { border: 1px solid #2b3656; border-radius: 15px; padding: 1rem; background: #19233f; }
.footer-bottom { margin-top: 3rem; border-top: 1px solid #29334e; padding: 1.2rem 0; color: #929db6; font-size: .8rem; }

/* Authentication */
.auth-body { background: linear-gradient(135deg, #eef0ff, #f9fbff 45%, #e7faf5); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr); }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5rem); background: #17213e; color: #fff; }
.auth-brand .brand { font-size: 1.2rem; }
.auth-brand h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.auth-brand p { color: #b8c2dd; font-size: 1.08rem; }
.auth-card { width: min(calc(100% - 2rem), 520px); margin: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.94); padding: clamp(1.3rem, 4vw, 2.3rem); box-shadow: var(--shadow-md); }
.auth-card-header { margin-bottom: 1.4rem; }
.auth-card-header h1 { font-size: 2.1rem; }
.auth-back { display: inline-block; margin-top: 1rem; color: var(--brand-dark); font-weight: 800; }

/* Admin */
.admin-body { background: #f4f6fb; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #17213e; color: #c9d1e7; padding: 1.25rem; overflow-y: auto; }
.brand-admin { color: #fff; padding: .25rem .3rem 1.3rem; }
.admin-nav { display: grid; gap: .25rem; }
.admin-nav a { border-radius: 10px; padding: .7rem .8rem; font-weight: 750; }
.admin-nav a:hover { background: #222f52; color: #fff; }
.admin-sidebar-footer { display: grid; gap: .55rem; margin-top: auto; border-top: 1px solid #2d3857; padding: 1rem .75rem 0; }
.admin-main { min-width: 0; }
.admin-header { position: sticky; z-index: 30; top: 0; min-height: 72px; display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); padding: .75rem 1.5rem; }
.admin-header > div:nth-child(2) { display: grid; }
.admin-header span { color: var(--ink-soft); font-size: .78rem; }
.admin-header .language-switch { margin-left: auto; }
.admin-content { padding: 1.5rem; }
.admin-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.admin-page-heading h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
.admin-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.admin-grid-sidebar { display: grid; grid-template-columns: minmax(260px, .32fr) minmax(0, .68fr); gap: 1.2rem; align-items: start; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.panel-heading h2 { font-size: 1.2rem; margin: 0; }
.panel-form { box-shadow: none; border: 0; padding: 0; }
.admin-filter { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; gap: .65rem; align-items: end; margin-bottom: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.stat-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 1.05rem; box-shadow: var(--shadow-sm); }
.stat-card span { display: block; color: var(--ink-soft); font-size: .77rem; }
.stat-card strong { display: block; margin-top: .2rem; font-size: 1.7rem; letter-spacing: -.04em; }
.stat-card-wide { grid-column: span 2; }
.category-admin-list { display: grid; gap: .75rem; }
.category-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
.category-delete-form { align-self: end; }
.comment-moderation-card { border: 1px solid var(--line); border-radius: 15px; padding: 1rem; background: #fff; }
.moderation-form { display: grid; grid-template-columns: minmax(130px, .25fr) minmax(200px, .75fr) auto; gap: .6rem; align-items: end; }
.settings-grid { align-items: start; }
.manager-categories { border: 1px solid var(--line); border-radius: 12px; padding: .9rem; background: var(--surface-alt); }
.account-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }

/* Error */
.error-page { min-height: 65vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.error-code { color: var(--brand); font-size: clamp(5rem, 16vw, 10rem); font-weight: 950; line-height: .9; letter-spacing: -.08em; }

@media (max-width: 1120px) {
    .main-nav { gap: 0; }
    .main-nav a { padding-inline: .45rem; font-size: .84rem; }
    .product-grid, .product-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-heading { grid-column: 1 / -1; }
    .filter-search { grid-column: 1 / -1; }
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .topbar-inner > span { display: none; }
    .topbar-inner { justify-content: flex-end; }
    .nav-toggle { display: inline-flex; margin-left: auto; }
    .header-main { flex-wrap: wrap; min-height: 70px; padding-block: .75rem; }
    .main-nav { display: none; order: 5; width: 100%; flex-direction: column; align-items: stretch; border-top: 1px solid var(--line); padding-top: .7rem; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: .7rem; }
    .header-actions { margin-left: 0; }
    .hero { padding-top: 4rem; }
    .hero-grid, .product-detail-grid, .checkout-grid, .comments-grid, .product-content-grid { grid-template-columns: 1fr; }
    .hero-visual { max-width: 680px; margin-inline: auto; }
    .product-summary { padding-top: 0; }
    .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-shell { display: block; }
    .admin-sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; width: min(310px, 88vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-md); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-menu-button { display: inline-flex; }
    .admin-grid-two, .admin-grid-sidebar, .account-two-columns { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { min-height: 300px; }
    .auth-card { margin-block: 2rem; }
}

@media (max-width: 680px) {
    :root { --radius: 15px; --radius-lg: 20px; }
    .container { width: min(calc(100% - 1.2rem), var(--container)); }
    .section { padding: 3.4rem 0; }
    .section-tight { padding: 1.4rem 0; }
    .product-store-section { padding-block: 1.8rem; }
    .product-store-section .section-heading { margin-bottom: .8rem; }
    .topbar { display: none; }
    .site-header { top: 0; }
    .header-main { gap: .55rem; }
    .brand > span:last-child { font-size: .93rem; }
    .header-actions { order: 4; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); padding-top: .65rem; }
    .hero { padding: 3.3rem 0; }
    .hero-grid { gap: 2rem; }
    .hero-stat-grid { grid-template-columns: 1fr; }
    .hero-stat-grid div { display: flex; align-items: baseline; gap: .6rem; }
    .hero-actions .button { flex: 1 1 150px; }
    .filter-panel, .form-grid.two, .form-grid.three, .admin-filter { grid-template-columns: 1fr; }
    .filter-heading, .filter-search { grid-column: auto; }
    .filter-search { display: grid; grid-template-columns: 1fr; }
    .product-grid, .product-grid-3, .article-grid, .video-grid { grid-template-columns: 1fr; }
    .product-card.product-store-card { grid-template-columns: 76px minmax(0, 1fr) auto; min-height: 96px; gap: .78rem; padding: .6rem 0; }
    .product-store-icon { width: 76px; height: 76px; border-radius: 18px; }
    .product-store-card h3 { font-size: .96rem; }
    .product-store-card p { font-size: .78rem; -webkit-line-clamp: 1; }
    .product-store-meta { font-size: .7rem; }
    .product-store-action { min-width: 62px; min-height: 36px; padding: .45rem .78rem; font-size: .8rem; }
    .gallery-stage { border-radius: 22px; padding: 6px; }
    .gallery-main { border-radius: 17px; }
    .gallery-thumb { flex-basis: 104px; border-radius: 13px; }
    .gallery-arrow { width: 40px; height: 40px; font-size: 1.7rem; }
    .gallery-prev { left: .55rem; }
    .gallery-next { right: .55rem; }
    .gallery-toolbar { top: .55rem; right: .55rem; }
    .gallery-counter { min-height: 34px; padding: .35rem .58rem; }
    .gallery-expand { width: 34px; height: 34px; }
    .gallery-lightbox { padding: .7rem; }
    .gallery-lightbox-stage { width: 94vw; height: 76vh; }
    .gallery-lightbox-meta { width: 94vw; }
    .gallery-lightbox-arrow { top: auto; bottom: 1rem; width: 44px; height: 44px; }
    .gallery-lightbox-prev { left: calc(50% - 52px); }
    .gallery-lightbox-next { right: calc(50% - 52px); }
    .gallery-lightbox-close { top: .75rem; right: .75rem; width: 42px; height: 42px; }
    .product-store-heading { grid-template-columns: 86px minmax(0, 1fr); }
    .product-app-icon { width: 86px; height: 86px; border-radius: 20px; }
    .media-editor-heading { align-items: flex-start; flex-direction: column; }
    .media-editor-heading p { text-align: left; }
    .current-icon-card { grid-template-columns: 72px minmax(0, 1fr); }
    .current-icon-card img { width: 72px; height: 72px; }
    .current-icon-card .danger-check { grid-column: 1 / -1; }
    .existing-video-row { align-items: flex-start; flex-direction: column; }
    .product-actions > * { width: 100%; }
    .product-actions .inline-form { display: flex; }
    .product-actions .inline-form .button { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .checkout-product { grid-template-columns: 1fr; }
    .captcha-row { grid-template-columns: 1fr; }
    .captcha-row img { width: 180px; }
    .flash-wrap { top: 74px; right: .6rem; width: calc(100% - 1.2rem); }
    .admin-content, .admin-header { padding-inline: .8rem; }
    .stat-grid { grid-template-columns: 1fr; }
    .stat-card-wide { grid-column: auto; }
    .moderation-form { grid-template-columns: 1fr; }
    .form-actions .button { flex: 1 1 140px; }
    .auth-brand { min-height: 260px; padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


.recommendation-video {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.recommendation-video-copy h3 {
    margin: .35rem 0 .65rem;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.recommendation-video-copy p {
    margin: 0 0 1.25rem;
    color: var(--ink-soft);
}

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #0f172a;
    box-shadow: var(--shadow-md);
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-grid .video-embed {
    min-height: 220px;
}

@media (max-width: 760px) {
    .recommendation-video {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Progressive JSON catalog loading keeps the original card design. */
[data-catalog-results][aria-busy="true"] {
    opacity: .55;
    pointer-events: none;
    transition: opacity .18s ease;
}

/* Dynamic admin slideshow manager */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.media-editor-actions { display: grid; justify-items: end; gap: .6rem; max-width: 560px; }
.media-editor-actions p { max-width: none; }
.slideshow-page-heading { align-items: center; }
.slideshow-heading-product { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.slideshow-heading-product > img { width: 68px; height: 68px; flex: 0 0 68px; border: 1px solid var(--line); border-radius: 16px; background: #fff; object-fit: cover; box-shadow: var(--shadow-sm); }
.slideshow-heading-product h1 { margin-bottom: .25rem; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.slideshow-heading-product p { margin: 0; color: var(--ink-soft); }
.slideshow-heading-product .eyebrow { margin-bottom: .35rem; }
.admin-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.admin-slideshow-manager { display: block; }
.slideshow-manager-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 1.1rem; align-items: start; }
.slideshow-manager-workspace { display: grid; gap: 1rem; min-width: 0; }
.slideshow-upload-panel, .slideshow-organize-panel, .slideshow-live-preview { padding: 1.2rem; }
.slideshow-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.slideshow-section-heading .eyebrow { margin-bottom: .35rem; }
.slideshow-section-heading h2 { margin-bottom: .25rem; font-size: 1.28rem; }
.slideshow-section-heading p { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: .84rem; }
.compact-heading { align-items: center; }
.slideshow-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 66px; min-height: 36px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); padding: .35rem .65rem; font-size: .8rem; font-weight: 900; }
.slideshow-count-badge.is-limit { background: var(--warning-soft); color: var(--warning); }
.slideshow-dropzone { position: relative; display: grid; place-items: center; min-height: 180px; border: 2px dashed #cbd3e5; border-radius: 18px; background: linear-gradient(145deg, #fafbff, #f4f7ff); padding: 1.35rem; text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.slideshow-dropzone:hover, .slideshow-dropzone.is-dragover { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 12px 30px rgba(91,92,226,.1); }
.slideshow-dropzone.is-dragover { transform: translateY(-2px); }
.slideshow-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.slideshow-dropzone-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: .55rem; border-radius: 14px; background: var(--brand); color: #fff; box-shadow: 0 10px 26px rgba(91,92,226,.22); font-size: 1.7rem; line-height: 1; }
.slideshow-dropzone strong { font-size: .98rem; }
.slideshow-dropzone small { margin-top: .2rem; }
.slideshow-url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: end; margin-top: .9rem; }
.slideshow-url-row .button { margin-bottom: 1px; }
.slideshow-feature-new { margin-top: .75rem; }
.slideshow-existing-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; min-height: 20px; }
.slideshow-admin-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s ease, opacity .18s ease, border-color .18s ease, box-shadow .18s ease; }
.slideshow-admin-card[draggable="true"] { cursor: grab; }
.slideshow-admin-card.is-dragging { opacity: .48; transform: scale(.98); cursor: grabbing; }
.slideshow-admin-card.is-drag-target { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,92,226,.12), var(--shadow-sm); }
.slideshow-admin-card.is-featured { border-color: #a6a7f4; box-shadow: 0 0 0 2px rgba(91,92,226,.09), var(--shadow-sm); }
.slideshow-admin-card.is-removed { opacity: .48; filter: grayscale(.35); }
.slideshow-card-drag { position: absolute; z-index: 4; top: 9px; right: 9px; display: grid; gap: 2px; width: 28px; height: 28px; place-content: center; border: 1px solid rgba(255,255,255,.65); border-radius: 9px; background: rgba(18,26,49,.72); backdrop-filter: blur(9px); }
.slideshow-card-drag span { width: 12px; height: 2px; border-radius: 999px; background: #fff; }
.slideshow-card-image { position: relative; width: 100%; border: 0; background: #eef1f8; padding: 0; }
.slideshow-card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.slideshow-order-number { position: absolute; left: 9px; top: 9px; display: grid; place-items: center; min-width: 27px; height: 27px; border-radius: 999px; background: rgba(18,26,49,.76); color: #fff; padding-inline: .35rem; font-size: .72rem; font-weight: 900; backdrop-filter: blur(9px); }
.slideshow-card-body { display: grid; gap: .3rem; padding: .7rem .75rem .75rem; }
.slideshow-card-body small { font-size: .72rem; }
.slideshow-main-choice { display: flex; align-items: center; gap: .5rem; }
.slideshow-main-choice input { width: 18px; height: 18px; flex: 0 0 18px; }
.slideshow-main-choice span { margin: 0 !important; font-size: .78rem !important; }
.slideshow-remove-button { position: absolute; z-index: 5; right: 8px; bottom: 8px; width: auto; border: 0; border-radius: 9px; background: var(--danger-soft); color: var(--danger); padding: .36rem .55rem; font-size: .72rem; font-weight: 900; }
.slideshow-admin-card.is-removed .slideshow-remove-button { background: var(--success-soft); color: var(--success); }
.slideshow-new-list { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.slideshow-new-list[hidden] { display: none !important; }
.slideshow-new-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.slideshow-new-heading span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 999px; background: var(--accent-soft); color: var(--success); font-weight: 900; }
.slideshow-new-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.slideshow-new-card { position: relative; overflow: hidden; border: 1px solid #bce9de; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); cursor: grab; }
.slideshow-new-card.is-dragging { opacity: .5; }
.slideshow-new-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-alt); }
.slideshow-new-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .45rem; padding: .55rem .6rem; }
.slideshow-new-card-footer strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; }
.slideshow-new-badge { position: absolute; top: 8px; left: 8px; border-radius: 999px; background: rgba(8,122,96,.88); color: #fff; padding: .25rem .5rem; font-size: .65rem; font-weight: 900; backdrop-filter: blur(8px); }
.slideshow-new-remove { flex: 0 0 auto; border: 0; background: transparent; color: var(--danger); padding: .2rem; font-size: .72rem; font-weight: 900; }
.slideshow-empty-state[hidden] { display: none !important; }
.slideshow-live-preview { position: sticky; top: 88px; min-width: 0; }
.slideshow-autoplay-toggle { display: inline-flex; align-items: center; gap: .4rem; width: auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); padding: .36rem .58rem; font-size: .72rem; font-weight: 800; }
.slideshow-autoplay-toggle.is-playing { border-color: #bce9de; background: var(--success-soft); color: var(--success); }
.slideshow-autoplay-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.slideshow-autoplay-toggle.is-playing .slideshow-autoplay-dot { box-shadow: 0 0 0 5px rgba(8,122,96,.1); }
.slideshow-preview-stage { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(150deg, #17213b, #283454); aspect-ratio: 16/10; outline: none; box-shadow: 0 16px 40px rgba(22,33,60,.13); }
.slideshow-preview-stage:focus-visible { box-shadow: 0 0 0 4px rgba(91,92,226,.15), 0 16px 40px rgba(22,33,60,.13); }
.slideshow-preview-stage > img { width: 100%; height: 100%; object-fit: contain; background: #fff; transition: opacity .16s ease, transform .24s ease; }
.slideshow-preview-stage > img.is-changing { opacity: .25; transform: scale(.99); }
.slideshow-preview-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 64%, rgba(8,13,28,.18)); }
.slideshow-preview-counter { position: absolute; z-index: 2; top: .65rem; right: .65rem; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(18,26,49,.7); color: #fff; padding: .33rem .58rem; font-size: .7rem; font-weight: 900; backdrop-filter: blur(10px); }
.slideshow-preview-arrow { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(18,26,49,.68); color: #fff; padding: 0; font-size: 1.65rem; line-height: 1; transform: translateY(-50%); backdrop-filter: blur(10px); }
.slideshow-preview-arrow.previous { left: .55rem; }
.slideshow-preview-arrow.next { right: .55rem; }
.slideshow-preview-arrow:hover { background: rgba(18,26,49,.92); }
.slideshow-preview-filmstrip { display: flex; gap: .45rem; overflow-x: auto; margin-top: .65rem; padding: .15rem .05rem .45rem; scrollbar-width: thin; }
.slideshow-preview-thumb { flex: 0 0 68px; overflow: hidden; border: 2px solid transparent; border-radius: 11px; background: #fff; padding: 2px; opacity: .7; }
.slideshow-preview-thumb.is-active { border-color: var(--brand); opacity: 1; box-shadow: 0 0 0 2px rgba(91,92,226,.1); }
.slideshow-preview-thumb img { width: 100%; aspect-ratio: 16/10; border-radius: 7px; object-fit: cover; }
.slideshow-preview-note { margin: .35rem 0 0; color: var(--ink-soft); font-size: .78rem; }
.slideshow-save-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }

@media (max-width: 1100px) {
    .slideshow-manager-grid { grid-template-columns: 1fr; }
    .slideshow-live-preview { position: relative; top: auto; }
}

@media (max-width: 680px) {
    .media-editor-actions { justify-items: start; max-width: none; }
    .slideshow-page-heading, .slideshow-section-heading { align-items: flex-start; flex-direction: column; }
    .slideshow-heading-product { align-items: flex-start; }
    .admin-heading-actions { width: 100%; justify-content: stretch; }
    .admin-heading-actions .button { flex: 1 1 130px; }
    .slideshow-url-row { grid-template-columns: 1fr; }
    .slideshow-url-row .button { width: 100%; }
    .slideshow-existing-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .slideshow-card-body small { display: none; }
    .slideshow-remove-button { position: static; margin: 0 .65rem .65rem; }
    .slideshow-new-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .slideshow-save-bar { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
    .slideshow-existing-list, .slideshow-new-grid { grid-template-columns: 1fr; }
}


/* Home hero slideshow: preserves the current hero layout and only animates the visual. */
.hero-home-slideshow { position: relative; width: 100%; }
.hero-home-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; }
.hero-home-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translate3d(14px, 0, 0) scale(.992);
    transition: opacity .55s ease, transform .55s ease;
    pointer-events: none;
}
.hero-home-slide.is-active { opacity: 1; transform: translate3d(0, 0, 0) scale(1); pointer-events: auto; }
.hero-slide-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(213, 220, 237, .9);
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    color: var(--ink);
    box-shadow: 0 10px 26px rgba(22, 33, 60, .12);
    transform: translateY(-50%);
    opacity: .72;
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.hero-home-slideshow:hover .hero-slide-arrow,
.hero-slide-arrow:focus-visible { opacity: 1; }
.hero-slide-arrow:hover { background: #fff; }
.hero-slide-arrow.previous { left: .25rem; }
.hero-slide-arrow.next { right: .25rem; }
.hero-slide-dots { display: flex; justify-content: center; align-items: center; gap: .45rem; margin-top: .7rem; }
.hero-slide-dot {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: #c8cce0;
    padding: 0;
    transition: width .2s ease, background-color .2s ease;
}
.hero-slide-dot.is-active { width: 24px; background: var(--brand); }
.home-slideshow-heading > img { object-fit: contain; background: linear-gradient(135deg, #f4f4ff, #effbf8); }
.home-slideshow-admin-preview img { object-fit: contain; background: linear-gradient(135deg, #f7f7ff, #f1fbf8); }

@media (max-width: 720px) {
    .hero-slide-arrow { width: 38px; height: 38px; }
    .hero-slide-arrow.previous { left: 0; }
    .hero-slide-arrow.next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-home-slide { transition: none; transform: none; }
}

/* Homepage hero content manager */
.home-content-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.home-content-heading p { max-width: 760px; margin-bottom: 0; }
.home-content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 1.25rem; align-items: start; }
.home-content-editor { display: grid; gap: 1.25rem; }
.home-content-action-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.home-content-action-card,
.home-content-stat-card { display: grid; gap: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: #fbfcff; }
.home-content-action-card > strong,
.home-content-stat-card > strong { color: var(--ink); }
.home-content-stat-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.home-content-preview-sticky { position: sticky; top: 1rem; overflow: hidden; }
.home-content-preview-heading { align-items: flex-start; }
.home-content-language-tabs { display: inline-flex; padding: .2rem; border: 1px solid var(--line); border-radius: 999px; background: #f4f6fb; }
.home-content-language-tabs button { min-width: 42px; padding: .38rem .65rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; font-weight: 800; cursor: pointer; }
.home-content-language-tabs button.is-active { background: #fff; color: var(--brand); box-shadow: 0 4px 12px rgba(39, 51, 92, .09); }
.home-content-live-preview { position: relative; overflow: hidden; padding: 1.45rem; border: 1px solid #e3e6f5; border-radius: 22px; background: linear-gradient(135deg, #f5f2ff 0%, #fff 55%, #effcfb 100%); }
.home-content-live-preview::after { content: ''; position: absolute; width: 180px; height: 180px; right: -90px; bottom: -90px; border: 1px solid rgba(89, 82, 232, .15); border-radius: 50%; pointer-events: none; }
.home-content-live-preview .eyebrow { position: relative; z-index: 1; }
.home-content-live-preview h3 { position: relative; z-index: 1; margin: .75rem 0 .65rem; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.04; letter-spacing: -.04em; }
.home-content-live-preview > p { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); line-height: 1.65; }
.home-content-preview-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.1rem; }
.home-content-preview-actions .button { pointer-events: none; }
.home-content-preview-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 1.3rem; }
.home-content-preview-stats div { min-width: 0; padding-left: .7rem; border-left: 2px solid #d9daf8; }
.home-content-preview-stats strong,
.home-content-preview-stats span { display: block; overflow-wrap: anywhere; }
.home-content-preview-stats strong { font-size: .95rem; }
.home-content-preview-stats span { margin-top: .18rem; color: var(--ink-soft); font-size: .72rem; }
.home-content-preview-note { margin: .8rem 0 0; font-size: .8rem; }
.home-content-savebar { position: sticky; z-index: 20; bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 14px 34px rgba(26, 35, 70, .12); backdrop-filter: blur(12px); }
.home-content-savebar div { display: grid; gap: .12rem; }
.home-content-savebar span { color: var(--ink-soft); font-size: .82rem; }
@media (max-width: 1100px) {
    .home-content-grid { grid-template-columns: 1fr; }
    .home-content-preview-sticky { position: static; }
}
@media (max-width: 760px) {
    .home-content-heading { align-items: flex-start; flex-direction: column; }
    .home-content-action-editor,
    .home-content-stat-editor { grid-template-columns: 1fr; }
    .home-content-preview-stats { grid-template-columns: 1fr; }
    .home-content-preview-stats div { display: flex; align-items: baseline; gap: .45rem; }
    .home-content-savebar { align-items: stretch; flex-direction: column; bottom: .5rem; }
    .home-content-savebar .button { width: 100%; }
}

/* v3.8 — Hero slideshow prominence and responsive presentation. */
.hero-visual {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-home-slideshow {
    position: relative;
    isolation: isolate;
    width: min(100%, 760px);
    margin-inline: auto;
}
.hero-home-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid rgba(216, 221, 239, .95);
    border-radius: 32px;
    background:
        radial-gradient(circle at 15% 10%, rgba(91, 92, 226, .16), transparent 34%),
        radial-gradient(circle at 90% 90%, rgba(16, 168, 137, .13), transparent 34%),
        #f6f7fb;
    box-shadow: 0 28px 65px rgba(26, 38, 72, .18), 0 4px 16px rgba(26, 38, 72, .08);
}
.hero-home-stage::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    height: 26%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(10, 18, 38, .12));
}
.hero-visual .hero-home-slide {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    filter: none;
    transform: translate3d(22px, 0, 0) scale(1.025);
    transition: opacity .6s ease, transform .7s cubic-bezier(.22,.61,.36,1);
}
.hero-visual .hero-home-slide.is-active {
    transform: translate3d(0, 0, 0) scale(1.002);
}
.hero-slide-arrow {
    z-index: 5;
    width: 48px;
    height: 48px;
    border-color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 12px 30px rgba(14, 24, 54, .2);
    opacity: .94;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.hero-slide-arrow.previous { left: 1rem; }
.hero-slide-arrow.next { right: 1rem; }
.hero-slide-arrow:hover { transform: translateY(-50%) scale(1.06); }
.hero-slide-dots {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    margin: 0;
    padding: .5rem .65rem;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 24px rgba(16, 26, 52, .14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.hero-slide-dot {
    width: 8px;
    height: 8px;
    background: #aeb4c8;
    cursor: pointer;
}
.hero-slide-dot.is-active { width: 28px; background: var(--brand); }
.hero-slide-counter {
    position: absolute;
    z-index: 6;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    min-height: 34px;
    padding: .36rem .68rem;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: rgba(14, 24, 50, .68);
    color: #fff;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(11, 20, 42, .16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.hero-slide-counter strong { font-size: .85rem; }

@media (max-width: 900px) {
    .hero-grid { gap: 2.5rem; }
    .hero-visual { width: 100%; max-width: 760px; }
    .hero-home-slideshow { width: 100%; }
    .hero-home-stage { border-radius: 28px; }
}

@media (max-width: 680px) {
    .hero-grid { gap: 1.45rem; }
    .hero-visual { width: 100%; max-width: none; margin: .2rem auto 0; }
    .hero-home-stage {
        aspect-ratio: 4 / 3;
        min-height: 230px;
        border-radius: 22px;
        box-shadow: 0 20px 42px rgba(26, 38, 72, .16), 0 3px 12px rgba(26, 38, 72, .07);
    }
    .hero-slide-arrow { width: 42px; height: 42px; font-size: 1.55rem; }
    .hero-slide-arrow.previous { left: .65rem; }
    .hero-slide-arrow.next { right: .65rem; }
    .hero-slide-dots { bottom: .72rem; padding: .42rem .55rem; }
    .hero-slide-counter { top: .72rem; right: .72rem; min-height: 30px; padding: .3rem .58rem; font-size: .7rem; }
}

@media (max-width: 430px) {
    .hero-home-stage { min-height: 245px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual .hero-home-slide { transition: none; transform: none; }
}
