/**
 * PDP purchase-hero visual system.
 * HTHA-owned CSS. Does not copy MesonArt proprietary source.
 */

.htha-pdp-hero-wrap {
  background: #fff;
  padding-bottom: 8px;
}

.htha-pdp-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 18px;
  font-size: 14px;
  color: #555;
}
.htha-pdp-crumb__home {
  display: inline-flex;
  color: inherit;
}
.htha-pdp-crumb__link {
  color: inherit;
  text-decoration: none;
}
.htha-pdp-crumb__link:hover { text-decoration: underline; }
.htha-pdp-crumb__sep { opacity: 0.45; }
.htha-pdp-crumb__current { color: #555; }

.htha-pdp-context-links {
  margin: 0 0 8px;
}
.htha-pdp-context-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  font-size: 13px;
}
.htha-pdp-context-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.htha-product-detail .htha-product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(420px, 1fr);
  gap: 40px 52px;
  padding: 8px 0 40px;
  align-items: start;
  background: #fff;
}

.htha-product-hero__gallery,
.htha-product-hero__summary {
  min-width: 0;
}

/* WooCommerce core sets `.summary { width: 48% }` on the product wrapper.
   That percentage is of the GRID CELL, so the purchase column stayed ~half-width
   after the 1280 container change. Fill the right track. */
.woocommerce div.product .htha-product-hero__summary.summary,
.woocommerce-page div.product .htha-product-hero__summary.summary {
  float: none;
  width: 100%;
  max-width: none;
}

@media (min-width: 1024px) {
  .htha-product-hero__gallery,
  .htha-product-hero__summary {
    position: sticky;
    top: calc(var(--htha-header-h, 72px) + 12px);
    align-self: start;
  }
}

.htha-product-hero__summary h1.product_title {
  font-family: var(--htha-font-serif);
  font-size: clamp(36px, 3.6vw, 48px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--htha-text);
  margin: 4px 0 12px;
}

