/* =============================================================================
   WooCommerce — Breadcrumbs
   ============================================================================= */

.woocommerce .woocommerce-breadcrumb,
.woocommerce .wp-block-woocommerce-breadcrumbs {
  font-size: var(--wp--preset--font-size--xx-small, 0.75rem);
}

.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-breadcrumb a,
.woocommerce .woocommerce-breadcrumb span,
.woocommerce .wp-block-woocommerce-breadcrumbs,
.woocommerce .wp-block-woocommerce-breadcrumbs a,
.woocommerce .wp-block-woocommerce-breadcrumbs * {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

.woocommerce .woocommerce-breadcrumb a,
.woocommerce .wp-block-woocommerce-breadcrumbs a {
  text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover,
.woocommerce .woocommerce-breadcrumb a:focus-visible,
.woocommerce .wp-block-woocommerce-breadcrumbs a:hover,
.woocommerce .wp-block-woocommerce-breadcrumbs a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}


/* =============================================================================
   Shop / archive product grid (Woo Blocks)
   ============================================================================= */

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template {
  gap: clamp(16px, 2vw, 32px) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch;
}

@media (max-width: 960px) {
  :is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 782px) {
  :is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template {
    grid-template-columns: 1fr !important;
  }
}

:is(body.woocommerce-shop, body.post-type-archive-product) .wp-block-woocommerce-product-collection {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template > li.wc-block-product {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template > li.wc-block-product .wp-block-woocommerce-product-button,
:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template > li.wc-block-product [data-block-name="woocommerce/product-button"],
:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) ul.wc-block-product-template > li.wc-block-product .wc-block-components-product-button {
  margin-top: auto;
  width: 100%;
}


/* =============================================================================
   Product specifications block (catalog archives)
   ============================================================================= */

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications {
  margin: 0.5rem 0 0;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications table,
:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications th,
:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications td {
  border: 0 !important;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications th.wp-block-product-specifications-item__label {
  display: none !important;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications td.wp-block-product-specifications-item__value {
  padding: 0 !important;
  width: 100% !important;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat) .wp-block-woocommerce-product-specifications td.wp-block-product-specifications-item__value p {
  margin: 0 !important;
  line-height: 1.2;
}


/* =============================================================================
   Single product — add to cart + quantity stepper
   ============================================================================= */

.single-product .wc-block-add-to-cart-form form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  row-gap: 0.75rem;
}

.single-product .wc-block-add-to-cart-form .single_add_to_cart_button {
  margin-left: 1.5rem;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .single-product .wc-block-add-to-cart-form .single_add_to_cart_button {
    margin-left: 0;
    width: min(100%, 280px);
    flex: 1 1 260px;
  }
}

.single-product form.cart .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  opacity: 1 !important;
  visibility: visible !important;
  font-family: var(--wp--preset--font-family--condensed);
  font-size: 1.125rem;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1;
  height: 48px;
  padding: 0 2rem;
  width: clamp(180px, 40vw, 280px);
  background-color: #000;
  color: var(--wp--preset--color--primary-alt);
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.single-product form.cart .single_add_to_cart_button:hover,
.single-product form.cart .single_add_to_cart_button:focus-visible {
  background-color: var(--wp--preset--color--primary-alt);
  color: #000;
  text-decoration: none;
}

.single-product form.cart .single_add_to_cart_button:disabled,
.single-product form.cart .single_add_to_cart_button.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.single-product .wc-block-components-quantity-selector {
  height: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #1a1a1a;
  border-radius: 0;
}

.single-product .wc-block-components-quantity-selector__input,
.single-product .wc-block-components-quantity-selector__button {
  height: 48px;
  min-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.single-product .wc-block-components-quantity-selector__input {
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent !important;
  font-family: var(--wp--preset--font-family--condensed);
  font-weight: 500;
}

.single-product .wc-block-components-quantity-selector__button {
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #000;
}


/* =============================================================================
   Single product — gallery thumbnails
   ============================================================================= */

.woocommerce div.product div.images .flex-control-thumbs {
  padding-top: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

.woocommerce div.product div.images .flex-control-thumbs li {
  box-sizing: border-box !important;
  padding: 10px 10px 0 0 !important;
  margin: 0 !important;
}

.woocommerce div.product div.images .flex-control-thumbs li:nth-child(4n) {
  padding-right: 0 !important;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}


/* =============================================================================
   Cart — checkout CTA + block buttons + coupon
   ============================================================================= */

.woocommerce-cart .wc-block-cart__submit .wc-block-cart__submit-button.contained {
  background-color: #000 !important;
  color: #fff !important;
  border: none !important;
  font-size: 1.125rem !important;
}

.woocommerce-cart .wc-block-cart__submit .wc-block-components-button__text {
  color: #fff !important;
}

.woocommerce-cart .wc-block-cart__submit .wc-block-cart__submit-button.contained:hover,
.woocommerce-cart .wc-block-cart__submit .wc-block-cart__submit-button.contained:focus-visible {
  background-color: #111 !important;
  color: #fff !important;
}

.woocommerce-cart .wc-block-cart__submit .wc-block-cart__submit-button.contained:disabled,
.woocommerce-cart .wc-block-cart__submit .wc-block-cart__submit-button.contained[aria-disabled="true"] {
  background-color: #000 !important;
  opacity: 0.6;
  cursor: not-allowed;
}

body.woocommerce-cart .wc-block-components-button,
body.woocommerce-checkout .wc-block-components-button {
  background-color: #000 !important;
  border: 1px solid #000 !important;
  color: #fff !important;
  border-radius: 6px;
  transition: all 0.2s ease;
}

body.woocommerce-cart .wc-block-components-button__text,
body.woocommerce-checkout .wc-block-components-button__text {
  color: #fff !important;
}

body.woocommerce-cart .wc-block-components-button:hover,
body.woocommerce-checkout .wc-block-components-button:hover {
  background-color: #111 !important;
  border-color: #111 !important;
}

body.woocommerce-cart button.wc-block-components-totals-coupon__button {
  background: #000 !important;
  border: 1px solid #000 !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
}

body.woocommerce-cart button.wc-block-components-totals-coupon__button .wc-block-components-button__text {
  color: #fff !important;
}

body.woocommerce-cart button.wc-block-components-totals-coupon__button:hover {
  filter: brightness(1.08);
}

.wc-block-components-totals-item__description {
  padding-top: 1rem;
  padding-bottom: 1rem;
}


/* =============================================================================
   Sale price + sale badge
   ============================================================================= */

.wc-block-components-product-price del,
.wc-block-components-product-price del .wc-block-formatted-money-amount,
.single-product .summary .price del,
.single-product .price del,
.woocommerce ul.products li.product .price del {
  color: var(--wp--preset--color--lime-700, #7ec300);
  opacity: 1;
}

.wc-block-components-product-sale-badge,
.single-product span.onsale,
.woocommerce div.product div.images span.onsale {
  aspect-ratio: 1;
  box-sizing: border-box;
  width: 3.35rem;
  min-width: 3.35rem;
  min-height: 3.35rem !important;
  height: 3.35rem;
  padding: 0.2rem;
  margin: 0 !important;
  border-radius: 50% !important;
  background-color: #c40000 !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.1 !important;
  font-size: 0.65rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.single-product div.product div.images span.onsale {
  display: flex !important;
}


/* =============================================================================
   Product image frame + custom image badge (PHP wrapper)
   ============================================================================= */

/* Shop / archives only — single product uses outer wrapper border (see below) */
.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a,
body:not(.single-product) .wc-block-components-product-image a {
  border: 0;
  box-shadow: none;
  display: block;
  text-decoration: none;
  outline: 1px solid #0002;
  outline-offset: 0;
  border-radius: 0;
}

/* Single PDP gallery only: no frame on the zoom link / inner image chrome (outer .images border only). */
.single-product div.product div.images .wc-block-components-product-image,
.single-product div.product div.images .wc-block-components-product-image a {
  outline: none !important;
  box-shadow: none !important;
}

/* Related products on single product — same frame as shop / archive grid */
.single-product .wp-block-woocommerce-product-collection[data-collection="woocommerce/product-collection/related"] .wc-block-components-product-image a,
.single-product .wp-block-woocommerce-product-collection .wc-block-product-template .wc-block-components-product-image a {
  border: 0;
  box-shadow: none;
  display: block;
  text-decoration: none;
  outline: 1px solid rgba(0, 0, 0, 0.133);
  outline-offset: 0;
  border-radius: 0;
}

/* Single product — one border only on the outer column. */
.single-product div.product div.images {
  border: 1px solid rgba(0, 0, 0, 0.133);
  box-sizing: border-box;
}

/* Strip accidental second frames from nested Woo wrappers inside .images */
.single-product div.product div.images .woocommerce-product-gallery,
.single-product div.product div.images .wc-block-woocommerce-product-gallery,
.single-product div.product div.images .wp-block-woocommerce-product-image-gallery,
.single-product div.product div.images [data-block-name="woocommerce/product-image-gallery"],
.single-product div.product div.images .flex-viewport,
.single-product div.product div.images .woocommerce-product-gallery__wrapper,
.single-product div.product div.images .wc-block-components-product-image,
.single-product div.product div.images img {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.hoh-product-image-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.hoh-product-image-wrap .wc-block-components-product-image,
.hoh-product-image-wrap .wc-block-components-product-image a {
  display: block;
}

.hoh-product-image-badge {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.55);
}

.hoh-product-image-badge__text {
  margin: 0;
  color: #fff;
}
