/**
 * Himalaya.bd Theme Stabilization — v1.34.0
 * Authoritative final rules only. Keep this file small and component-scoped.
 */
:root {
  --hb-space-1: 4px;
  --hb-space-2: 8px;
  --hb-space-3: 12px;
  --hb-space-4: 16px;
  --hb-space-5: 20px;
  --hb-space-6: 24px;
  --hb-control-h: 46px;
  --hb-card-radius: 14px;
  --hb-focus-ring: 0 0 0 3px rgba(10,111,115,.18);
}

/* Consistent keyboard focus across custom interactive controls. */
:where(.hb-icon-btn,.hb-products-menu-toggle,.hb-mobile-products-toggle,.hb-search-close,.hb-mobile-close,.button,.hb-product-accordion__summary):focus-visible {
  outline: 2px solid var(--hb-green);
  outline-offset: 3px;
  box-shadow: var(--hb-focus-ring);
}

/* Product cards: one authoritative title → rating → price → CTA alignment. */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.hb-products .product .woocommerce-loop-product__title {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.woocommerce ul.products li.product .price,
.hb-products .product .price {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin: 0 auto 12px;
  text-align: center;
}
.woocommerce ul.products li.product .star-rating,
.hb-products .product .star-rating {
  display: block;
  width: 6.45em;
  height: 1.15em;
  margin: 0 auto 14px;
  overflow: hidden;
  color: #eda23b;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .10em;
  text-align: center;
  text-shadow: none;
  box-shadow: none;
  filter: none;
}
.woocommerce ul.products li.product .star-rating::before,
.hb-products .product .star-rating::before {
  color: rgba(237,162,59,.16);
  text-shadow: none;
}
.woocommerce ul.products li.product .star-rating > span,
.woocommerce ul.products li.product .star-rating > span::before,
.hb-products .product .star-rating > span,
.hb-products .product .star-rating > span::before {
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

/* Single-product summary: one shared content edge. */
body.single-product .woocommerce div.product div.summary :where(
  .hb-purchase-plan,
  .hb-post-cart-description,
  .hb-post-cart-description__inner,
  .hb-source-additional,
  details.hb-product-accordion.hb-source-additional
) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}
body.single-product .woocommerce div.product div.summary form.cart,
body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart {
  width: 100%;
  max-width: 100%;
}
body.single-product .woocommerce div.product div.summary form.cart .single_add_to_cart_button,
body.single-product .woocommerce div.product div.summary form.variations_form .single_add_to_cart_button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  align-self: stretch;
}
body.single-product .hb-source-additional > :where(.hb-product-accordion__summary,.hb-product-accordion__content) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Pack-size cards: content-aware width; desktop left, mobile centered. */
body.single-product .hb-variation-group { text-align: left; }
body.single-product .hb-variation-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
body.single-product .hb-variation-card {
  flex: 0 1 auto;
  width: auto;
  min-width: 118px;
  max-width: 180px;
  margin: 0;
}
body.single-product .hb-variation-card__head,
body.single-product .hb-variation-card__body {
  min-height: 0;
  white-space: nowrap;
  text-align: center;
}
body.single-product .hb-variation-card__head {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(12px,1.1vw,15px);
  line-height: 1.15;
}

/* Predictive product-search dropdown. */
.hb-search-suggest {
  position: absolute;
  z-index: 140;
  display: none;
  width: min(100%, 620px);
  max-height: min(480px, 62vh);
  overflow: auto;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-card-radius);
  background: #fff;
  box-shadow: 0 18px 48px rgba(18,44,40,.14);
}
.hb-search-suggest.is-open { display: block; }
.hb-search-suggest__item {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 10px;
  border-radius: 10px;
}
.hb-search-suggest__item:hover,
.hb-search-suggest__item.is-active { background: var(--hb-soft); }
.hb-search-suggest__item img { width: 52px; height: 52px; object-fit: contain; }
.hb-search-suggest__title { display: block; color: var(--hb-ink); font-weight: 700; line-height: 1.3; }
.hb-search-suggest__meta { display: block; margin-top: 3px; color: var(--hb-muted); font-size: 12px; }
.hb-search-suggest__price { color: var(--hb-green-dark); font-weight: 800; white-space: nowrap; }
.hb-search-suggest__empty,
.hb-search-suggest__all { display: block; padding: 12px; color: var(--hb-muted); font-size: 13px; }
.hb-search-suggest__all { color: var(--hb-green); font-weight: 800; text-align: center; border-top: 1px solid var(--hb-line); }
.hb-search-form,
.hb-mobile-header-search { position: relative; }

