/* Shop page v2 (products.php). Scoped to #shop-page. */
#shop-page { --bg:#0b1730; --line:rgba(147,185,255,.2); --muted:#a9c1e6; --blue:#2563eb;
    background:radial-gradient(900px 480px at 85% 0,rgba(37,99,235,.22),transparent 60%),var(--bg);
    color:#fff; min-height:100vh; padding-bottom:88px; font-family:Arial,Helvetica,sans-serif; }
#shop-page *, #shop-page *::before, #shop-page *::after { box-sizing:border-box; }
#shop-page .sh-wrap { width:100%; max-width:1320px; margin:0 auto; padding:0 24px; }

/* ---- header band ---- */
#shop-page .sh-hero { padding:150px 0 40px; border-bottom:1px solid var(--line); background:linear-gradient(180deg,rgba(6,22,52,.55),transparent); }
#shop-page .sh-crumbs { display:flex; gap:10px; align-items:center; margin-bottom:18px; font-size:13.5px; color:var(--muted); }
#shop-page .sh-crumbs a { color:#cfe0ff; text-decoration:none; } #shop-page .sh-crumbs a:hover { color:#fff; text-decoration:underline; }
#shop-page .sh-hero h1 { margin:0 0 10px; font-size:clamp(36px,5vw,60px); font-weight:800; letter-spacing:-.035em; line-height:1.05; }
#shop-page .sh-sub { margin:0 0 28px; color:var(--muted); font-size:clamp(16px,1.6vw,19px); max-width:60ch; line-height:1.6; }
#shop-page .sh-search { position:relative; max-width:640px; }
#shop-page .sh-search svg { position:absolute; left:18px; top:50%; transform:translateY(-50%); width:20px; height:20px; fill:none; stroke:#8fa8d0; stroke-width:2; stroke-linecap:round; pointer-events:none; }
#shop-page .sh-search input {
    width:100%; height:56px; padding:0 20px 0 52px; border-radius:16px; border:1px solid rgba(255,255,255,.2);
    background:rgba(255,255,255,.08); color:#fff; font:inherit; font-size:16px; outline:none;
    -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); transition:border-color .2s, box-shadow .2s, background .2s;
}
#shop-page .sh-search input::placeholder { color:#8fa8d0; }
#shop-page .sh-search input:focus { border-color:#60a5fa; background:rgba(255,255,255,.12); box-shadow:0 0 0 4px rgba(96,165,250,.2); }

/* ---- layout ---- */
#shop-page .sh-layout { display:grid; grid-template-columns:290px minmax(0,1fr); gap:32px; align-items:start; padding-top:34px; }
#shop-page .sh-filters { position:sticky; top:104px; max-height:calc(100vh - 124px); overflow-y:auto; scrollbar-width:thin; }
#shop-page .sh-card { padding:22px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(170deg,rgba(24,44,82,.8),rgba(13,27,54,.85)); }
#shop-page .sh-card__head { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
#shop-page .sh-card__head h2 { margin:0; font-size:18px; font-weight:800; letter-spacing:-.01em; }
#shop-page .sh-clear { background:none; border:0; padding:4px 0; color:#ffc107; font:inherit; font-size:13.5px; font-weight:700; cursor:pointer; }
#shop-page .sh-clear:hover { text-decoration:underline; }
#shop-page .sh-field { margin-bottom:20px; } #shop-page .sh-field:last-child { margin-bottom:0; }
#shop-page .sh-field label { display:block; margin-bottom:8px; color:#d6e3f8; font-size:13.5px; font-weight:700; }
#shop-page .sh-field__row { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:12px; }
#shop-page .sh-field__row label { margin:0; }
#shop-page #price-value { color:#fff; font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; }
#shop-page .sh-hint { margin:8px 0 0; color:#8fa8d0; font-size:12.5px; line-height:1.5; }
#shop-page select {
    width:100%; height:46px; padding:0 14px; border-radius:12px; border:1px solid rgba(255,255,255,.2); background-color:#0e2147; color:#fff;
    font:inherit; font-size:14.5px; outline:none; cursor:pointer; transition:border-color .2s, box-shadow .2s;
}
#shop-page select:focus { border-color:#60a5fa; box-shadow:0 0 0 3px rgba(96,165,250,.2); }
#shop-page select:disabled { opacity:.5; cursor:not-allowed; }
/* range */
#shop-page input[type=range] { -webkit-appearance:none; appearance:none; width:100%; height:6px; border-radius:6px; background:rgba(255,255,255,.18); outline:none; cursor:pointer; }
#shop-page input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:22px; height:22px; border-radius:50%; background:#fff; border:5px solid #2563eb; box-shadow:0 2px 8px rgba(0,0,0,.4); }
#shop-page input[type=range]::-moz-range-thumb { width:14px; height:14px; border-radius:50%; background:#fff; border:5px solid #2563eb; }
#shop-page input[type=range]:focus-visible { box-shadow:0 0 0 4px rgba(96,165,250,.3); }
#shop-page .sh-help { margin:16px 4px 0; color:var(--muted); font-size:13.5px; line-height:1.5; }
#shop-page .sh-help a { color:#93b9ff; font-weight:700; }

