/*
 * woocommerce.css — Haus Stash WooCommerce Supplemental
 * Loaded only on WooCommerce pages (is_woocommerce, cart, checkout, account).
 * WC template overrides in /woocommerce/ handle primary layout.
 * Add global WC element adjustments here as needed post-launch.
 */

/* Ensure WC notices inherit brand type */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  font-family: var(--hs-font-body);
  font-size: var(--hs-text-13);
  border-radius: 0;
}

/* Remove WC default blue border-top accent on notices */
.woocommerce-message  { border-top-color: var(--hs-graphite); }
.woocommerce-info     { border-top-color: var(--hs-muted); }
.woocommerce-error    { border-top-color: #c0392b; }

/* WC form field focus — match brand */
.woocommerce-input-wrapper input:focus,
.woocommerce-input-wrapper select:focus,
.woocommerce-input-wrapper textarea:focus {
  outline: 2px solid var(--hs-graphite);
  outline-offset: 2px;
  border-color: var(--hs-graphite);
}

/* ═══════════════════════════════════════════════════
   SINGLE PRODUCT PAGE
═══════════════════════════════════════════════════ */

/* Breadcrumb */
.hs-breadcrumb-outer {
  padding: 1rem var(--hs-side-pad, 4rem);
  background: var(--hs-bone, #f0e8dc);
}
.hs-breadcrumb,
.woocommerce-breadcrumb {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hs-muted, #999);
  font-family: var(--hs-font-body, sans-serif);
}
.woocommerce-breadcrumb a { color: var(--hs-muted, #999); text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--hs-graphite, #1a1816); }

/* Main product layout — 2 column */
.hs-product-outer {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  min-height: 90vh;
  background: var(--hs-bone, #f0e8dc);
  align-items: start;
}

/* Grid items default to min-width:auto, so a wide thumb strip
   (6+ thumbs) forces the column past the viewport on mobile.
   min-width:0 lets the thumbs' own overflow-x:auto handle it. */
.hs-product-outer > * {
  min-width: 0;
}

/* Kill WooCommerce's default float layout — our grid handles it */
.woocommerce-product-gallery,
.woocommerce div.product div.images {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Gallery — left column */
.hs-gallery {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--hs-stone, #ddd8d0);
}

/* Main image fills the gallery area */
.hs-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hs-gallery__placeholder {
  width: 100%;
  height: 100%;
  background: var(--hs-stone, #ddd8d0);
}

/* Thumbnail strip — small squares overlaid in top-left corner */
.hs-gallery__thumbs {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hs-gallery__thumb {
  width: 56px;
  height: 56px;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.hs-gallery__thumb.is-active { border-color: var(--hs-graphite, #1a1816); }
.hs-gallery__thumb:hover { border-color: rgba(26,24,22,0.5); }
.hs-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Expand button */
.hs-gallery__expand-wrap {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 2;
}
.hs-gallery__expand {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Info — right column */
.hs-product-info {
  padding: 5rem var(--hs-side-pad, 4rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Collection label */
.hs-product-info__collection {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--hs-muted, #999);
}

/* Product title */
.hs-product-info .product_title,
.hs-product-info h1 {
  font-family: var(--hs-font-display, Georgia, serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  color: var(--hs-graphite, #1a1816);
  margin: 0;
  line-height: 1.15;
}

/* Price */
.hs-product-info .price,
.hs-product-info .woocommerce-Price-amount {
  font-family: var(--hs-font-body, sans-serif);
  font-size: 1rem;
  color: var(--hs-graphite, #1a1816);
  letter-spacing: 0.5px;
}
.hs-product-info .price del { color: var(--hs-muted, #999); margin-right: 0.5rem; }

/* Short description */
.hs-product-info .woocommerce-product-details__short-description p {
  font-size: var(--hs-text-15, 0.9375rem);
  line-height: 1.7;
  color: var(--hs-graphite, #1a1816);
  margin: 0;
}

/* Divider */
.hs-product-divider {
  height: 1px;
  background: var(--hs-border, #e0d8ce);
  width: 100%;
}

/* ── WooCommerce Add-to-Cart button override ─── */
body.single-product button.button,
body.single-product button.single_add_to_cart_button,
body.single-product input.button,
body.woocommerce-page.single-product .cart button[type="submit"],
body.woocommerce-page.single-product button.button.alt {
  background: var(--hs-graphite, #1a1816) !important;
  background-color: var(--hs-graphite, #1a1816) !important;
  color: var(--hs-bone, #f0e8dc) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--hs-font-body, sans-serif) !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  padding: 1rem 2rem !important;
  cursor: pointer !important;
  width: 100% !important;
  transition: opacity 0.2s !important;
}
body.single-product button.button:hover,
body.single-product button.single_add_to_cart_button:hover { opacity: 0.8 !important; }

/* Quantity input */
.hs-product-info .quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hs-product-info .quantity input.qty {
  width: 60px;
  text-align: center;
  border: 1px solid var(--hs-border, #e0d8ce);
  padding: 0.5rem;
  font-family: var(--hs-font-body, sans-serif);
  font-size: 0.875rem;
  background: transparent;
  color: var(--hs-graphite, #1a1816);
  border-radius: 0;
  -moz-appearance: textfield;
}
.hs-product-info .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Custom qty +/- buttons */
.hs-qty__btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--hs-border, #e0d8ce);
  background: transparent;
  color: var(--hs-graphite, #1a1816);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.hs-qty__btn:hover { background: var(--hs-graphite, #1a1816); color: var(--hs-bone, #f0e8dc); }

/* Add to Collection (wishlist) button */
.hs-btn-collection {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--hs-graphite, #1a1816);
  color: var(--hs-graphite, #1a1816);
  font-family: var(--hs-font-body, sans-serif);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.hs-btn-collection:hover {
  background: var(--hs-graphite, #1a1816);
  color: var(--hs-bone, #f0e8dc);
}

/* ── Accordion ──────────────────────────────────── */
.hs-accordion {
  border-top: 1px solid var(--hs-border, #e0d8ce);
  margin-top: 0.5rem;
}
.hs-accordion-item {
  border-bottom: 1px solid var(--hs-border, #e0d8ce);
}
.hs-accordion-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 1rem 0;
  font-family: var(--hs-font-body, sans-serif);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hs-graphite, #1a1816);
  cursor: pointer;
  text-align: left;
}
.hs-accordion-icon { font-size: 1.1rem; color: var(--hs-muted, #999); }
.hs-accordion-btn:focus { outline: none; background: none; }
.hs-accordion-btn:focus-visible { outline: 2px solid var(--hs-graphite, #1a1816); outline-offset: 2px; }
.hs-accordion-body {
  display: none;
  padding: 0 0 1.25rem;
  font-size: var(--hs-text-14, 0.875rem);
  line-height: 1.7;
  color: var(--hs-graphite, #1a1816);
}
.hs-accordion-item.is-open .hs-accordion-body { display: block; }
.hs-accordion-item.is-open .hs-accordion-icon { transform: rotate(45deg); }

/* ── Interior Edition band ─────────────────────── */
.hs-edition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 60vh;
  margin-top: 4rem;
}
.hs-edition__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem var(--hs-side-pad, 4rem);
  background: var(--hs-dark, #1a1816);
}
.hs-edition__rule {
  width: 40px;
  height: 1px;
  background: var(--hs-muted, #666);
  margin-bottom: 2rem;
}
.hs-edition__eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--hs-muted, #888);
  margin-bottom: 1rem;
  display: block;
}
.hs-edition__quote {
  font-family: var(--hs-font-display, Georgia, serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--hs-bone, #f0e8dc);
  line-height: 1.4;
  margin: 0;
}
.hs-edition__photo {
  overflow: hidden;
  background: var(--hs-stone, #ccc);
}
.hs-edition__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ══════════════════════════════════════════════════
   SHOP ARCHIVE (Objects page) — Full Width layout,
   centered inner content
   Kadence page layout = Full Width (kills the white bar
   below the header); these rules re-constrain only the
   product area to site content width.
═══════════════════════════════════════════════════ */

/* No gap below navigation — background starts under menu */
.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main,
.woocommerce-shop .site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Constrain inner shop content, not the page wrapper.
   Verified markup: ul.products (carries .content-wrap) and
   .kadence-shop-top-row (result count + sorting) sit directly
   in main.site-main. */
.post-type-archive-product .site-main ul.products,
.tax-product_cat .site-main ul.products,
.tax-product_tag .site-main ul.products,
.woocommerce-shop .site-main ul.products,
.post-type-archive-product .site-main .kadence-shop-top-row,
.tax-product_cat .site-main .kadence-shop-top-row,
.tax-product_tag .site-main .kadence-shop-top-row,
.woocommerce-shop .site-main .kadence-shop-top-row,
.post-type-archive-product .site-main .woocommerce-products-header,
.woocommerce-shop .site-main .woocommerce-products-header {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 767.98px) {
  .post-type-archive-product .site-main ul.products,
  .tax-product_cat .site-main ul.products,
  .tax-product_tag .site-main ul.products,
  .woocommerce-shop .site-main ul.products,
  .post-type-archive-product .site-main .kadence-shop-top-row,
  .woocommerce-shop .site-main .kadence-shop-top-row,
  .post-type-archive-product .site-main .woocommerce-products-header,
  .woocommerce-shop .site-main .woocommerce-products-header {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}

/* ══════════════════════════════════════════════════
   MOBILE — Single Product refinement (< 768px)
   Desktop layout above is untouched.
═══════════════════════════════════════════════════ */
@media (max-width: 767.98px) {

  /* ── Breadcrumb ── */
  .hs-breadcrumb-outer {
    padding: 1.25rem 1.75rem 0.25rem;
  }

  /* ── Layout: single column ── */
  .hs-product-outer {
    grid-template-columns: 1fr !important;
    min-height: auto;
  }

  /* ── Gallery: full-width image, thumbs in a row below ── */
  .hs-gallery {
    position: relative;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    background: var(--hs-bone, #f0e8dc);
  }
  .hs-gallery__main-img,
  .hs-gallery__placeholder {
    order: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }
  /* Thumbnails: static horizontal strip below the image —
     no overlap with image or product info */
  .hs-gallery__thumbs {
    order: 2;
    position: static;
    flex-direction: row;
    gap: 10px;
    padding: 14px 1.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hs-gallery__thumbs::-webkit-scrollbar { display: none; }
  .hs-gallery__thumb {
    width: 64px;
    height: 64px;
    background: var(--hs-stone, #ddd8d0);
  }
  /* Expand button: pin to top-right of the image
     (gallery bottom is now the thumb row) */
  .hs-gallery__expand-wrap {
    top: 1rem;
    right: 1rem;
    bottom: auto;
  }

  /* ── Product info: generous, breathable spacing ── */
  .hs-product-info {
    padding: 3rem 1.75rem 4.5rem;
    gap: 1.5rem;
  }

  /* ── Mobile order:
     collection → title → price → add to cart →
     description → collection details / specs (accordion) ── */
  .hs-product-info > * { order: 20; }
  .hs-product-info__collection { order: 1; }
  .hs-product-info .product_title { order: 2; }
  .hs-product-info .price { order: 3; }
  .hs-product-info form.cart { order: 4; }
  .hs-product-info .woocommerce-product-details__short-description { order: 5; }
  .hs-product-divider { order: 6; }
  .hs-color-label { order: 7; }
  .hs-color-swatches { order: 8; }
  .hs-accordion { order: 9; }

  /* ── Typography: editorial rhythm ── */
  .hs-product-info .product_title,
  .hs-product-info h1 {
    font-size: 1.9rem;
    line-height: 1.2;
    margin-top: 0.25rem;
  }
  .hs-product-info .price {
    margin: 0;
    font-size: 1.0625rem;
  }
  .hs-product-info .woocommerce-product-details__short-description {
    margin-top: 0.75rem;
  }
  .hs-product-info .woocommerce-product-details__short-description p {
    max-width: 60ch;
    line-height: 1.8;
  }
  .hs-product-info .woocommerce-product-details__short-description p + p {
    margin-top: 1em;
  }
  .hs-product-info form.cart {
    margin-top: 0.5rem;
  }

  /* Accordion (Collection Details / Specifications) */
  .hs-accordion {
    margin-top: 1rem;
  }
  .hs-accordion-btn {
    padding: 1.15rem 0;
  }
  .hs-accordion-body {
    max-width: 60ch;
    line-height: 1.8;
    padding: 0 0 1.5rem;
  }

  /* ── Interior Edition band ── */
  .hs-edition {
    grid-template-columns: 1fr;
    margin-top: 4.5rem;
  }
  .hs-edition__text {
    padding: 4rem 1.75rem;
  }
  .hs-edition__quote {
    max-width: 32ch;
  }

  /* ── Related products ── */
  .related.products {
    padding: 4.5rem 1.75rem 3rem;
  }
  .related.products > h2 {
    font-family: var(--hs-font-display, Georgia, serif);
    font-weight: 400;
    font-size: 1.5rem;
    margin: 0 0 2rem;
  }
  .related.products ul.products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .related.products ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
  }

  /* ── Detail close-up band ── */
  .hs-detail {
    display: flex;
    flex-direction: column;
    margin-top: 3rem;
  }
  .hs-detail__text {
    padding: 3.5rem 1.75rem 4.5rem;
  }
  .hs-detail__quote,
  .hs-detail__body {
    max-width: 60ch;
    line-height: 1.7;
  }
}

/* ══════════════════════════════════════════════════
   OBJECTS ARCHIVE — EDITORIAL GALLERY REDESIGN
   Scope: archive body classes only. Does NOT touch
   single product, related products, cart, or checkout.
   Visual only — Kadence/WC loop markup untouched.
   Motion: 250ms ease-out, opacity + subtle scale only.
═══════════════════════════════════════════════════ */

/* ── Remove interface noise: result count, sorting row,
     sale badges, ratings, loop add-to-cart ── */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) :is(
  .kadence-shop-top-row,
  .woocommerce-result-count,
  .woocommerce-ordering,
  ul.products li.product .onsale,
  ul.products li.product .star-rating,
  ul.products li.product .button,
  ul.products li.product .add_to_cart_button,
  ul.products li.product .product-action-wrap,
  ul.products li.product .added_to_cart) {
  display: none !important;
}

/* ── De-card the loop item: no surface, no frame ── */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .product-details,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .content-bg,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .entry-content-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .product-details {
  padding: 0 !important;
  text-align: left !important;
}
/* No lift/shadow on hover — ever */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* ── Grid: exhibition spacing ── */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products {
  display: grid !important;
  column-gap: 2.5rem;
  row-gap: 4.5rem;
  margin-top: 2.5rem !important;
  margin-bottom: 6rem !important;
  padding-top: 0;
  list-style: none;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products li.product {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Honor Kadence column setting */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ── Image: soft radius, floats on the bone background ── */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .product-image,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product img {
  display: block;
  width: 100%;
  border-radius: 12px;
  transform: scale(1);
  transition: transform 250ms ease-out;
  will-change: transform;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product:hover img {
  transform: scale(1.025);
}

/* ── Typography: object name, then price ── */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .woocommerce-loop-product__title,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .product-title,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product h2,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product h3 {
  font-family: var(--hs-font-body, sans-serif);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: rgba(26, 24, 22, 0.75);
  margin: 1.25rem 0 0 !important;
  padding: 0 !important;
  transition: color 250ms ease;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product a {
  text-decoration: none;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product:hover :is(.woocommerce-loop-product__title, .product-title, h2, h3) {
  color: var(--hs-graphite, #1a1816);
}

/* Price — quiet, beneath the name */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .price {
  display: block;
  font-family: var(--hs-font-body, sans-serif);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(26, 24, 22, 0.55);
  margin: 0.5rem 0 0 !important;
  opacity: 1;
  transition: opacity 250ms ease;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .price del {
  color: var(--hs-muted, #9B9188);
  margin-right: 0.4rem;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .price ins {
  text-decoration: none;
}

/* Desktop / hover-capable devices only:
   price hidden until hover (or keyboard focus), pure 250ms fade.
   Opacity keeps its space reserved — zero layout shift. */
@media (hover: hover) and (pointer: fine) {
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .price {
    opacity: 0;
  }
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product:hover .price,
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product:focus-within .price {
    opacity: 1;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product img,
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .price {
    transition: none;
  }
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product:hover img {
    transform: none;
  }
}

/* ── Pagination: quiet, typographic ── */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-pagination {
  margin: 0 auto 5rem;
  text-align: center;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-pagination ul.page-numbers {
  border: 0 !important;
  display: inline-flex;
  gap: 1.25rem;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-pagination ul.page-numbers li {
  border: 0 !important;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-pagination .page-numbers {
  background: transparent !important;
  border: 0 !important;
  font-family: var(--hs-font-body, sans-serif);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: rgba(26, 24, 22, 0.55);
  padding: 0.25rem 0.4rem;
  transition: color 250ms ease;
}
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-pagination .page-numbers:hover,
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .woocommerce-pagination .page-numbers.current {
  color: var(--hs-graphite, #1a1816);
}

/* ── Responsive: tablet keeps air, mobile stays readable ── */
@media (max-width: 1024px) {
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products {
    column-gap: 1.75rem;
    row-gap: 3.5rem;
  }
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products.columns-4,
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products.columns-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) .site-main ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 1rem;
    row-gap: 3rem;
    margin-top: 1.5rem !important;
    margin-bottom: 4.5rem !important;
  }
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product img,
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .product-image,
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product a.woocommerce-LoopProduct-link {
    border-radius: 10px;
  }
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product :is(.woocommerce-loop-product__title, .product-title, h2, h3) {
    font-size: 0.8125rem;
    margin-top: 1rem !important;
  }
  /* Price always visible on touch — hover doesn't exist */
  :is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .price {
    opacity: 1 !important;
    font-size: 0.75rem;
  }
}

/* ══════════════════════════════════════════════════
   OBJECT NUMBER — museum catalog reference
   Rendered via hs_render_object_number() (functions.php)
   from native post meta key "object_number".
═══════════════════════════════════════════════════ */
.hs-object-number {
  display: block;
  font-family: var(--hs-font-body, sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hs-muted, #9B9188);
  line-height: 1;
}

/* Archive grid: name → number (5px above) → price
   (price's existing 8px top margin provides the gap below) */
:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .woocommerce-shop) ul.products li.product .hs-object-number {
  margin: 5px 0 0;
}

/* Single product: .hs-product-info is a flex column with gap,
   so negative margins pull the number to catalog spacing —
   ~5px below the title, ~9px above the price. */
.hs-product-info .hs-object-number {
  margin-top: calc(5px - 1.25rem);    /* desktop gap: 1.25rem */
  margin-bottom: calc(9px - 1.25rem);
}
@media (max-width: 767.98px) {
  .hs-product-info .hs-object-number {
    order: 2; /* after title (order 2, earlier in DOM), before price (order 3) */
    margin-top: calc(5px - 1.5rem);   /* mobile gap: 1.5rem */
    margin-bottom: calc(9px - 1.5rem);
  }
}

/* ══════════════════════════════════════════════════
   HOMEPAGE — "NEW OBJECTS" (Product Collection block)
   Scope: .home + wp-block-woocommerce-product-collection
   only. Matches the Objects archive gallery system:
   no card, editorial type, price fade on hover.
   Square image corners per markup (Kadence content-bg
   card look removed entirely).
═══════════════════════════════════════════════════ */

/* ── De-card: kill Kadence content-bg/loop-entry surface ── */
.home .wp-block-woocommerce-product-collection li.wc-block-product,
.home .wp-block-woocommerce-product-collection li.wc-block-product.content-bg,
.home .wp-block-woocommerce-product-collection li.wc-block-product.loop-entry {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
.home .wp-block-woocommerce-product-collection li.wc-block-product:hover {
  box-shadow: none !important;
  transform: none !important;
}

/* ── Grid: exhibition spacing ──
   The block's default auto-fill grid recalculates column
   count from available width, so wider gaps collapse it to
   3-up. Pin the column count from the block's columns-N
   class instead (same approach as the archive). */
.home ul.wc-block-product-template {
  display: grid !important;
  column-gap: 2.5rem !important;
  row-gap: 4.5rem !important;
}
.home ul.wc-block-product-template.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.home ul.wc-block-product-template.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.home ul.wc-block-product-template.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.home ul.wc-block-product-template.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }

/* ── Image: square corners, no clipping wrapper radius,
      subtle scale on hover ── */
.home .wp-block-woocommerce-product-collection .wc-block-components-product-image,
.home .wp-block-woocommerce-product-collection .wc-block-components-product-image a {
  display: block;
  border-radius: 0 !important;
  overflow: hidden;
  margin: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.home .wp-block-woocommerce-product-collection li.wc-block-product img {
  display: block;
  width: 100%;
  border-radius: 0 !important;
  transform: scale(1);
  transition: transform 250ms ease-out;
  will-change: transform;
}
.home .wp-block-woocommerce-product-collection li.wc-block-product:hover img {
  transform: scale(1.025);
}

/* ── Hide sale badge / any stray loop buttons ── */
.home .wp-block-woocommerce-product-collection :is(
  .wc-block-components-product-sale-badge,
  .wp-block-woocommerce-product-sale-badge,
  .add_to_cart_button,
  .wc-block-components-product-button) {
  display: none !important;
}

/* ── Title: same voice as the archive ── */
.home .wp-block-woocommerce-product-collection h3.wp-block-post-title {
  font-family: var(--hs-font-body, sans-serif);
  font-size: 0.875rem !important;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin: 1.25rem 0 0 !important;
  padding: 0 !important;
}
.home .wp-block-woocommerce-product-collection h3.wp-block-post-title a {
  color: rgba(26, 24, 22, 0.75);
  text-decoration: none;
  transition: color 250ms ease;
}
.home .wp-block-woocommerce-product-collection li.wc-block-product:hover h3.wp-block-post-title a {
  color: var(--hs-graphite, #1a1816);
}

/* ── Object number: base .hs-object-number styles apply;
      only the archive-matching top margin is needed ── */
.home .wp-block-woocommerce-product-collection .hs-object-number {
  margin: 5px 0 0;
}

/* ── Price: quiet, fades in on hover (desktop) ── */
.home .wp-block-woocommerce-product-collection .hs-loop-price {
  display: block;
  font-family: var(--hs-font-body, sans-serif);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(26, 24, 22, 0.55);
  margin: 0.5rem 0 0;
  opacity: 1;
  transition: opacity 250ms ease;
}
.home .wp-block-woocommerce-product-collection .hs-loop-price del { color: var(--hs-muted, #9B9188); margin-right: 0.4rem; }
.home .wp-block-woocommerce-product-collection .hs-loop-price ins { text-decoration: none; }

@media (hover: hover) and (pointer: fine) {
  .home .wp-block-woocommerce-product-collection .hs-loop-price {
    opacity: 0; /* space stays reserved — no grid jump */
  }
  .home .wp-block-woocommerce-product-collection li.wc-block-product:hover .hs-loop-price,
  .home .wp-block-woocommerce-product-collection li.wc-block-product:focus-within .hs-loop-price {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .wp-block-woocommerce-product-collection li.wc-block-product img,
  .home .wp-block-woocommerce-product-collection .hs-loop-price {
    transition: none;
  }
  .home .wp-block-woocommerce-product-collection li.wc-block-product:hover img {
    transform: none;
  }
}

/* ── Responsive ──
   Tablet range is bounded (min 768px) so its higher-specificity
   .columns-N rule can't override the 2-col phone layout below. */
@media (min-width: 768px) and (max-width: 1024px) {
  .home ul.wc-block-product-template {
    column-gap: 1.75rem !important;
    row-gap: 3.5rem !important;
  }
  .home ul.wc-block-product-template.columns-4,
  .home ul.wc-block-product-template.columns-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 767.98px) {
  .home ul.wc-block-product-template,
  .home ul.wc-block-product-template.columns-3,
  .home ul.wc-block-product-template.columns-4,
  .home ul.wc-block-product-template.columns-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 1rem !important;
    row-gap: 3rem !important;
  }
  .home .wp-block-woocommerce-product-collection h3.wp-block-post-title {
    font-size: 0.8125rem !important;
    margin-top: 1rem !important;
  }
  .home .wp-block-woocommerce-product-collection .hs-loop-price {
    opacity: 1 !important; /* always visible on touch */
    font-size: 0.75rem;
  }
}
