/* =====================================================================
   RO-Source-Hub — theme v3
   ===================================================================== */
:root {
    --bg: #0b0a16;
    --bg-2: #121028;
    --surface: rgba(255, 255, 255, .045);
    --surface-2: rgba(255, 255, 255, .08);
    --line: rgba(255, 255, 255, .11);
    --line-strong: rgba(255, 255, 255, .2);
    --text: #f2eee3;
    --muted: #a9a4b8;
    --gold: #e8b23a;
    --gold-2: #f6d27a;
    --gold-dim: rgba(232, 178, 58, .18);
    --teal: #3fd3cc;
    --teal-dim: rgba(63, 211, 204, .16);
    --danger: #ff6b6b;
    --ok: #5fe09a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 14px 40px rgba(0, 0, 0, .45);
    --display: "Cinzel", "Trajan Pro", Georgia, serif;
    --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(900px 500px at 10% -10%, rgba(232, 178, 58, .10), transparent 60%),
        radial-gradient(900px 600px at 100% 10%, rgba(63, 211, 204, .08), transparent 60%);
    background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .02em; line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: clamp(26px, 3.4vw, 38px); }
h2 { font-size: clamp(18px, 2.2vw, 24px); }
h3 { font-size: 16px; }
code, pre { font-family: var(--mono); }
.container { width: min(1180px, 92vw); margin: 0 auto; }
main { padding: 22px 0 64px; }
.section { margin: 20px 0 32px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 20px; }
.wrap { flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.center { text-align: center; justify-content: center; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.space-between { justify-content: space-between; }
.inline { display: inline-flex; }
.narrow { width: min(460px, 94vw); margin: 0 auto; }
.narrow-ish { width: min(720px, 94vw); margin-left: auto; margin-right: auto; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(11, 10, 22, .78);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { color: var(--text); }
.brand-logo { height: 30px; width: 30px; object-fit: contain; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: .06em; }
.brand-name em { font-style: normal; color: var(--gold); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
    padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; color: var(--text);
    border-bottom: 2px solid transparent; transition: background .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { color: var(--gold-2); border-bottom-color: var(--gold); }
.nav-cta { background: var(--gold); color: #1a1405; font-weight: 700; }
.nav-cta:hover { background: var(--gold-2); color: #1a1405; }
.admin-link { color: var(--teal); }
.points-badge {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px;
    padding: 6px 12px; border-radius: 999px; background: var(--gold-dim); color: var(--gold-2); border: 1px solid rgba(232, 178, 58, .4);
}
.points-badge::before { content: "◆"; font-size: 10px; }
.btn-link { background: none; border: none; cursor: pointer; font: inherit; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); line-height: 1.5; vertical-align: middle; }
.pill-ok { background: rgba(95, 224, 154, .16); color: var(--ok); }
.pill-bad { background: rgba(255, 107, 107, .18); color: #ffb1b1; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); font-size: 20px; border-radius: var(--radius-sm); padding: 4px 12px; cursor: pointer; }
@media (max-width: 760px) {
    .header-row { flex-wrap: wrap; }
    .nav-toggle { display: inline-flex; }
    .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 8px; }
    .nav .inline { display: flex; }
    .nav .btn-link { width: 100%; text-align: left; }
    body.nav-open .nav { display: flex; }
    .points-badge { align-self: flex-start; }
}

/* ---------- flash / alerts ---------- */
.flash, .alert { margin: 8px 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); border-left-width: 4px; }
.flash-ok, .alert.ok { border-left-color: var(--ok); }
.flash-err, .alert.error { border-left-color: var(--danger); }
.flash-info { border-left-color: var(--teal); }
.alert.warn { border-left-color: var(--gold); }
.alert a { color: var(--gold-2); text-decoration: underline; }

/* ---------- cards / grid ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid + .grid, .card + .card, .card + .grid, .grid + .card { margin-top: 16px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid, .grid.two, .grid.three { grid-template-columns: 1fr; } .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
.empty { padding: 32px; text-align: center; }
.empty a { color: var(--gold-2); text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: 14px;
    border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: rgba(255, 255, 255, .13); color: var(--text); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.btn.primary:hover { background: var(--gold-2); border-color: var(--gold-2); color: #1a1405; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.danger { border-color: rgba(255, 107, 107, .45); color: #ffb1b1; background: rgba(255, 107, 107, .08); }
.btn.danger:hover { background: rgba(255, 107, 107, .18); }
.btn.dark { background: #111; color: #fff; border-color: #111; }
.btn.dark:hover { background: #222; color: #fff; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 10px; }
.form label { color: var(--muted); font-size: 13px; }
.form input, .form textarea, .form select, .filters input, .filters select, .qty {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
    background: rgba(0, 0, 0, .28); color: var(--text); font: inherit; outline: none;
}
.form input:focus, .form textarea:focus, .filters input:focus, .filters select:focus { border-color: var(--gold); }
.form textarea { resize: vertical; }
.form input[type=file] { padding: 8px; }
.form .check { display: flex; align-items: center; gap: 8px; color: var(--text); padding: 10px 0; }
.form .check input { width: auto; }
.form-preview { margin-top: 8px; max-height: 120px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
select { color-scheme: dark; }
.filters { display: grid; grid-template-columns: 1.4fr .8fr .8fr auto auto; gap: 10px; align-items: center; margin: 12px 0 14px; }
@media (max-width: 760px) { .filters { grid-template-columns: 1fr 1fr; } .filters input[type=search] { grid-column: 1 / -1; } }
.auth-card { padding: 28px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card .btn { margin-top: 6px; }
.note { margin-top: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--muted); font-size: 13px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.table td.right, .table th.right { text-align: right; }
.table.compact td { padding: 6px 6px; font-size: 14px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.top-border { border-top: 1px solid var(--line); }
.pad { padding-top: 12px; margin-top: 12px; }
.pos { color: var(--ok); }
.neg { color: #ffb1b1; }
.price { color: var(--gold-2); font-weight: 700; }
.price::before { content: "◆ "; font-size: .75em; }
.price.huge { font-size: 30px; margin: 8px 0 12px; }

/* ---------- HOME HERO ---------- */
.home-hero {
    position: relative; isolation: isolate; overflow: hidden;
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    margin-top: -22px;
    min-height: 78vh; display: flex; align-items: center;
}
.home-hero__bg {
    position: absolute; inset: 0; z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(11, 10, 22, .96) 0%, rgba(11, 10, 22, .82) 38%, rgba(11, 10, 22, .35) 70%, rgba(11, 10, 22, .55) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 28%),
        var(--hero-bg);
    background-size: cover; background-position: center 30%; background-repeat: no-repeat;
}
.home-hero__inner { width: min(1180px, 92vw); margin: 0 auto; padding: 90px 0 70px; }
.home-hero__kicker { font-family: var(--display); font-size: 13px; letter-spacing: .3em; color: var(--gold); margin-bottom: 14px; }
.home-hero__title { font-size: clamp(42px, 7vw, 86px); line-height: .95; margin: 0 0 18px; max-width: 12ch; text-shadow: 0 8px 40px rgba(0, 0, 0, .7); }
.home-hero__title em { font-style: normal; color: var(--gold); }
.home-hero__desc { max-width: 56ch; font-size: 17px; color: #d9d4c9; margin: 0 0 24px; }
.hero-actions { margin: 0; }
.hero-actions .btn { padding: 12px 22px; font-size: 15px; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 14px; }
.hero-devs { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 40px; }
.hero-devs__label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.hero-devs img { height: 42px; width: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .7)); }
@media (max-width: 760px) {
    .home-hero { min-height: auto; }
    .home-hero__bg { background-image: linear-gradient(180deg, rgba(11, 10, 22, .55) 0%, rgba(11, 10, 22, .9) 70%, var(--bg) 100%), var(--hero-bg); }
    .home-hero__inner { padding: 70px 0 40px; }
    .hero-devs img { height: 34px; }
}

/* stats strip */
.stat-strip {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    margin: -10px 0 36px;
}
.stat-strip > div { padding: 18px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip .v { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--text); }
.stat-strip .v a { color: var(--gold); border-bottom: 2px solid var(--gold); }
.stat-strip .l { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } .stat-strip > div:nth-child(2) { border-right: 0; } .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* category tiles */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--gold-2); font-size: 14px; }
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.cat-tile {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px;
    padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
    transition: border-color .15s, transform .15s; overflow: hidden;
}
.cat-tile::before { content: attr(data-glyph); position: absolute; right: 12px; top: 8px; font-size: 42px; opacity: .14; font-family: var(--display); font-weight: 700; }
.cat-tile:hover { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }
.cat-tile .n { font-family: var(--display); font-weight: 700; font-size: 16px; }
.cat-tile .c { font-size: 13px; color: var(--muted); }
@media (max-width: 980px) { .cat-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-tiles { grid-template-columns: repeat(2, 1fr); } .cat-tile { min-height: 96px; } }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { padding: 22px 20px; border-right: 1px solid var(--line); background: var(--surface); }
.step:last-child { border-right: 0; }
.step-num { font-family: var(--display); font-size: 13px; color: var(--gold); letter-spacing: .2em; margin-bottom: 8px; }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.step a { color: var(--gold-2); text-decoration: underline; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .step { border-right: 0; border-bottom: 1px solid var(--line); } .step:last-child { border-bottom: 0; } }