.htha-product-hero .htha-product-sku {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* Activity */
.htha-pdp-activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
  margin-bottom: 8px;
}
.htha-pdp-activity .htha-wishlist-form--heart {
  margin-left: auto;
}
.htha-pdp-activity__proof {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #c43b3b;
  font-size: 13px;
}
.htha-pdp-activity__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c43b3b;
  animation: htha-pdp-pulse 1.6s ease-in-out infinite;
}
@keyframes htha-pdp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.htha-wishlist-heart {
  border: 0;
  background: transparent;
  color: #c45a5a;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}
.htha-wishlist-heart[aria-pressed="true"] { color: #c43b3b; }

/* Rating */
.htha-pdp-rating { margin: 0 0 12px; }
.htha-pdp-rating a { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.htha-pdp-stars { color: #e8d3a2; letter-spacing: 2px; font-size: 16px; }
.htha-pdp-stars .is-on { color: #e0b33a; }
.htha-pdp-rating__count { color: #111; font-size: 14px; }

/* Sold */
.htha-pdp-sold {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  color: #111;
}
.htha-pdp-sold__icon { display: flex; }

/* Price */
.woocommerce div.product .htha-product-hero__summary p.price {
  color: #bb0000;
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 14px;
  line-height: 1.5;
}
.htha-product-hero__summary p.price del {
  color: #999;
  font-size: 18px;
  margin-right: 8px;
}
.htha-product-hero__summary p.price ins { text-decoration: none; color: #c43b3b; }

/* Payment */
.htha-pdp-payment {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e6e6e6;
  background: #fff;
  padding: 12px 14px;
  margin: 0 0 14px;
  min-height: 70px;
}
.htha-pdp-payment__mark {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #444;
  border: 1px solid #ddd;
  padding: 4px 8px;
}
.htha-pdp-payment__copy { font-size: 13px; color: #444; }
.htha-pdp-payment__copy p { margin: 0; }

.htha-pdp-shipping {
  color: #888;
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.45;
}

.htha-sale-end {
  color: #6f7a4b;
  font-size: 13px;
  margin: 0 0 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.htha-pdp-promo { margin: 0 0 18px; }
.htha-pdp-promo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.htha-pdp-divider {
  border: 0;
  border-top: 1px solid #eee;
  margin: 4px 0 18px;
}

/* Variation rows */
.htha-product-hero form.cart {
  display: block;
  margin: 0;
}
.htha-product-hero form.cart table.variations,
.htha-product-hero form.cart table.variations tbody,
.htha-product-hero form.cart table.variations tr,
.htha-product-hero form.cart table.variations td,
.htha-product-hero form.cart table.variations th {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  float: none;
}
.htha-product-hero form.cart table.variations {
  width: 100%;
}
.htha-pdp-simple-size { margin: 0 0 12px; }
.htha-pdp-simple-size .label,
.htha-product-hero form.cart table.variations th.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  font-weight: 600;
  text-align: left;
}
.htha-pdp-size-guide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  margin-left: auto;
  border: 1px solid #171717;
  border-radius: 15px;
  text-decoration: none;
  color: #171717;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}
.woocommerce div.product .htha-product-hero form.cart table.variations th.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
  color: #111;
  padding-bottom: 8px;
  text-align: left;
}
.htha-product-hero form.cart select {
  width: 100%;
  height: 52px;
  border: 0;
  background: rgba(23, 23, 23, 0.024);
  border-radius: 6px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 300;
  color: #171717;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.htha-product-hero .reset_variations {
  display: inline-block;
  margin: 8px 0 0;
  font-size: 12px;
  color: #888;
}

.htha-finish-field select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}
.htha-finish-field { position: relative; }
.htha-finish-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
  padding: 4px 0 8px;
}
.htha-finish-swatch {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.htha-finish-swatch__chip {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #eee;
  background: #e8e2d8;
  overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #eee;
}
.htha-finish-swatch.is-selected .htha-finish-swatch__chip,
.htha-finish-swatch:focus-visible .htha-finish-swatch__chip {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #111;
}
.htha-finish-swatch__chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.htha-finish-swatch[data-slug="rolled-canvas"] .htha-finish-swatch__chip { background: #d9cbb8; }
.htha-finish-swatch[data-slug="gallery-wrapped"] .htha-finish-swatch__chip { background: #cfc6b8; }
.htha-finish-swatch[data-slug="black-float-frame"] .htha-finish-swatch__chip { background: #1c1c1c; }
.htha-finish-swatch[data-slug="white-float-frame"] .htha-finish-swatch__chip { background: #f4f4f4; border-color: #ddd; }
.htha-finish-swatch[data-slug="natural-oak-frame"] .htha-finish-swatch__chip { background: #b0895a; }
.htha-finish-swatch[data-slug="gold-frame"] .htha-finish-swatch__chip { background: #c6a35a; }

.htha-pdp-delivery {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 16px;
  font-size: 14px;
  color: #111;
}
.htha-pdp-delivery__icon { color: #3b82c4; font-weight: 700; }

.htha-product-hero .woocommerce-variation-price,
.htha-product-hero .woocommerce-variation-availability,
.htha-product-hero .stock {
  display: none;
}

/* Qty + ATC */
.woocommerce div.product .htha-product-hero .woocommerce-variation-add-to-cart,
.woocommerce div.product .htha-product-hero form.cart:not(.variations_form) {
  display: flex !important;
  align-items: stretch;
  gap: 16px;
  margin: 0 0 16px;
}
.woocommerce div.product .htha-product-hero form.cart .quantity {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 126px;
  max-width: 126px;
  height: 60px;
  border: 1px solid #e5e5e5;
  border-radius: 60px;
  background: #fff;
  overflow: hidden;
  position: static;
  width: 126px;
  clip: auto;
}
.htha-product-hero.sold-individually .quantity,
.woocommerce div.product.sold-individually .htha-product-hero form.cart .quantity {
  position: static;
  width: 126px;
  height: 60px;
  overflow: hidden;
  clip: auto;
}
.htha-qty-btn {
  width: 46px;
  height: 60px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-size: 18px;
}
.htha-product-hero .quantity .qty {
  flex: 1;
  width: 34px;
  height: 60px;
  border: 0;
  text-align: center;
  background: transparent;
  box-shadow: none;
}
.woocommerce div.product .htha-product-hero form.cart .single_add_to_cart_button {
  flex: 1;
  height: 60px;
  border: 0;
  border-radius: 60px;
  background: #171717;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  width: auto;
  padding: 0 28px;
}

.htha-pdp-express:empty { display: none; }
.htha-pdp-more-pay {
  text-align: center;
  margin: 0 0 20px;
  font-size: 14px;
}
.htha-pdp-more-pay a { color: #111; }

.htha-pdp-trust {
  list-style: none;
  margin: 8px 0 20px;
  padding: 0;
  display: grid;
  gap: 16px;
}
.htha-pdp-trust li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.htha-pdp-trust__icon { color: #111; padding-top: 2px; }
.htha-pdp-trust__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.htha-pdp-trust__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid #bbb;
  border-radius: 50%;
  font-size: 11px;
  text-decoration: none;
  color: #666;
  margin-left: auto;
}
.htha-pdp-trust__body {
  margin: 4px 0 0;
  font-size: 13px;
  color: #666;
}

.htha-pdp-share-help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
  border-top: 0;
}
.htha-pdp-share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.htha-pdp-share__label { color: #111; font-weight: 600; }
.htha-pdp-share ul {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.htha-pdp-share a,
.htha-pdp-help a,
.htha-pdp-share button {
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.htha-pdp-share button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.htha-pdp-help { margin: 0; white-space: nowrap; }
.htha-pdp-help a { width: auto; gap: 6px; font-size: 13px; }
.htha-pdp-trade {
  margin: 10px 0 0;
  font-size: 13px;
}
.htha-pdp-trade a {
  text-decoration: none;
}
.htha-pdp-trade a:hover,
.htha-pdp-trade a:focus-visible {
  text-decoration: underline;
}

/* Gallery — scoped to hero so FlexSlider can measure intrinsic slide height.
   Do not use container-type / 100cqw / height:100% on slides: that made
   FlexSlider write inline height:0px on .flex-viewport. */
.htha-product-hero__gallery .woocommerce-product-gallery {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0;
  width: 100% !important;
  float: none;
  position: relative;
}
.htha-product-hero__gallery .woocommerce-product-gallery__trigger {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--htha-line, #d8d1c7);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(37, 34, 30, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--htha-ink, #25221e);
}
.htha-product-hero__gallery .woocommerce-product-gallery__trigger:hover {
  background: #fff;
}
.htha-product-hero__gallery .woocommerce-product-gallery__trigger img,
.htha-product-hero__gallery .woocommerce-product-gallery__trigger .emoji {
  display: none !important;
}
.htha-product-hero__gallery .woocommerce-product-gallery__trigger::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.htha-product-hero__gallery .flex-control-thumbs {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1 / span 2;
  gap: 10px;
  margin: 0;
  padding: 0 4px 0 0;
  width: 80px;
  max-height: min(72vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #d8d1c7 transparent;
}
.htha-product-hero__gallery .flex-control-thumbs::-webkit-scrollbar {
  width: 4px;
}
.htha-product-hero__gallery .flex-control-thumbs::-webkit-scrollbar-thumb {
  background: #d8d1c7;
  border-radius: 999px;
}
.htha-product-hero__gallery .flex-control-thumbs::-webkit-scrollbar-track {
  background: transparent;
}
.htha-product-hero__gallery .flex-viewport {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border-radius: 14px;
  background: #faf9f6;
}
.htha-product-hero__gallery .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #faf9f6;
}
/* Pre-init FOUC only. Woo FlexSlider never adds .flexslider, so :not(.flexslider)
   + display:none !important kept slides 2–9 hidden after init and beat inline display:block. */
.htha-product-hero__gallery .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image:not(:first-child) {
  display: none;
}
.htha-product-hero__gallery .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  display: block;
  float: left;
  background: #faf9f6;
  margin: 0;
}
.htha-product-hero__gallery .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image {
  background: #faf9f6;
  margin: 0;
}
.htha-product-hero__gallery .woocommerce-product-gallery__image a {
  display: block;
}
.htha-product-hero__gallery .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #faf9f6;
}
.htha-product-hero__gallery .flex-control-thumbs li {
  float: none;
  width: 100%;
  height: auto;
  margin: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
}
.htha-product-hero__gallery .flex-control-thumbs img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  opacity: 0.78;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}
.htha-product-hero__gallery .flex-control-thumbs img.flex-active {
  opacity: 1;
  border: 2px solid #2f2a25;
}
.htha-product-hero__gallery .flex-control-thumbs img:hover {
  opacity: 1;
}

.htha-product-detail .htha-section:not(.pdp-section) {
  padding: 72px 0;
}
.htha-product-jump {
  background: #fff;
  border-color: var(--htha-line, var(--htha-border));
}

@media (max-width: 1024px) {
  .htha-product-hero__gallery,
  .htha-product-hero__summary {
    position: static;
  }
  .htha-product-hero__gallery .woocommerce-product-gallery {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .htha-product-hero__gallery .woocommerce-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .htha-product-hero__gallery .flex-viewport,
  .htha-product-hero__gallery .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
    width: 100%;
    min-height: 240px;
  }
  .htha-product-hero__gallery .flex-control-thumbs {
    flex-direction: row;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .htha-product-hero__gallery .flex-control-thumbs li {
    flex: 0 0 68px;
    width: 68px;
    scroll-snap-align: start;
  }
  .htha-product-hero__gallery .woocommerce-product-gallery__trigger {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 900px) {
  .htha-product-detail .htha-product-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .htha-product-hero__summary h1.product_title {
    font-size: clamp(32px, 5vw, 40px);
  }
  .htha-product-hero .woocommerce-variation-add-to-cart,
  .htha-product-hero form.cart:not(.variations_form) {
    flex-wrap: wrap;
  }
  .htha-product-hero .quantity {
    flex: 0 0 126px;
    height: 60px;
  }
  .htha-product-hero .single_add_to_cart_button,
  .woocommerce div.product .htha-product-hero form.cart .single_add_to_cart_button {
    flex: 1 1 180px;
    height: 60px;
  }
}

@media (max-width: 430px) {
  .htha-product-hero__summary h1.product_title { font-size: clamp(32px, 8vw, 36px); }
  .htha-pdp-share-help { flex-direction: column; align-items: flex-start; }
  .htha-product-hero .single_add_to_cart_button { flex: 1 1 100%; }
}
