/* Shop pages — built on the site's own tokens (style.css :root). Navy → teal
   palette; yellow is for primary BUTTONS only, never text. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shop-preview { background: var(--dtc-blue-light); color: var(--dtc-navy-dark); text-align: center; padding: .6rem 1rem; font-size: .875rem; font-weight: 600; }
.shop-preview a { color: inherit; text-decoration: underline; }

.shop-hero { background: linear-gradient(135deg, var(--dtc-navy-deeper), var(--dtc-navy) 60%, var(--dtc-blue)); color: #fff; padding: 2.25rem 0 2.5rem; }
.shop-hero h1 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .5rem 0 .4rem; }
.shop-hero p { color: var(--dtc-accent-soft); margin: 0; max-width: 60ch; }
.shop-hero .shop-crumbs, .shop-hero .shop-crumbs a { color: var(--dtc-accent-soft); }

.shop-wrap { padding-top: 1.5rem; padding-bottom: 3.5rem; }
.shop-narrow { max-width: 860px; }
.shop-crumbs { font-size: .8125rem; color: var(--dtc-text-muted); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.shop-crumbs a { color: var(--dtc-navy); }
.shop-muted { color: var(--dtc-text-muted); font-size: .875rem; }
.shop-empty { padding: 2.5rem 0; text-align: center; color: var(--dtc-text-muted); }
.shop-note { background: var(--dtc-amber-light); border-left: 4px solid var(--dtc-blue); padding: .8rem 1rem; border-radius: var(--dtc-radius); margin-bottom: 1rem; }
.shop-note--ok { border-left-color: #16a34a; background: #ecfdf3; }
.shop-test { background: #fff7e6; border: 1px dashed #d9a400; color: #5c4400; padding: .6rem .8rem; border-radius: var(--dtc-radius); font-size: .8125rem; }
.shop-help { color: var(--dtc-text-muted); font-size: .875rem; margin-top: 1.25rem; }
.shop-help a { color: var(--dtc-navy); font-weight: 600; }

/* categories */
.shop-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.shop-cats a { padding: .45rem .9rem; border-radius: var(--dtc-radius-full); border: 1px solid var(--dtc-border); color: var(--dtc-navy); font-weight: 600; font-size: .875rem; text-decoration: none; background: #fff; }
.shop-cats a.is-sub { font-weight: 500; }
.shop-cats a:hover { border-color: var(--dtc-blue); }
.shop-cats a.is-active { background: var(--dtc-navy); border-color: var(--dtc-navy); color: #fff; }

/* grid + cards */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.shop-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius-lg); overflow: hidden; text-decoration: none; color: var(--dtc-text); transition: var(--dtc-transition); }
.shop-card:hover { box-shadow: var(--dtc-shadow-lg); transform: translateY(-2px); border-color: var(--dtc-accent-soft); }
.shop-card__img { position: relative; aspect-ratio: 1; background: var(--dtc-off-white); }
.shop-card__img img, .shop-card__img .shop-noimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card__body { padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.shop-card__title { font-size: 1rem; line-height: 1.35; margin: 0; color: var(--dtc-navy); }
.shop-card__desc { font-size: .875rem; color: var(--dtc-text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card__price { margin-top: auto; font-weight: 700; color: var(--dtc-text); }
.shop-flag { position: absolute; top: .6rem; left: .6rem; background: var(--dtc-navy); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: var(--dtc-radius-full); }
.shop-was { color: var(--dtc-text-muted); font-weight: 400; margin-left: .35rem; }
.shop-noimg { background: linear-gradient(135deg, var(--dtc-blue-light), var(--dtc-amber-light)); aspect-ratio: 1; }

/* product */
.shop-product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.shop-gallery__main { border-radius: var(--dtc-radius-lg); overflow: hidden; background: var(--dtc-off-white); border: 1px solid var(--dtc-border); }
.shop-gallery__main img { width: 100%; height: auto; display: block; }
.shop-gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; margin-top: .6rem; }
.shop-gallery__thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--dtc-radius); overflow: hidden; cursor: pointer; background: none; aspect-ratio: 1; }
.shop-gallery__thumbs button.is-active { border-color: var(--dtc-blue); }
.shop-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-info h1 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--dtc-navy); margin: 0 0 .5rem; }
.shop-info__price { font-size: 1.5rem; font-weight: 800; color: var(--dtc-text); }
.shop-gst { font-size: .8125rem; color: var(--dtc-text-muted); margin: .15rem 0 1rem; }
.shop-info__lead { font-size: 1.05rem; color: var(--dtc-text); }
.shop-buy { margin: 1.25rem 0 1.5rem; }
.shop-opt { border: 0; padding: 0; margin: 0 0 1rem; }
.shop-opt legend { font-weight: 700; font-size: .875rem; margin-bottom: .45rem; color: var(--dtc-navy); }
.shop-opt label { display: inline-block; margin: 0 .4rem .4rem 0; cursor: pointer; }
.shop-opt input { position: absolute; opacity: 0; pointer-events: none; }
.shop-opt span { display: inline-block; padding: .5rem .95rem; border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius); font-weight: 600; font-size: .9rem; background: #fff; min-width: 3rem; text-align: center; }
.shop-opt input:checked + span { border-color: var(--dtc-navy); box-shadow: inset 0 0 0 1px var(--dtc-navy); background: var(--dtc-blue-light); color: var(--dtc-navy-dark); }
.shop-opt input:focus-visible + span { outline: 2px solid var(--dtc-blue); outline-offset: 2px; }
.shop-buy__row { display: flex; gap: .75rem; align-items: stretch; flex-wrap: wrap; }
.shop-buy__row .dtc-btn { flex: 1 1 220px; justify-content: center; }
.shop-buy__row .dtc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.shop-qty input { width: 5rem; height: 100%; min-height: 48px; text-align: center; border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius); font: inherit; font-weight: 600; }
.shop-desc { border-top: 1px solid var(--dtc-border); padding-top: 1.25rem; line-height: 1.7; }
.shop-desc h2, .shop-desc h3 { color: var(--dtc-navy); font-size: 1.1rem; }
.shop-desc ul, .shop-desc ol { padding-left: 1.25rem; margin: 0 0 1rem; } .shop-desc ul { list-style: disc; } .shop-desc ol { list-style: decimal; } .shop-desc li { margin-bottom: .25rem; }

