/* ==========================================================================
   SCHWWAAA PRODUCTS — storefront styles. Builds on ../styles.css (palette, fonts,
   .box, .play-btn, .tag etc.), so it stays in step with the rest of the site.
   ========================================================================== */
.shop-main { padding: 22px 16px 10px; }

/* ---------- hero ---------- */
.shop-hero { --s: var(--must); }
.shop-hero .box-body { position: relative; padding: 18px 18px 16px; }
.shop-hero-art { position: absolute; right: 22px; top: 10px; width: 64px; transform: rotate(-12deg); animation: poke 1.4s ease-in-out infinite; pointer-events: none; }
.shop-kicker { display: inline-block; padding: 1px 10px; background: var(--ink); color: var(--must); border-radius: 999px; font: bold 10px var(--f-mono); letter-spacing: 1px; }
.shop-hero h1 { margin: 8px 0 6px; font: bold 30px/1.05 var(--f-loud); letter-spacing: -.5px; }
.shop-hero h1 span { background: linear-gradient(transparent 58%, var(--teal) 58% 90%, transparent 90%); }
.shop-hero p { max-width: 560px; margin: 0 0 10px; }
.shop-how { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shop-how li { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 5px; background: var(--ice); border: 2px solid var(--ink); border-radius: 999px; font: bold 11px var(--f-head); }
.shop-how li:nth-child(2) { background: var(--peach); }
.shop-how li:nth-child(3) { background: var(--cream); }
.shop-how b { display: grid; place-items: center; width: 20px; height: 20px; background: var(--ink); color: var(--must); border-radius: 50%; font: bold 11px var(--f-mono); }
.shop-how u { text-decoration: none; background: var(--paper); padding: 0 5px; border-radius: 6px; }

/* ---------- announcement + filters ---------- */
.shop-announce { margin: 0 0 18px; padding: 8px 14px; background: var(--coral); color: var(--paper); border: 3px solid var(--ink); border-radius: 14px 6px 14px 6px; box-shadow: 4px 4px 0 var(--ink); font: bold 12px var(--f-head); text-align: center; }
.shop-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 26px; }
.chip { padding: 5px 14px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); font: bold 12px var(--f-head); letter-spacing: .5px; cursor: pointer; }
.chip:hover { background: var(--ice); transform: translate(-1px, -1px); }
.chip[aria-pressed="true"] { background: var(--teal); }
.chip:focus-visible, .item-buy:focus-visible, .item-toggle:focus-visible, .lab-item summary:focus-visible { outline: 3px dashed var(--peri); outline-offset: 3px; }

/* ---------- catalog ---------- */
.shop-catalog { --s: var(--pink); margin-bottom: 22px; }
.shop-catalog[hidden], .shop-status[hidden] { display: none; }
.shelf-free { --s: var(--mint); }
.shelf-more { --s: var(--lav); }
.shelf-lab { --s: var(--peach); }
.shop-count { margin-left: 4px; padding: 0 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; font: bold 10px var(--f-mono); }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 16px; padding: 18px 14px 16px; }
.shop-status { grid-column: 1 / -1; margin: 10px 0; text-align: center; font: bold 13px var(--f-head); }

/* ---------- product card ---------- */
.item {
  --c: var(--teal); --p: none;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px 6px 18px 6px;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .15s;
}
.item[hidden] { display: none; }
.item:nth-child(6n+1) { --c: var(--teal);  --p: radial-gradient(circle, rgba(255,255,255,.6) 2px, transparent 2.5px) 0 0 / 10px 10px; }
.item:nth-child(6n+2) { --c: var(--pink);  --p: repeating-linear-gradient(45deg, rgba(255,255,255,.45) 0 5px, transparent 5px 12px); }
.item:nth-child(6n+3) { --c: var(--must);  --p: linear-gradient(135deg, rgba(51,51,102,.1) 25%, transparent 25%) 0 0 / 14px 14px; }
.item:nth-child(6n+4) { --c: var(--lav);   --p: repeating-linear-gradient(90deg, rgba(255,255,255,.4) 0 4px, transparent 4px 12px); }
.item:nth-child(6n+5) { --c: var(--mint);  --p: radial-gradient(circle, rgba(51,51,102,.2) 1.5px, transparent 2px) 0 0 / 8px 8px; }
.item:nth-child(6n+6) { --c: var(--orng);  --p: repeating-linear-gradient(-45deg, rgba(255,255,255,.4) 0 3px, transparent 3px 9px); }
.item:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 6px 8px 0 var(--ink); }
.item:nth-child(even):hover { transform: translateY(-4px) rotate(1deg); }

.item-art { position: relative; display: grid; place-items: center; height: 150px; background: var(--p), var(--c); border-bottom: 3px solid var(--ink); }
.item-art::before { content: ""; position: absolute; width: 112px; height: 112px; background: var(--paper); border: 3px solid var(--ink); border-radius: 46% 54% 60% 40% / 50% 44% 56% 50%; }
.item-art img { position: relative; max-width: 84px; max-height: 84px; object-fit: contain; }
.item-glyph { position: relative; font-size: 56px; line-height: 1; }
.item-sticker { position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 5px; background: var(--coral); color: var(--paper); border: 2px solid var(--ink); border-radius: 50%; font: bold 10px var(--f-head); transform: rotate(14deg); animation: wiggle 1.6s ease-in-out infinite; }
.item-sticker.out { background: var(--ink); color: var(--must); animation: none; border-radius: 999px; padding: 0 9px; height: 26px; }

