/* public/css/shop-pages.css — storefront page styles (WP A): home, catalog, product page, legal pages.
   Tokens and components come from shop.css (F). No style= attributes anywhere; mobile first (640 / 960 / 1200). */

/* ---------- home ---------- */
.hero { background: var(--c-surface); border-radius: var(--radius); padding: var(--s-6) var(--s-4); margin-bottom: var(--s-6); text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-title { font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--c-primary); }
.hero-text { font-size: var(--fs-lg); color: var(--c-muted); margin-bottom: var(--s-5); }
.home-section { margin-bottom: var(--s-7); }
.section-head { margin-bottom: var(--s-4); }
.section-head h2 { margin: 0; }
.section-link { font-weight: 600; white-space: nowrap; }
.category-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-card { display: flex; flex-direction: column; gap: var(--s-1); min-height: 96px; padding: var(--s-4); border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--c-text); transition: border-color 0.15s, box-shadow 0.15s; }
.category-card:hover, .category-card:focus-visible { border-color: var(--c-primary); box-shadow: var(--shadow); color: var(--c-text); }
.category-name { font-weight: 700; color: var(--c-primary); font-size: var(--fs-lg); }
.category-desc { color: var(--c-muted); font-size: var(--fs-sm); }
.catalog-footnote { margin-top: var(--s-4); }
@media (min-width: 640px) { .hero { padding: var(--s-7) var(--s-6); } .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- catalog ---------- */
.catalog-count { margin: 0; }
.catalog { display: grid; gap: var(--s-5); align-items: start; }
.catalog-filters-toggle { margin-bottom: var(--s-3); }
.catalog-filters { display: none; background: var(--c-surface); border-radius: var(--radius); padding: var(--s-4); }
.catalog-filters.is-open { display: block; }
.catalog-filters-title { margin-bottom: var(--s-3); }
.catalog-filters .form-field { margin-bottom: var(--s-3); }
.catalog-filters fieldset { margin-bottom: var(--s-3); }
.catalog-filters legend { font-size: var(--fs-sm); margin-bottom: var(--s-1); }
.catalog-filters-actions { margin-top: var(--s-2); align-items: center; }
.catalog-results { min-width: 0; }
.product-grid > li { min-width: 0; }
@media (min-width: 960px) {
  .catalog { grid-template-columns: 260px minmax(0, 1fr); }
  .catalog-filters-toggle { display: none; }
  .catalog-filters { display: block; position: sticky; top: 88px; }
}

/* ---------- product page ---------- */
.product-layout { display: grid; gap: var(--s-5); margin-bottom: var(--s-7); }
.product-gallery { min-width: 0; }
.gallery-main { margin: 0; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.gallery-main figcaption { padding: var(--s-2) var(--s-3); text-align: center; }
.gallery-thumbs { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.gallery-thumb { width: 72px; height: 72px; padding: 2px; border: 2px solid var(--c-border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.gallery-thumb:hover { border-color: var(--c-muted); }
.gallery-thumb[aria-current="true"] { border-color: var(--c-primary); }
.product-buy { min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.product-header { margin: 0; }
.product-title { margin-bottom: var(--s-1); }
.product-subtitle { margin: 0; }
.product-price { display: flex; flex-direction: column; gap: var(--s-1); }
.product-price .price-note { margin: 0; }
.product-availability { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.product-delivery { color: var(--c-muted); font-size: var(--fs-sm); }
.product-form { display: flex; flex-direction: column; gap: var(--s-4); }
.product-variants-title { margin-bottom: var(--s-2); }
.variant-group { margin-bottom: var(--s-3); border-radius: var(--radius-sm); }
.variant-group:focus { outline: 3px solid var(--c-focus); outline-offset: 4px; }
.variant-group.has-error legend { color: var(--c-danger); }
.variant-group .field-error { margin-top: var(--s-2); }
.chip-suffix:empty { display: none; }
.chip-suffix { font-size: var(--fs-sm); margin-left: var(--s-1); }
.product-qty { margin-bottom: 0; max-width: 220px; }
.product-actions { display: flex; flex-direction: column; gap: var(--s-2); border-radius: var(--radius-sm); }
.product-actions:focus { outline: 3px solid var(--c-focus); outline-offset: 4px; }
.product-blocked { margin: 0; font-weight: 600; }
.product-blocked[hidden], [data-add-button][hidden], [data-sku-wrap][hidden] { display: none; }
.product-sku { margin: 0; }
.product-hint { margin: 0; }
.product-details { display: flex; flex-direction: column; gap: var(--s-6); max-width: 820px; }
.product-section h2 { margin-bottom: var(--s-3); }
.details-table th { width: 40%; font-weight: 600; color: var(--c-muted); }
.gpsr-list { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); }
.gpsr-row { display: grid; gap: var(--s-1); }
.gpsr-row dt { font-weight: 600; color: var(--c-muted); font-size: var(--fs-sm); }
.gpsr-row dd { margin: 0; }
.gpsr-safety p:last-child { margin-bottom: 0; }
@media (min-width: 640px) {
  .gpsr-row { grid-template-columns: 220px 1fr; gap: var(--s-3); }
  .product-actions { max-width: 420px; }
}
@media (min-width: 960px) {
  .product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); }
  .gallery-thumb { width: 88px; height: 88px; }
}

/* ---------- legal pages ---------- */
.legal-page { margin: 0 auto; }
.legal-page h1 { margin-bottom: var(--s-5); }
.legal-text h2:first-child { margin-top: 0; }
.legal-section { margin-top: var(--s-6); }
.legal-empty { text-align: left; padding: var(--s-4) 0; }
.shipping-table td.num, .shipping-table th.num { text-align: right; }
.payment-list { padding-left: 1.25rem; }

/* ---------- responsive hardening (320 px, 200 % zoom) ---------- */
.breadcrumb li[aria-current="page"] { color: var(--c-text); font-weight: 600; word-break: break-word; }
.product-title, .hero-title, .page-header h1 { overflow-wrap: anywhere; }
@media (max-width: 400px) { .gallery-thumb { width: 60px; height: 60px; } .product-qty { max-width: none; } }