/* ---------- products ---------- */
.products-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 4px; }
.products-head h1 { margin: 0; }
.products-quickcats { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.products-quickcats .qc { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; line-height: 1; transition: background .15s; }
.products-quickcats .qc:hover { background: var(--surface-2); color: var(--text); }
.products-quickcats .qc.active { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.results-count { margin: -4px 0 12px; }
.product-card { padding: 0; overflow: hidden; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; }
.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.product-thumb { display: block; aspect-ratio: 4 / 3; background: rgba(0, 0, 0, .3); border-bottom: 1px solid var(--line); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }
.product-meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.product-cat { font-size: 12px; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.product-detail { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; }
.product-thumb.big { aspect-ratio: auto; height: 340px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.product-thumb.big img { object-fit: contain; }
.thumb-placeholder.big { height: 100%; }
.desc pre { white-space: pre-wrap; word-break: break-word; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-family: var(--sans); font-size: 14px; color: #d9d4c9; margin: 0 0 16px; }
.crumbs { margin-bottom: 12px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--gold-2); }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } .product-thumb.big { height: 240px; } }

/* cart / downloads */
.cart-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; margin-right: 10px; vertical-align: middle; border: 1px solid var(--line); }
.cell-product a { font-weight: 600; }
.dl-list { list-style: none; padding: 0; margin: 12px 0 20px; }
.dl-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- Graphic design white surface (kept) ---------- */
.designs-banner { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); background: #000; }
.designs-banner__inner { max-width: 1200px; margin: 0 auto; padding: 22px 18px; }
.designs-banner h1 { margin: 0; color: #fff; }
.designs-surface { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); background: #fff; color: #111; padding: 26px 0 60px; }
.designs-surface__inner { max-width: 1200px; margin: 0 auto; padding: 0 18px; }
.designs-toolbar { display: flex; gap: 12px; align-items: center; margin: 10px 0 22px; }
.designs-toolbar input { flex: 1; min-width: 220px; padding: 12px 14px; border-radius: 10px; border: 1px solid #e5e7eb; outline: none; font: inherit; }
.designs-toolbar input:focus { border-color: #c7c9d1; }
.designs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 1050px) { .designs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .designs-grid { grid-template-columns: 1fr; } .designs-toolbar { flex-direction: column; align-items: stretch; } }
.design-thumb { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #e5e7eb; background: #f9fafb; }
.design-thumb a { display: block; aspect-ratio: 16 / 10; }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.design-thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #6b7280; font-weight: 700; }
.design-add { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.design-add button { width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer; background: var(--gold); font-size: 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.design-meta { padding-top: 12px; }
.design-title a { color: #111; font-weight: 800; font-size: 18px; }
.design-title a:hover { color: #111; text-decoration: underline; }
.design-sub { margin-top: 4px; color: #6b7280; font-size: 13px; }
.design-points { margin-top: 10px; font-weight: 900; color: #111; }
.designs-empty { padding: 18px; border: 1px solid #e5e7eb; border-radius: 12px; color: #374151; background: #f9fafb; }

/* ---------- lightbox ---------- */
.img-lightbox[hidden] { display: none !important; }
.img-lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .85); }
.img-lightbox__inner { max-width: min(1200px, 96vw); max-height: 90vh; }
.img-lightbox__inner img { max-width: 96vw; max-height: 90vh; border-radius: 10px; display: block; background: #000; box-shadow: 0 24px 80px rgba(0, 0, 0, .7); }
.img-lightbox__close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .4); color: #fff; font-size: 28px; line-height: 40px; cursor: pointer; z-index: 10000; }

/* ---------- admin ---------- */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 10px 0 2px; padding: 6px; border-radius: var(--radius); border: 1px solid rgba(63, 211, 204, .3); background: var(--teal-dim); }
.admin-nav a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.admin-nav a:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.admin-nav a.active { background: var(--teal); color: #041a19; }
.admin-nav .push { margin-left: auto; background: var(--gold); color: #1a1405; }
.admin-search { grid-template-columns: 1fr auto auto; margin-top: 0; }
.badge { font-size: 12px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 14px 16px; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-family: var(--display); font-size: 26px; font-weight: 700; margin-top: 2px; }
.points-form { flex-wrap: wrap; }
.points-form select, .points-form .qty { width: auto; min-width: 90px; padding: 6px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .28); color: var(--text); font: inherit; }
.points-form .reason { min-width: 160px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.footer-row a { color: var(--gold-2); text-decoration: underline; }
.muted a { color: var(--gold-2); text-decoration: underline; }

/* ---------- gallery / items sold separately (from VPS build) ---------- */
/* ---- product gallery (multiple previews / GIFs) ---- */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.product-gallery__item {
    display: block;
    height: 200px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(0, 0, 0, .25);
    transition: transform .15s, opacity .15s;
}
.product-gallery__item:hover { transform: translateY(-2px); opacity: .92; }
.product-gallery__item img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: auto; }
@media (max-width: 760px) {
    .product-gallery { grid-template-columns: repeat(2, 1fr); }
    .product-gallery__item { height: 150px; }
}
.gallery-admin { margin: 14px 0; }
.gallery-admin .mt { margin-top: 10px; display: block; }
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.gallery-admin-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    text-align: center;
    background: rgba(0, 0, 0, .15);
}
.gallery-admin-item img { width: 100%; height: 110px; object-fit: contain; display: block; background: rgba(0,0,0,.25); border-radius: 8px; }
.gallery-admin-item .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 6px 0; }

/* ---- items sold separately ---- */
.variant-card { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: rgba(0,0,0,.12); transition: border-color .15s, box-shadow .15s; }
.variant-card .product-gallery__item { height: 170px; border: 0; border-radius: 10px; }
.variant-card.is-selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,178,58,.25); }
.variant-card.is-owned { border-color: rgba(95,224,154,.6); }
.variant-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.variant-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant-pick { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px; user-select: none; }
.variant-pick input { width: 18px; height: 18px; }
.variant-actions { align-items: center; }
.btn.block { display: block; text-align: center; }
.gallery-admin-grid.items { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.item-form { margin-top: 8px; text-align: left; }
.item-form label.small { margin-top: 6px; display: block; }
.item-form input[type=text], .item-form input[type=number] { width: 100%; }
.ok-text { color: var(--ok); margin: 6px 0; }
.warn-text { color: var(--gold-2); margin: 6px 0; }

.pill-admin { background: rgba(212, 175, 55, .18); color: #f0d070; margin-right: 4px; }