.item-body { display: flex; flex: 1; flex-direction: column; padding: 10px 12px 12px; }
.item-name { margin: 0 0 5px; font: bold 15px/1.15 var(--f-head); overflow-wrap: anywhere; }
.item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.item-tags .tag { padding: 1px 7px; background: var(--cream); border: 2px solid var(--ink); border-radius: 999px; font: bold 9px var(--f-mono); }
.item-tags .tag:first-child { background: var(--ice); }
.item-blurb { margin: 0 0 10px; font-size: 11px; line-height: 1.45; }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.item-price { font: bold 22px/1 var(--f-loud); letter-spacing: -.5px; }
.item-buy { padding: 5px 12px; font-size: 11px; white-space: nowrap; }
.item-buy.off { background: var(--peach); box-shadow: 2px 2px 0 var(--ink); cursor: not-allowed; }
.item-prov { margin: 8px 0 0; text-align: right; font: bold 9px var(--f-mono); color: #666699; letter-spacing: .5px; }
.item[data-state="soldout"] .item-art, .item[data-state="soldout"] .item-name { opacity: .55; }

.shop-fine { margin: 6px 0 14px; text-align: center; font-size: 11px; color: #666699; }

/* ---------- details toggle + write-up ---------- */
.item-chan { font: bold 9px var(--f-mono); color: #666699; letter-spacing: .5px; }
.item-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.item-toggle { padding: 2px 10px; background: var(--ice); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; font: bold 10px var(--f-head); cursor: pointer; }
.item-toggle[aria-expanded="true"] { background: var(--must); }
.item-learn { font: bold 10px var(--f-head); }
.item-more { margin-top: 10px; padding-top: 8px; border-top: 3px dotted var(--ink); }
.item-more[hidden] { display: none; }
.item-more p { margin: 0 0 8px; font-size: 12px; line-height: 1.5; }
.item-more ul { margin: 0 0 8px; padding-left: 18px; font-size: 11px; }
.item-more li::marker { content: "▲ "; color: var(--coral); font-size: 9px; }
.item-more .item-tags { margin: 0; }
.item-status { display: inline-block; margin-bottom: 6px; padding: 1px 9px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; font: bold 10px var(--f-head); text-transform: lowercase; white-space: nowrap; }
.item-status::before { content: "● "; color: var(--coral); }
/* an opened card takes the whole row */
.item.open { grid-column: 1 / -1; }
.item.open:hover { transform: none; box-shadow: 4px 4px 0 var(--ink); }
.item.open .item-blurb.borrowed { display: none; }
@media (min-width: 761px) {
  .item.open { flex-direction: row; }
  .item.open .item-art { flex: 0 0 240px; height: auto; border-right: 3px solid var(--ink); border-bottom: 0; }
  .item.open .item-body { padding: 14px 70px 14px 16px; }
  .item.open .item-foot { justify-content: flex-start; }
}
.item.target { animation: item-flash 1.6s ease-out 2; }
@keyframes item-flash { 0%, 100% { box-shadow: 4px 4px 0 var(--ink); } 50% { box-shadow: 0 0 0 6px var(--must), 4px 4px 0 var(--ink); } }

/* ---------- in the lab ---------- */
.lab-list { display: grid; gap: 8px; padding: 14px; }
.lab-item { background: var(--cream); border: 3px solid var(--ink); border-radius: 14px 6px 14px 6px; scroll-margin-top: 10px; }
.lab-item[hidden] { display: none; }
.lab-item summary { display: flex; align-items: center; gap: 10px; padding: 6px 12px; cursor: pointer; list-style: none; }
.lab-item summary::-webkit-details-marker { display: none; }
.lab-item summary::after { content: "+"; font: bold 18px var(--f-mono); }
.lab-item[open] summary::after { content: "−"; }
.lab-item summary img { width: 34px; height: 34px; padding: 3px; object-fit: contain; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.lab-name { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.lab-name b { font: bold 13px var(--f-head); overflow-wrap: anywhere; }
.lab-item summary .item-status { margin: 0; }
.lab-item .item-more { margin: 0 12px 12px; }
.lab-item .play-btn { display: inline-block; margin-top: 10px; background: var(--peach); }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .shop-main { padding: 18px 10px 8px; }
  .shop-hero h1 { font-size: 24px; }
  .shop-hero-art { display: none; }
  .shop-how { flex-direction: column; align-items: flex-start; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 10px 12px; }
  .item-art { height: 112px; }
  .item-art::before { width: 84px; height: 84px; }
  .item-art img { max-width: 62px; max-height: 62px; }
  .item-glyph { font-size: 40px; }
  .item-sticker { min-width: 38px; height: 38px; font-size: 9px; top: 6px; right: 6px; }
  .item-body { padding: 8px 8px 10px; }
  .item-name { font-size: 13px; }
  .item-blurb { font-size: 10px; }
  .item-foot { flex-direction: column; align-items: stretch; gap: 6px; }
  .item-price { font-size: 18px; text-align: center; }
  .item-buy { text-align: center; }
  .item-prov { text-align: center; }
  .item-links { justify-content: center; }
  .lab-list { padding: 10px; }
}
@media (max-width: 380px) {
  .shop-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .item, .item.target, .chip, .shop-hero-art, .item-sticker { animation: none !important; transition: none !important; }
}
