/* Uniform rounding for opted-in product photos; preserve WooCommerce zoom. */
body.single-product .hive-tonal-gallery .woocommerce-product-gallery__image,
body.single-product .hive-tonal-gallery .flex-viewport {
  border-radius: 10px;
  overflow: hidden;
}
body.single-product .hive-tonal-gallery .woocommerce-product-gallery__image.hive-photo-sampled {
  background-color: var(--hive-photo-background, #eed8c7);
  /* Crossing diagonal washes give each corner a different shade of the garment color. */
  background-image:
    url('gallery-grain.svg'),
    linear-gradient(135deg, #ffffff57 0%, #ffffff24 38%, #ffffff14 100%),
    linear-gradient(45deg, #ffffff38 0%, #ffffff0a 48%, #ffffff0a 100%);
  background-size: 180px 180px, 100% 100%, 100% 100%;
  isolation: isolate;
  transition: background-color .25s ease;
}
body.single-product .hive-tonal-gallery .woocommerce-product-gallery__image > a {display:block;background:transparent;}
body.single-product .hive-tonal-gallery .woocommerce-product-gallery__image img {background:transparent;}
/* Keep added darkness close to the fabric edge, with almost no offset or blur,
   so the garment rests on the surface rather than casting a floating shadow. */
body.single-product .hive-tonal-gallery .woocommerce-product-gallery__image.hive-photo-sampled > a > img {
  filter: drop-shadow(.5px 1px .35px rgb(35 20 12 / 65%));
}
@media(prefers-reduced-motion:reduce){body.single-product .hive-tonal-gallery .woocommerce-product-gallery__image {transition:none;}}

/* A quiet, opaque veil hides Woo's intermediate reset and reveals image + tone together. */
body.single-product .hive-tonal-gallery { position: relative; }
.hive-preview-loader[hidden] { display: none !important; }
.hive-preview-loader {
  position: absolute; inset: 0 0 auto; z-index: 5; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; background: radial-gradient(ellipse at 20% 10%, #fffdf8, #f2eee4 80%);
  color: #234c4c; opacity: 1; transition: opacity 240ms ease;
  pointer-events: auto;
}
.hive-preview-loader::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, #ffffff85 48%, transparent 65%);
  transform: translateX(-100%); animation: hive-preview-light 2.4s ease-in-out infinite;
}
.hive-preview-loader.is-leaving { opacity: 0; pointer-events: none; }
.hive-preview-loader-art { width: 90px; height: 96px; position: relative; margin-bottom: 20px; }
.hive-preview-loader-art svg { width: 80px; fill: #dfd6c3; stroke: #657d73; stroke-width: 1.2; animation: hive-shirt-breathe 2s ease-in-out infinite; }
.hive-preview-loader-art .hive-loader-stitch { fill: none; stroke-dasharray: 2 2; }
.hive-preview-loader-art span { position: absolute; font-size: 19px; color: #b48542; animation: hive-shirt-breathe 2s ease-in-out infinite alternate; }
.hive-preview-loader-art span:nth-child(2) { right: -3px; top: 2px; }
.hive-preview-loader-art span:nth-child(3) { left: -6px; bottom: 12px; animation-delay: .6s; }
.hive-preview-loader-title { font-family: Georgia, serif; font-size: 22px; line-height: 1.4; }
.hive-preview-loader-color { margin-top: 8px; font-size: 12px; letter-spacing: .08em; }
.hive-preview-retry { margin-top: 18px; position: relative; z-index: 1; }
@keyframes hive-preview-light { to { transform: translateX(100%); } }
@keyframes hive-shirt-breathe { 50% { transform: translateY(-4px); opacity: .65; } }

/* Native WooCommerce controls remain synchronized, with buttons as the visible interface. */
body.single-product form.hive-visual-options .hive-enhanced-select { display: none !important; }
body.single-product form.hive-visual-options table.variations,
body.single-product form.hive-visual-options table.variations tbody,
body.single-product form.hive-visual-options table.variations tr,
body.single-product form.hive-visual-options table.variations th,
body.single-product form.hive-visual-options table.variations td {
  display: block; width: 100%; background: transparent; border: 0; padding: 0; text-align: left;
}
body.single-product form.hive-visual-options table.variations tr { margin-bottom: 22px; }
body.single-product form.hive-visual-options table.variations .label { margin-bottom: 10px; }
.hive-option-value { font-weight: 400; font-size: 12px; color: #687a70; margin-left: 12px; }
.hive-option-grid { display: grid; gap: 7px; }
.hive-color-options { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
.hive-size-options { grid-template-columns: repeat(auto-fill, minmax(55px, 1fr)); }
body.single-product .hive-option {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 6px; min-height: 65px; padding: 8px 3px 6px; border: 1px solid transparent;
  border-radius: 10px; background: transparent; color: #304c48; cursor: pointer;
  font: inherit; line-height: 1.2; box-shadow: none; transition: background .15s, border-color .15s;
}
body.single-product .hive-option:hover { background: #f2f1e9; color: #234c4c; }
body.single-product .hive-option[aria-pressed="true"] { border-color: #34818b; background: #eff5f0; }
body.single-product .hive-option:focus-visible { outline: 2px solid #1b7c8d; outline-offset: 3px; }
body.single-product .hive-option:disabled { opacity: .35; cursor: not-allowed; }
.hive-option-name { font-size: 10px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.hive-swatch-dot { display: block; width: 36px; height: 30px; position: relative; filter: drop-shadow(0 1px 1.5px rgb(30 48 40 / 20%)); }
.hive-swatch-dot::before { content: ''; position: absolute; inset: 0; background: var(--hive-swatch); mask: url("gallery-swatch-hex.svg") center / 100% 100% no-repeat; }
body.single-product .hive-color-options .hive-option[aria-pressed="true"] { border-color: transparent; }
.hive-color-options .hive-option[aria-pressed="true"] .hive-option-name { font-weight: 600; }
.hive-size-options .hive-option svg { width: 56px; height: 56px; fill: var(--hive-garment-color, #e6e6df); stroke: none; filter: drop-shadow(0 1px 1px rgb(30 48 40 / 18%)); overflow: visible; transition: fill .2s; }
.hive-size-options .hive-size-letter { fill: var(--hive-size-ink, #000); stroke: none; font: 700 13px Arial, sans-serif; }
body.single-product form.hive-visual-options .reset_variations { display: inline-block; margin-top: 12px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
  .hive-preview-loader, .hive-size-options .hive-option svg { transition: none; }
  .hive-preview-loader::after, .hive-preview-loader-art svg, .hive-preview-loader-art span { animation: none; }
}
.hive-preview-retry[hidden] { display: none !important; }
body.single-product .hive-option { white-space: normal; min-width: 0; }
.hive-option-name { display: block; width: 100%; white-space: normal; }
.hive-size-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Keep the zoom control inside the photo, below the loading veil. */
body.single-product .elementor .hive-product-images .hive-tonal-gallery .woocommerce-product-gallery__trigger {
  position: absolute; inset: auto 12px 12px auto; margin: 0; z-index: 3;
}


/* Close-packed, flat-topped honeycomb; labels appear only on hover/focus. */
.hive-color-options {
  position: relative; grid-auto-rows: 21.5px; gap: 0; padding: 5px 8px 9px;
  filter: drop-shadow(0 1px 1px rgb(30 48 40 / 18%));
}
body.single-product .hive-color-options .hive-option {
  width: 48px; height: 40px; min-height: 0; margin: 0 !important; padding: 0; border: 0; gap: 0;
  position: relative; background: transparent; border-radius: 0;
  clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);
}
body.single-product .hive-color-options .hive-option:hover,
body.single-product .hive-color-options .hive-option[aria-pressed="true"] { background: transparent; }
.hive-color-options .hive-swatch-dot { width: 48px; height: 40px; filter: none; flex-shrink: 0; }
.hive-color-options .hive-option-name { display: none; }
/* Hover gives a quiet highlight; selection keeps the stronger hexagonal ring. */
.hive-color-options .hive-option::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url("gallery-swatch-ring.svg") center / 100% 100% no-repeat;
  opacity: 0; transition: opacity .15s ease;
}
.hive-color-options .hive-swatch-dot::before { transition: transform .15s ease; }
.hive-color-options .hive-option:hover::after { opacity: .45; }
.hive-color-options .hive-option:hover .hive-swatch-dot::before,
.hive-color-options .hive-option[aria-pressed="true"] .hive-swatch-dot::before,
.hive-color-options .hive-option:focus-visible .hive-swatch-dot::before { transform: scale(.92); }
.hive-color-options .hive-option[aria-pressed="true"]::after,
.hive-color-options .hive-option:focus-visible::after { opacity: 1; }
body.single-product .hive-color-options .hive-option:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .hive-color-options .hive-option::after, .hive-color-options .hive-swatch-dot::before { transition: none; }
}
.hive-color-tooltip[hidden] { display: none; }
.hive-color-tooltip {
  position: absolute; transform: translateX(-50%); z-index: 10; pointer-events: none;
  padding: 5px 9px; border-radius: 6px; background: #234c4c; color: white;
  font-size: 11px; line-height: 1.4; white-space: nowrap;
}

/* Purchase controls sit below the gallery while Woo's original form stays intact. */
body.single-product .hive-native-purchase { display: none !important; }
.hive-purchase-bar { margin-top: 16px; padding: 17px 18px 13px; border: 1px solid #e7e2d4; border-radius: 14px; background: #f8f5ec; }
.hive-purchase-row { display: flex; align-items: flex-end; gap: 14px; }
.hive-purchase-quantity[hidden] { display: none; }
.hive-purchase-quantity label { display: block; margin: 0 0 7px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #52685e; }
.hive-quantity-stepper { display: flex; align-items: center; height: 48px; border: 1px solid #deded0; border-radius: 10px; background: #fffdf8; overflow: hidden; }
body.single-product .hive-quantity-stepper button {
  width: 34px; min-width: 34px; height: 46px; padding: 0; margin: 0 !important; border: 0; border-radius: 0;
  color: #285c5d; background: transparent; font: 400 21px/1 Arial,sans-serif; box-shadow: none;
}
body.single-product .hive-quantity-stepper button:hover { background: #edf2e9; }
body.single-product .hive-quantity-stepper button:disabled { color: #b2b9ae; cursor: not-allowed; }
body.single-product .hive-quantity-stepper input {
  width: 38px; height: 46px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0;
  text-align: center; color: #234c4c; background: transparent; font-size: 15px; font-weight: 600; appearance: textfield; -moz-appearance: textfield;
}
.hive-quantity-stepper input::-webkit-inner-spin-button,.hive-quantity-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body.single-product .hive-purchase-submit {
  display: flex; flex: 1; align-items: center; justify-content: center; gap: 10px; height: 48px;
  margin: 0 !important; padding: 0 18px; border: 0; border-radius: 10px; background: #218b98; color: white;
  font: 600 14px/1.2 var(--hive-sans, sans-serif); box-shadow: 0 2px 3px #193f3f12; transition: background .15s;
}
body.single-product .hive-purchase-submit:hover { background: #24646b; color: white; }
body.single-product .hive-purchase-submit:disabled { background: #e0e7df; color: #52685e; cursor: not-allowed; box-shadow: none; opacity: 1; }
.hive-purchase-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hive-purchase-submit span:last-child { margin-left: auto; font-size: 19px; }
.hive-purchase-hint { margin: 10px 0 0; text-align: center; font-size: 11px; line-height: 1.5; color: #63766b; }
.hive-purchase-bar button:focus-visible,.hive-purchase-bar input:focus-visible { outline: 2px solid #218b98; outline-offset: -3px; }
@media(max-width:400px){.hive-purchase-bar{padding:13px 12px}.hive-purchase-row{gap:9px}body.single-product .hive-purchase-submit{padding:0 12px}.hive-purchase-submit svg{display:none}}
@media(prefers-reduced-motion:reduce){body.single-product .hive-purchase-submit{transition:none}}

.hive-purchase-hint[hidden] { display: none; }

/* Catalog facts come from this product's visible Woo attributes and dimensions. */
.hive-product-facts { border-top: 1px solid #dde3d8; padding-top: 24px; font-size: 14px; }
body.single-product .elementor .hive-product-facts h2 { font-size: 25px !important; line-height: 1.25 !important; font: 400 25px/1.25 var(--hive-serif, Georgia, serif); margin: 0 0 16px; }
.hive-product-facts table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.hive-product-facts th,.hive-product-facts td { padding: 10px 8px; border: 0; border-bottom: 1px solid #e7e8df; background: transparent; text-align: left; overflow-wrap: anywhere; }
.hive-product-facts th { width: 34%; font-weight: 500; }
.hive-product-facts td p { margin: 0; }
.hive-purchase-native form.cart { width: 100%; margin: 0; }
.hive-purchase-native table { width: 100%; }