/* ---- toolbar ---- */
#shop-page .sh-toolbar { scroll-margin-top:110px; display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:22px; flex-wrap:wrap; }
#shop-page .sh-count { margin:0; color:var(--muted); font-size:14.5px; }
#shop-page .sh-count strong { color:#fff; }
#shop-page .sh-sort { display:flex; align-items:center; gap:10px; margin-left:auto; }
#shop-page .sh-sort label { color:var(--muted); font-size:13.5px; font-weight:700; white-space:nowrap; }
#shop-page .sh-sort select { width:auto; min-width:190px; }
#shop-page .sh-filter-btn { display:none; align-items:center; gap:8px; height:44px; padding:0 18px; border-radius:12px; border:1px solid var(--line); background:rgba(255,255,255,.07); color:#fff; font:inherit; font-size:14.5px; font-weight:700; cursor:pointer; }
#shop-page .sh-filter-btn svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }

/* ---- grid + cards ---- */
#shop-page #product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:22px; }
#shop-page #product-grid > p { grid-column:1/-1; text-align:center; padding:60px 0; color:var(--muted); }
#shop-page #product-grid > div {
    display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:20px;
    background:linear-gradient(170deg,rgba(24,44,82,.85),rgba(13,27,54,.9)); box-shadow:0 14px 36px rgba(0,0,0,.24);
    transition:transform .3s, border-color .3s, box-shadow .3s;
}
#shop-page #product-grid > div:hover { transform:translateY(-6px); border-color:rgba(96,165,250,.7); box-shadow:0 26px 56px rgba(0,0,0,.4); }
#shop-page #product-grid > div > div:first-child { height:230px; background:#0c1a35; }
#shop-page #product-grid > div > div:first-child::after { content:""; position:absolute; left:0; right:0; bottom:0; height:46%; pointer-events:none; background:linear-gradient(180deg,transparent,rgba(10,22,46,.55)); }
#shop-page #product-grid > div > div:first-child > span {
    z-index:2; top:14px; left:14px; padding:5px 11px; border:1px solid rgba(255,255,255,.22); border-radius:999px;
    background:rgba(10,22,46,.62); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); font-size:10.5px; font-weight:800; letter-spacing:.1em;
}
#shop-page #product-grid > div > div:last-child { padding:20px 22px 22px; }
#shop-page #product-grid h3 { margin:0 0 8px; font-size:17px; font-weight:700; line-height:1.35; min-height:2.7em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
#shop-page #product-grid h3 a { color:#fff; text-decoration:none; } #shop-page #product-grid h3 a:hover { color:#93b9ff; }
#shop-page #product-grid .text-amber-400 { color:#fbbf24; font-size:14px; }
#shop-page #product-grid p.text-2xl { margin:2px 0 16px; font-size:24px; font-weight:800; letter-spacing:-.02em; color:#fff; line-height:1.2; }
#shop-page #product-grid button {
    min-height:48px; border-radius:12px; border:0; font-size:14.5px; font-weight:700; color:#fff; cursor:pointer;
    background:linear-gradient(135deg,#3b82f6,#2563eb); box-shadow:0 8px 20px rgba(37,99,235,.35);
}
#shop-page #product-grid button:hover { background:linear-gradient(135deg,#4f8ff7,#2f6df0); transform:translateY(-1px); }

/* ---- pagination ---- */
#shop-page #pagination { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin-top:40px; }
#shop-page .shop-page-btn {
    min-width:44px; height:44px; padding:0 14px; border-radius:12px; border:1px solid var(--line); background:rgba(255,255,255,.06);
    color:#fff; font:inherit; font-size:14.5px; font-weight:700; cursor:pointer; transition:background .2s, border-color .2s;
}
#shop-page .shop-page-btn:hover { background:rgba(255,255,255,.14); }
#shop-page .shop-page-btn.is-active { background:#ffc107; border-color:#ffc107; color:#1b2635; }

#shop-page a:focus-visible, #shop-page button:focus-visible, #shop-page select:focus-visible { outline:3px solid #93b9ff; outline-offset:3px; }

