/* ============================================================
   Shop + product pages (Z-06)  -  shop profile, product detail,
   product lists, order and contact-a-potter, shop info.
   Page-only layer on top of zinnober.css. Reuses zn-card,
   zn-avatar, zn-stamp, zn-price, zn-chip, zn-band and zn-pager.
   ============================================================ */

/* ---------- Shop profile: photo-first header ---------- */

.sp-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.sp-header-media {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--zn-ground);
  border: 1px solid var(--zn-line);
  border-radius: var(--zn-radius);
}

.sp-header-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-header-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sp-header-owner {
  margin: 0;
  color: var(--zn-muted);
}

.sp-header-location {
  margin: 0;
  color: var(--zn-muted);
}

/* ---------- Action row: thumb-sized quick actions ---------- */

.sp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.1rem 0 1.75rem;
}

/* ---------- Generic section rhythm ---------- */

.sp-section {
  margin: 2.25rem 0;
}

.sp-empty {
  color: var(--zn-muted);
}

.sp-more {
  margin-top: 1.1rem;
}

/* ---------- Product detail ---------- */

.sp-product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin: 1.75rem 0 2.5rem;
}

.sp-product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--zn-ground);
  border: 1px solid var(--zn-line);
  border-radius: var(--zn-radius);
}

.sp-product-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sp-product-body {
  min-width: 0;
}

.sp-product-price {
  margin: 0.4rem 0 1.1rem;
  font-size: 1.125rem;
}

.sp-product-description {
  margin-bottom: 1.5rem;
}

.sp-product-description p:last-child {
  margin-bottom: 0;
}

/* ---------- Cross-link shop card (product -> shop) ---------- */

.sp-shop-card {
  margin-top: 2rem;
}

.sp-shop-card-link {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.sp-shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

/* ---------- Product list: subcategory filter chips ---------- */

.sp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.sp-list {
  margin-bottom: 2rem;
}

/* ---------- Order + contact: single-column informational pages ---------- */

.sp-order,
.sp-contact,
.sp-info {
  max-width: 34rem;
  margin: 1.75rem 0 3rem;
}

.sp-order-ref {
  margin: 0.2rem 0 1.5rem;
  color: var(--zn-muted);
}

.sp-contact-lead {
  margin-bottom: 1.5rem;
}

/* ---------- Shop info: sanitized rich text ---------- */

.sp-info-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.5rem;
}

.sp-info-body ul,
.sp-info-body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.sp-info-body li {
  margin-bottom: 0.3em;
}

@media (min-width: 640px) {
  .sp-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .sp-header-media {
    width: 16rem;
  }
}

@media (min-width: 900px) {
  .sp-product {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}