@media (max-width:760px) {
  .woocommerce ul.products li.product .star-rating,
  .hb-products .product .star-rating {
    width: 6.2em;
    margin-bottom: 12px;
    font-size: 15px;
  }
  body.single-product .hb-variation-title {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  body.single-product .hb-variation-cards {
    justify-content: center;
    gap: 10px;
  }
  body.single-product .hb-variation-card {
    min-width: 110px;
    max-width: 164px;
  }
  body.single-product .hb-variation-card__head { padding: 12px 12px 10px; font-size: clamp(11px,3.3vw,14px); }
  body.single-product .hb-variation-card__body { padding: 10px 12px 11px; font-size: 13px; }

  /* Compact delivery row retained from the approved mobile design. */
  body.single-product .woocommerce div.product div.summary .hb-delivery-estimate {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: calc(100% - 36px);
    max-width: 560px;
    min-height: 0;
    margin: 14px auto 20px;
    padding: 8px 12px;
    gap: 10px;
    text-align: left;
    border-radius: 10px;
  }
  body.single-product .hb-delivery-estimate__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: 0;
  }
  body.single-product .hb-delivery-estimate__icon svg { width: 18px; height: 18px; }
  body.single-product .hb-delivery-estimate__copy {
    display: grid;
    gap: 1px;
    min-width: 0;
    margin: 0;
    text-align: left;
    justify-items: start;
  }
  body.single-product .hb-delivery-estimate__title { margin: 0; font-size: 10.5px; line-height: 1.15; letter-spacing: .10em; text-align: left; }
  body.single-product .hb-delivery-estimate__range { margin: 0; font-size: 14px; line-height: 1.15; text-align: left; }
  body.single-product .hb-delivery-estimate__note { margin: 0; font-size: 10.5px; line-height: 1.2; text-align: left; }

  .hb-search-suggest {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 118px;
    width: auto;
    max-height: 56vh;
  }
  .hb-search-suggest__item { grid-template-columns: 46px minmax(0,1fr); }
  .hb-search-suggest__item img { width: 46px; height: 46px; }
  .hb-search-suggest__price { grid-column: 2; justify-self: start; font-size: 12px; }
}




/* v1.34.3 — Single-product Add to Cart reduced by 20% on all viewports. */
html body.single-product .woocommerce div.product div.summary form.cart > button.single_add_to_cart_button,
html body.single-product .woocommerce div.product div.summary form.cart > button.single_add_to_cart_button.button,
html body.single-product .woocommerce div.product div.summary form.cart > button.single_add_to_cart_button.button.alt,
html body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart > button.single_add_to_cart_button,
html body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart > button.single_add_to_cart_button.button,
html body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart > button.single_add_to_cart_button.button.alt {
  width: 80% !important;
  max-width: 80% !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  align-self: center !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}
@media (max-width: 760px) {
  html body.single-product .woocommerce div.product div.summary form.cart > button.single_add_to_cart_button,
  html body.single-product .woocommerce div.product div.summary form.cart > button.single_add_to_cart_button.button,
  html body.single-product .woocommerce div.product div.summary form.cart > button.single_add_to_cart_button.button.alt,
  html body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart > button.single_add_to_cart_button,
  html body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart > button.single_add_to_cart_button.button,
  html body.single-product .woocommerce div.product div.summary form.variations_form .woocommerce-variation-add-to-cart > button.single_add_to_cart_button.button.alt {
    width: 80% !important;
    max-width: 80% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-self: center !important;
    justify-self: center !important;
  }
}

/* v1.34.5 — Desktop cart: place Cart totals below the order/cart details. */
@media (min-width: 961px) {
  body.woocommerce-cart .woocommerce {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  body.woocommerce-cart .woocommerce > form.woocommerce-cart-form,
  body.woocommerce-cart .woocommerce > .hb-free-delivery-progress,
  body.woocommerce-cart .woocommerce > .cart-collaterals {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
  }

  body.woocommerce-cart .woocommerce > .cart-collaterals {
    margin: 0 !important;
  }

  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals {
    position: static !important;
    top: auto !important;
    right: auto !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
}



/* v1.34.6 — Cart free-delivery progress belongs at the top of the cart flow. */
body.woocommerce-cart .woocommerce > .hb-free-delivery-progress {
  order: -10 !important;
  margin-top: 0 !important;
}

/* v1.34.7 — Desktop cart: place checkout CTA to the right of the final Total card. */
@media (min-width: 961px) {
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals {
    display: grid !important;
    grid-template-columns: minmax(280px, 34%) minmax(0, 1fr) !important;
    column-gap: 24px !important;
    row-gap: 0 !important;
    align-items: stretch !important;
  }

  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > h2,
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > .hb-cart-summary-note {
    grid-column: 1 / -1 !important;
  }

  /* Flatten only the totals table boxes so its rows can participate in the parent grid. */
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > table.shop_table,
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > table.shop_table > tbody {
    display: contents !important;
  }

  /* Subtotal, discounts and shipment keep a full-width row above the final action row. */
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > table.shop_table > tbody > tr:not(.order-total) {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(150px, 34%) minmax(0, 1fr) !important;
    align-items: start !important;
    width: 100% !important;
  }

  /* Final Total card occupies the left side. */
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > table.shop_table > tbody > tr.order-total {
    grid-column: 1 !important;
    align-self: stretch !important;
    width: 100% !important;
    margin: 18px 0 0 !important;
  }

  /* Checkout CTA automatically shares the same grid row on the right. */
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > .wc-proceed-to-checkout {
    grid-column: 2 !important;
    align-self: stretch !important;
    display: flex !important;
    width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 0 !important;
  }

  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > .wc-proceed-to-checkout a.checkout-button,
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > .wc-proceed-to-checkout a.button.checkout-button,
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > .wc-proceed-to-checkout a.button.alt.checkout-button {
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
  }

  /* Delivery timing note stays below both final-action columns. */
  body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals > .hb-cart-summary-note {
    margin-top: 14px !important;
  }
}