@media (max-width:991px) {
    #shop-page .sh-layout { grid-template-columns:1fr; gap:18px; }
    #shop-page .sh-hero { padding:128px 0 32px; }
    #shop-page .sh-filter-btn { display:inline-flex; }
    #shop-page .sh-filters { display:none; position:static; max-height:none; }
    #shop-page .sh-filters.is-open { display:block; }
    #shop-page .sh-count { order:3; width:100%; }
    #shop-page .sh-sort { margin-left:auto; }
}
@media (max-width:560px) {
    #shop-page .sh-wrap { padding:0 16px; }
    #shop-page #product-grid { grid-template-columns:1fr; }
    #shop-page .sh-sort select { min-width:0; }
}
@media (prefers-reduced-motion:reduce) { #shop-page #product-grid > div:hover { transform:none; } #shop-page * { transition:none !important; } }

/* ---- hero (search moved into the filter bar) ---- */
#shop-page .sh-hero { padding-bottom:34px; }
#shop-page .sh-hero .sh-sub { margin-bottom:0; }

/* ---- filter bar (top) ---- */
#shop-page .sh-bar { padding-top:24px; }
#shop-page .sh-bar__inner {
    display:grid; grid-template-columns:minmax(220px,2fr) minmax(200px,1.1fr) auto auto; gap:16px 22px; align-items:end;
    padding:18px 22px; border:1px solid var(--line); border-radius:20px;
    background:linear-gradient(170deg,rgba(24,44,82,.8),rgba(13,27,54,.85));
}
#shop-page .sh-bar__search { position:relative; }
#shop-page .sh-bar__search svg { position:absolute; left:16px; top:50%; transform:translateY(-50%); width:19px; height:19px; fill:none; stroke:#8fa8d0; stroke-width:2; stroke-linecap:round; pointer-events:none; }
#shop-page .sh-bar__search input {
    width:100%; height:48px; padding:0 16px 0 46px; border-radius:14px; border:1px solid rgba(255,255,255,.2);
    background:rgba(255,255,255,.08); color:#fff; font:inherit; font-size:15px; outline:none; transition:border-color .2s, box-shadow .2s, background .2s;
}
#shop-page .sh-bar__search input::placeholder { color:#8fa8d0; }
#shop-page .sh-bar__search input:focus { border-color:#60a5fa; background:rgba(255,255,255,.12); box-shadow:0 0 0 4px rgba(96,165,250,.2); }
#shop-page .sh-bar__price .sh-field__row { margin-bottom:12px; }
#shop-page .sh-bar__price label, #shop-page .sh-bar__sort label { display:block; margin-bottom:8px; color:#d6e3f8; font-size:13.5px; font-weight:700; }
#shop-page .sh-bar__price .sh-field__row label { margin:0; }
#shop-page .sh-bar__price input[type=range] { margin-bottom:9px; }
#shop-page .sh-bar__sort select { min-width:190px; height:48px; }
#shop-page .sh-bar .sh-clear { height:48px; padding:0 4px; white-space:nowrap; }

/* ---- categories (left sidebar) ---- */
#shop-page .sh-side { position:sticky; top:104px; max-height:calc(100vh - 124px); overflow-y:auto; scrollbar-width:thin; }
#shop-page .sh-side .sh-card { padding:18px 12px; }
#shop-page .sh-side__title { margin:0 0 12px 8px; font-size:18px; font-weight:800; letter-spacing:-.01em; }
#shop-page .sh-cats__rail { display:flex; flex-direction:column; gap:4px; }
#shop-page .sh-cat {
    display:flex; align-items:center; gap:12px; width:100%; padding:9px 10px; text-align:left; cursor:pointer;
    border:1px solid transparent; border-radius:12px; background:transparent; color:#dbe7ff; font:inherit; font-size:14.5px; font-weight:600;
    transition:background .2s, border-color .2s;
}
#shop-page .sh-cat:hover { background:rgba(255,255,255,.07); }
#shop-page .sh-cat__icon { flex:0 0 auto; display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:rgba(96,165,250,.14); transition:background .2s; }
#shop-page .sh-cat__icon svg { width:18px; height:18px; fill:none; stroke:#93b9ff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:stroke .2s; }
#shop-page .sh-cat__text { flex:1; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:10px; }
#shop-page .sh-cat__name { line-height:1.25; overflow-wrap:anywhere; }
#shop-page .sh-cat__count { flex:none; min-width:28px; padding:2px 8px; border-radius:99px; background:rgba(255,255,255,.1); color:#cfe0ff; font-size:12px; font-weight:700; text-align:center; }
#shop-page .sh-cat.is-active { background:rgba(255,193,7,.14); border-color:rgba(255,193,7,.55); color:#fff; }
#shop-page .sh-cat.is-active .sh-cat__icon { background:#ffc107; }
#shop-page .sh-cat.is-active .sh-cat__icon svg { stroke:#1b2635; }
#shop-page .sh-cat.is-active .sh-cat__count { background:#ffc107; color:#1b2635; }
#shop-page .sh-cat--skeleton { height:48px; padding:0; border-radius:12px; cursor:default; pointer-events:none;
    background:linear-gradient(100deg,rgba(255,255,255,.04) 30%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.04) 70%) 0 0/200% 100%; animation:sh-shimmer 1.4s linear infinite; }
