/* Shop and category pages (.up-shop): control-panel header, chip filters, product cards with a capacity badge. */

/* ---------- header ---------- */
.shop-hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.shop-hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% -10%, rgba(29, 111, 224, .38), transparent 70%),
  radial-gradient(500px 260px at 0% 120%, rgba(242, 165, 22, .14), transparent 70%); pointer-events: none; }
/* faint circuit grid */
.shop-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(180deg, #000 20%, transparent 95%); pointer-events: none; }
.shop-hero .wrap { position: relative; z-index: 1; display: grid; gap: 22px; padding-block: 30px 26px; }
.shop-hero-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.shop-hero .crumbs, .shop-hero .crumbs a { color: #8fa3c0; font-size: 14px; }
.shop-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 4px; }
.shop-hero-top p { color: #b9c7dc; max-width: 40em; margin-top: 6px; }
.shop-hero-top p a { color: var(--amber); }
.shop-count { display: grid; justify-items: center; flex: none; min-width: 96px; padding: 10px 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; background: rgba(255, 255, 255, .06); }
.shop-count b { font-size: 34px; line-height: 1.1; color: var(--amber); }
.shop-count span { color: #b9c7dc; font-size: 13px; }

.shop-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.shop-tile { position: relative; display: grid; align-content: start; gap: 4px; padding: 14px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 16px; background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.shop-tile:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); transform: translateY(-2px); }
.shop-tile:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.shop-tile.on { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.shop-tile-ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--amber); }
.shop-tile-ic svg { width: 26px; height: 26px; }
.shop-tile.on .shop-tile-ic { background: rgba(26, 18, 0, .12); color: var(--amber-ink); }
.shop-tile b { font: 700 15px/1.4 var(--f-display); }
.shop-tile-meta { color: #8fa3c0; font-size: 12.5px; }
.shop-tile.on .shop-tile-meta { color: rgba(26, 18, 0, .7); }

.shop-subs { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-subs a { padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; color: #dfe7f3; font-size: 14px; font-weight: 600; text-decoration: none; }
.shop-subs a:hover { border-color: #fff; color: #fff; }
.shop-subs a.on { background: #fff; border-color: #fff; color: var(--navy); }

.shop-uses { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.shop-uses-label { flex: none; color: var(--amber); font: 700 14px var(--f-display); }
.shop-uses nav { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-uses a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #dfe7f3; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s; }
.shop-uses a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.shop-uses a.on { background: var(--blue); color: #fff; }
.shop-uses a span { display: contents; }
.shop-uses svg { width: 18px; height: 18px; }

/* ---------- toolbar ---------- */
.up-shop .woo-main { padding-top: 28px; }
.up-shop .toolbar { gap: 10px 16px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.up-shop .woocommerce-result-count { color: var(--ink) !important; font-weight: 700; }
.shop-sort { display: flex; gap: 4px; margin-inline-start: auto; padding: 3px; border-radius: 10px; background: var(--bg); }
.shop-sort a { padding: 5px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.shop-sort a:hover { color: var(--ink); }
.shop-sort a.on { background: var(--surface); color: var(--blue); box-shadow: 0 1px 4px rgba(15, 27, 45, .1); }
.shop-tools { display: flex; gap: 8px; align-items: center; }
.up-shop .listing .woocommerce-ordering { display: none; }
.shop-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 16px; }
.shop-active a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 14px; font-weight: 600; text-decoration: none; }
.shop-active a span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; line-height: 1; }
.shop-active a:hover { background: #dbe8fb; }
.shop-active a.shop-active-clear { background: none; color: var(--crit); padding-inline: 6px; }

/* ---------- filters as chips ---------- */
.up-shop .filters { gap: 18px; padding: 16px; border-radius: 18px; }
.up-shop .filters fieldset + fieldset { padding-top: 16px; border-top: 1px dashed var(--line); }
.up-shop .filters legend { font-size: 14px; color: var(--muted); }
.up-shop .filters fieldset[data-attr] { display: flex; flex-wrap: wrap; gap: 6px; }
.up-shop .filters fieldset[data-attr] legend { width: 100%; }
.up-shop .filters fieldset[data-attr] label { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13.5px; font-weight: 600; transition: border-color .15s, background .15s; }
.up-shop .filters fieldset[data-attr] label:hover { border-color: var(--blue); }
.up-shop .filters fieldset[data-attr] input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.up-shop .filters fieldset[data-attr] label:has(input:checked) { border-color: var(--blue); background: var(--blue); color: #fff; }
.up-shop .filters fieldset[data-attr] label:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 1px; }
.up-shop .filters fieldset[data-attr="use"] label { width: 100%; }
.up-shop .filters fieldset[data-attr="capacity"] label { justify-content: center; min-width: calc(33.333% - 4px); font-family: var(--f-mono); direction: ltr; }
.up-shop .filters fieldset[data-attr="battery"] label { width: 100%; }
.up-shop .f-ic { display: contents; color: var(--blue); }
.up-shop .f-ic svg { width: 18px; height: 18px; flex: none; }
.up-shop label:has(input:checked) .f-ic { color: #fff; }
.up-shop .filters select { min-height: 42px; border-radius: 10px; }
.up-shop .cat-link { border-radius: 10px; }
.up-shop .cat-link.on { background: var(--navy); color: #fff; }

/* ---------- product cards ---------- */
.up-shop ul.products li.product.card { position: relative; padding: 0; gap: 0; border-radius: 20px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.up-shop ul.products li.product.card:hover { transform: translateY(-4px); border-color: #c4d8f6; box-shadow: 0 16px 36px rgba(15, 27, 45, .1); }
.up-shop .card .pic { aspect-ratio: 1 / .9; border: 0 !important; border-radius: 0; background: radial-gradient(120% 90% at 50% 18%, #fff 35%, var(--blue-soft) 100%) !important; }
.up-shop ul.products li.product .pic img { padding: 18px; transition: transform .35s ease; }
.up-shop ul.products li.product.card:hover .pic img { transform: scale(1.06); }
.card-cap { display: none; }
.up-shop .card-cap { position: absolute; z-index: 1; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 12px rgba(11, 37, 69, .25); }
.up-shop .card-cap::before { content: "⚡"; color: var(--amber); font-size: 11px; }
.up-shop .card .tags { position: absolute; z-index: 1; top: 12px; inset-inline-start: 12px; max-width: 60%; }
.up-shop .card .tags .tag { background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(15, 27, 45, .08); }
.up-shop .card .tags .tag.best { background: var(--amber); color: var(--amber-ink); }
.up-shop .card .card-title { padding: 14px 16px 0; }
.up-shop .card .specs { padding: 8px 16px 0; }
.up-shop .card .specs span { border-radius: 6px; background: var(--bg); border-color: transparent; }
.up-shop .card .price-row { padding: 12px 16px 0; margin-top: auto; }
.up-shop .card .price-row .price { font: 800 21px var(--f-display); }
.up-shop .card .card-actions { padding: 12px 16px 16px; }
.up-shop ul.products li.product .card-actions .button { border-radius: 12px; }

/* helper tile among the products */
.shop-helper { display: grid; align-content: center; justify-items: start; gap: 10px; padding: 24px; border-radius: 20px; list-style: none; color: #fff; background: radial-gradient(140% 100% at 100% 0%, #1d6fe0 0%, var(--navy) 60%); }
.shop-helper-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--amber); color: var(--amber-ink); font-size: 26px; }
.shop-helper b { font: 700 22px/1.35 var(--f-display); }
.shop-helper p { color: #c9d6ea; }
.shop-helper-alt { color: #c9d6ea; font-size: 14px; }
.shop-helper-alt:hover { color: #fff; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) { .shop-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .shop-sort { display: none; } }
@media (max-width: 760px) {
  .shop-hero .wrap { gap: 16px; padding-block: 18px 16px; }
  .shop-hero .crumbs { display: none; }
  .shop-hero h1 { font-size: 26px; }
  .shop-hero-top p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .shop-count { min-width: 70px; padding: 6px 10px; border-radius: 14px; }
  .shop-count b { font-size: 24px; }
  /* tiles, subsections and uses become swipeable strips */
  .shop-tiles, .shop-subs, .shop-uses nav { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; margin-inline: calc(-1 * var(--gutter-r)) calc(-1 * var(--gutter)); padding-inline: var(--gutter-r) var(--gutter); }
  .shop-tiles::-webkit-scrollbar, .shop-subs::-webkit-scrollbar, .shop-uses nav::-webkit-scrollbar { display: none; }
  .shop-tile { flex: none; width: 148px; scroll-snap-align: start; padding: 12px; }
  .shop-tile-ic { width: 34px; height: 34px; }
  .shop-subs a, .shop-uses a { flex: none; scroll-snap-align: start; }
  .shop-uses { display: grid; gap: 8px; padding-top: 12px; }
  .up-shop .woo-main { padding-top: 14px; }
  .up-shop .toolbar { padding: 6px 6px 6px 12px; }
  .up-shop ul.products li.product.card { border-radius: 16px; }
  .up-shop ul.products li.product.card:hover { transform: none; }
  .up-shop .card .card-title { padding: 10px 10px 0; }
  .up-shop .card .price-row { padding: 8px 10px 0; }
  .up-shop .card .price-row .price { font-size: 17px; }
  .up-shop .card .card-actions { padding: 10px; }
  .up-shop .card-cap { top: 8px; left: 8px; padding: 2px 8px 2px 6px; font-size: 11px; }
  .up-shop .card .tags { top: 8px; inset-inline-start: 8px; }
  .up-shop .card .tags .tag:not(.best) { display: none; }
  .shop-helper { grid-column: 1 / -1; padding: 18px; }
  .shop-helper b { font-size: 19px; }
}