/* cart */
.shop-line { display: grid; grid-template-columns: 80px 1fr auto auto 32px; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--dtc-border); }
.shop-line__img img, .shop-line__img .shop-noimg { width: 80px; height: 80px; object-fit: cover; border-radius: var(--dtc-radius); display: block; }
.shop-line__info a { color: var(--dtc-navy); text-decoration: none; }
.shop-line .shop-qty input { min-height: 40px; width: 4.25rem; }
.shop-line__total { font-weight: 700; min-width: 5rem; text-align: right; }
.shop-line__remove { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--dtc-text-muted); }
.shop-line__remove:hover { color: #b91c1c; }
.shop-cart__foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.25rem 0; flex-wrap: wrap; }
.shop-cart__sum { display: grid; grid-template-columns: auto auto; gap: .25rem 1.5rem; text-align: right; }
.shop-cart__sum b { font-size: 1.25rem; }
.shop-cart__sum small { grid-column: 1 / -1; color: var(--dtc-text-muted); }
.shop-cart__go { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; }

/* checkout */
.shop-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.shop-checkout__side { position: sticky; top: 100px; }
.shop-box { background: #fff; border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius-lg); padding: 1.25rem 1.25rem 1rem; margin-bottom: 1.25rem; }
.shop-box h2 { font-size: 1.125rem; color: var(--dtc-navy); margin: 0 0 1rem; }
.shop-box h3 { font-size: .875rem; color: var(--dtc-navy); margin: 0 0 .3rem; }
.shop-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.shop-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; }
.shop-field { display: block; margin-bottom: .9rem; }
.shop-field span { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .3rem; }
.shop-field input, .shop-field select, .shop-field textarea { width: 100%; padding: .7rem .8rem; border: 1px solid var(--dtc-gray-300, #cbd5e1); border-radius: var(--dtc-radius); font: inherit; background: #fff; }
.shop-field input:focus, .shop-field select:focus, .shop-field textarea:focus { outline: 2px solid var(--dtc-blue); outline-offset: 0; border-color: var(--dtc-blue); }
.shop-choice { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--dtc-border); border-radius: var(--dtc-radius); margin-bottom: .6rem; cursor: pointer; }
.shop-choice:has(input:checked) { border-color: var(--dtc-navy); background: var(--dtc-blue-light); }
.shop-choice span { flex: 1; font-weight: 600; }
.shop-choice input { accent-color: var(--dtc-navy); width: 18px; height: 18px; }
.shop-paybox { padding: .25rem 0 .9rem; }
.shop-payel { min-height: 90px; }
.shop-sumline { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-size: .9375rem; }
.shop-sumline small { color: var(--dtc-text-muted); }
.shop-sumline--sep { border-top: 1px solid var(--dtc-border); margin-top: .5rem; padding-top: .75rem; }
.shop-sumline--total { font-size: 1.125rem; border-top: 2px solid var(--dtc-navy); margin-top: .4rem; padding-top: .7rem; }
.shop-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: .7rem .85rem; border-radius: var(--dtc-radius); margin: .9rem 0 0; font-size: .875rem; }
.shop-paybtn { width: 100%; justify-content: center; margin-top: 1rem; }
.shop-paybtn[disabled] { opacity: .65; cursor: wait; }
.shop-meta { margin: 1.25rem 0 1rem; }

/* order done */
.shop-done { text-align: center; padding: 1rem 0 1.5rem; }
.shop-done__icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: #dcfce7; color: #15803d; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.shop-done h1 { color: var(--dtc-navy); }

@media (max-width: 900px) {
  .shop-product, .shop-checkout { grid-template-columns: 1fr; gap: 1.5rem; }
  .shop-checkout__side { position: static; }
}
@media (max-width: 600px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .shop-card__body { padding: .75rem; }
  .shop-row2, .shop-row3 { grid-template-columns: 1fr; }
  .shop-line { grid-template-columns: 64px 1fr auto; grid-template-areas: "img info rm" "img qty total"; gap: .5rem .75rem; }
  .shop-line__img { grid-area: img; } .shop-line__img img, .shop-line__img .shop-noimg { width: 64px; height: 64px; }
  .shop-line__info { grid-area: info; } .shop-line .shop-qty { grid-area: qty; } .shop-line__total { grid-area: total; } .shop-line__remove { grid-area: rm; }
  .shop-cart__go .dtc-btn { flex: 1 1 100%; justify-content: center; }
}