@keyframes sh-shimmer { to { background-position:-200% 0; } }

/* subcategories nest under the chosen category */
#shop-page .sh-sublist { display:flex; flex-direction:column; gap:2px; margin:2px 0 8px 26px; padding-left:12px; border-left:2px solid rgba(255,193,7,.45); }
#shop-page .sh-chip {
    display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:8px 12px; text-align:left; cursor:pointer;
    border:0; border-radius:10px; background:transparent; color:#c4d6f5; font:inherit; font-size:13.5px; font-weight:600; transition:background .2s, color .2s;
}
#shop-page .sh-chip:hover { background:rgba(255,255,255,.07); color:#fff; }
#shop-page .sh-chip__count { color:#8fa8d0; font-size:12px; font-weight:700; }
#shop-page .sh-chip.is-active { background:rgba(255,193,7,.16); color:#fff; }
#shop-page .sh-chip.is-active .sh-chip__count { color:#ffc107; }
#shop-page .sh-cat:focus-visible, #shop-page .sh-chip:focus-visible { outline:3px solid #93b9ff; outline-offset:2px; }
#shop-page .sh-toolbar { justify-content:flex-start; }

@media (max-width:1100px) {
    #shop-page .sh-bar__inner { grid-template-columns:1fr 1fr; }
    #shop-page .sh-bar__search { grid-column:1 / -1; }
    #shop-page .sh-bar__sort select { min-width:0; width:100%; }
    #shop-page .sh-bar .sh-clear { grid-column:1 / -1; justify-self:end; height:auto; padding:4px 0; }
}
@media (max-width:991px) {
    /* categories become one swipeable row of chips above the products */
    /* minmax(0,1fr) lets the grid column shrink; otherwise the chip row stretches the whole page sideways */
    #shop-page .sh-layout { grid-template-columns:minmax(0,1fr); }
    #shop-page .sh-side, #shop-page .sh-results { min-width:0; }
    #shop-page .sh-side { position:static; max-height:none; overflow:visible; }
    #shop-page .sh-side .sh-card { padding:12px 0 8px 14px; }
    #shop-page .sh-side__title { margin-bottom:10px; font-size:16px; }
    #shop-page .sh-cats__rail { flex-direction:row; align-items:center; gap:8px; overflow-x:auto; padding:2px 14px 8px 0; scroll-snap-type:x proximity; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
    #shop-page .sh-cats__rail::-webkit-scrollbar { display:none; }
    #shop-page .sh-cat { flex:0 0 auto; width:auto; padding:6px 14px 6px 6px; border-color:var(--line); border-radius:999px; background:rgba(255,255,255,.05); scroll-snap-align:start; white-space:nowrap; }
    #shop-page .sh-cat__icon { width:30px; height:30px; border-radius:50%; }
    #shop-page .sh-cat__text { flex:none; gap:8px; }
    #shop-page .sh-cat--skeleton { flex:0 0 120px; height:42px; border-radius:999px; }
    #shop-page .sh-sublist { display:contents; }
    #shop-page .sh-chip { flex:0 0 auto; width:auto; gap:8px; padding:7px 13px; border:1px solid rgba(255,193,7,.45); border-radius:999px; background:rgba(255,193,7,.08); white-space:nowrap; }
    #shop-page .sh-help { display:none; }
}
@media (max-width:700px) {
    #shop-page .sh-bar__inner { padding:16px; gap:14px; }
    #shop-page .sh-bar__price .sh-field__row { gap:8px; }
    #shop-page .sh-bar__price .sh-field__row label { white-space:nowrap; }
    #shop-page .sh-bar__price #price-value { font-size:12.5px; white-space:nowrap; }
}
/* the 16px side padding rule for small screens also zeroed the layout's top padding */
@media (max-width:991px) { #shop-page .sh-wrap.sh-layout { padding-top:18px; } }
@media (prefers-reduced-motion:reduce) { #shop-page .sh-cat--skeleton { animation:none; } }
