/* Shop pages (shop, my orders, admin products). Colours come from the theme variables, so light and dark both work. */
.shop-banner { position: relative; height: 150px; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: #1c1555; }
.shop-banner::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(15, 10, 45, .88), rgba(15, 10, 45, .55) 42%, transparent 72%); }
.shop-banner .bt { z-index: 2; position: absolute; left: 26px; top: 50%; transform: translateY(-50%); color: #fff; max-width: 60%; }
.shop-banner .bt h1 { color: #f1d489; margin: 0 0 4px; }
.shop-banner .bt p { margin: 0; color: #d6d0f0; font-size: .95rem; }
.shop-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.shop-bar .chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 320px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 6px 14px; font: 500 .88rem var(--sans); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.shop-bar input, .shop-bar select { width: auto; min-width: 160px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--ink); }
.pcard.sold { opacity: .78; }
.pimg { aspect-ratio: 1 / 1; position: relative; overflow: hidden; background: #17104a; }
.pimg > svg, .pimg > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pimg .tags { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.pbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pbody h3 { font-size: 1.2rem; margin: 0; }
.pbody .sub { color: var(--muted); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.price { font: 700 1.35rem var(--serif); color: var(--gold); }
.price s { color: var(--muted); font: 400 .95rem var(--sans); margin-left: 6px; }
.stk { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.stk.in { color: #1f6b46; } .stk.low { color: #a15d00; } .stk.out { color: #fff; background: #a33; }
.stk.sale { color: #fff; background: var(--gold); }
.pdetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.gallery .main { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; position: relative; background: #17104a; }
.gallery .main > svg, .gallery .main > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gallery .main .zoomhint { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; padding: 3px 9px; border-radius: 99px; pointer-events: none; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs button { width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #17104a; }
.gallery .thumbs button.on { border-color: var(--gold); }
.gallery .thumbs button > * { width: 100%; height: 100%; display: block; object-fit: cover; }
.pinfo .cat { color: var(--gold); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.pinfo .price { font-size: 2rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.qty button { width: 38px; height: 40px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.qty input { width: 54px; height: 40px; text-align: center; border: 0; border-radius: 0; padding: 0; background: transparent; }
.buyrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 16px 0 10px; }
.btn-buy { padding: 12px 34px; font-size: 1.05rem; }
.ptext { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; }
.ptext p { margin: 0 0 .8em; }
.ptext table.kv th { text-align: left; width: 42%; color: var(--muted); font-weight: 500; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 4px 0 4px 26px; position: relative; }
.ticks li::before { content: '✦'; position: absolute; left: 4px; color: var(--gold); }
.pay-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-choice label { flex: 1 1 190px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; margin: 0; background: var(--surface); }
.pay-choice label:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.manual-info { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 12px; font-size: .9rem; }
.co-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.sum { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 76px; }
.sum .row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.sum .tot { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 1.15rem; }
.sum .mini { display: flex; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sum .mini .pimg { width: 64px; height: 64px; aspect-ratio: auto; border-radius: 10px; flex: none; }
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(8, 6, 24, .88); display: grid; place-items: center; cursor: zoom-out; padding: 20px; }
.lightbox > * { max-width: min(92vw, 820px); max-height: 90vh; width: min(92vw, 90vh, 820px); height: auto; border-radius: 14px; box-shadow: 0 10px 50px rgba(0, 0, 0, .6); object-fit: contain; }
.steps { display: flex; gap: 0; margin: 12px 0 4px; }
.steps .st { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 22px; }
.steps .st::before { content: ''; position: absolute; top: 5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--line); z-index: 1; }
.steps .st::after { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.steps .st:first-child::after { display: none; }
.steps .st.done { color: var(--ink); font-weight: 600; }
.steps .st.done::before, .steps .st.done::after { background: var(--gold); }
.ocard { display: flex; gap: 14px; }
.ocard .pimg { width: 84px; height: 84px; aspect-ratio: auto; border-radius: 12px; flex: none; }
.ocard > div:last-child { flex: 1; min-width: 0; }
.thumb-sm { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #17104a; flex: none; }
.thumb-sm > * { width: 100%; height: 100%; display: block; object-fit: cover; }
.imgrid { display: flex; gap: 10px; flex-wrap: wrap; }
.imgrid .it { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); position: relative; background: #17104a; }
.imgrid .it.main { border-color: var(--gold); }
.imgrid .it img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgrid .it .ctl { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; background: rgba(0, 0, 0, .6); }
.imgrid .it .ctl button { border: 0; background: transparent; color: #fff; cursor: pointer; padding: 2px 7px; font-size: .9rem; }
.sample-note { background: var(--gold-soft); color: var(--alert-info-text); border: 1px dashed var(--gold); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
@media (max-width: 860px) {
  .pdetail, .co-grid, .ptext { grid-template-columns: minmax(0, 1fr); }
  .sum { position: static; }
  .shop-banner { height: 120px; } .shop-banner .bt { left: 16px; max-width: 70%; } .shop-banner .bt p { display: none; }
  .shop-bar input, .shop-bar select { flex: 1 1 140px; }
  .pinfo .price { font-size: 1.7rem; }
}
@media (max-width: 560px) {
  .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pbody { padding: 9px 10px 11px; } .pbody h3 { font-size: 1.05rem; } .price { font-size: 1.15rem; }
  .btn-buy { width: 100%; }
  .ocard .pimg { width: 64px; height: 64px; }
}
@media print { .shop-banner, .no-print { display: none !important; } }
