/* ---------------------------------------------------------------------------
 * Pricing rail refinements — product page summary column.
 *
 * SPECIFICITY NOTE (this is what broke the first attempt):
 * woo-bridge.css carries every rule twice — once bare (.tbds-price) and again
 * prefixed with body.single-product. A selector like ".entry-summary .tbds-price"
 * is (0,2,0) and LOSES to "body.single-product .tbds-price" at (0,2,1), whatever
 * the load order. Every rule here therefore uses the same body.single-product
 * prefix, and the WooCommerce form rules match woo-bridge's full chain. Loading
 * after woo-bridge then wins on source order.
 *
 * Presentation only. No markup changes, no WooCommerce behaviour changes.
 * ------------------------------------------------------------------------- */

:root {
  --tbds-ink: #181616;
  --tbds-amber: #febd59;
  --tbds-amber-deep: #a5670c;
  --tbds-grey: #5d5c5c;
  --tbds-grey-soft: #777272;
  --tbds-paper: #faf9f7;
  --tbds-line: #e4e1dc;
  --tbds-line-soft: #ece9e4;
  --tbds-green: #2e7d32;
  --tbds-radius: 10px;
}

/* ============================= 1. PRICE ================================== */
/* The amber rail goes: amber should mean "act here", and Buy it Now owns it. */

body.single-product .tbds-price {
  border-left: 0;
  border-radius: var(--tbds-radius);
  padding: 18px 20px 16px;
  margin-bottom: 16px;
}

body.single-product .tbds-price .tbds-price-row.tbds-mrp-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 2px;
}
body.single-product .tbds-price .tbds-mrp-row .tbds-price-label {
  min-width: 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .5);
}
body.single-product .tbds-price .tbds-mrp { font-size: 13px; }

/* The big number in a black box needs no label beside it. The label stays in
   the DOM for screen readers rather than being deleted from the markup. */
body.single-product .tbds-price .tbds-price-row:not(.tbds-mrp-row) {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}
body.single-product .tbds-price .tbds-price-row:not(.tbds-mrp-row) .tbds-price-label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
body.single-product .tbds-price .tbds-now {
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
body.single-product .tbds-price .tbds-off {
  background: rgba(254, 189, 89, .14);
  border: 1px solid rgba(254, 189, 89, .36);
  color: var(--tbds-amber);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
body.single-product .tbds-price .tbds-tax-note {
  margin-top: 7px;
  font-size: 12px;
}

/* ===================== 2. RAZORPAY AFFORDABILITY STRIP =================== */
/* Framed as a continuation of the price, not a second bordered card with its
   own amber rail. Razorpay owns everything inside it. */

body.single-product #razorpay-affordability-widget,
body.single-product #razorpay-affordability-widget-parent,
body.single-product .razorpay-affordability-widget {
  margin: -6px 0 18px;
  background: var(--tbds-paper);
  border: 1px solid var(--tbds-line);
  border-left: 1px solid var(--tbds-line);
  border-radius: var(--tbds-radius);
  overflow: hidden;
}

/* ==================== 3. SUPPORT BLOCKS AS ONE CARD ===================== */
/* Expert (hook 32), WhatsApp (33) and pickup (35) are adjacent siblings doing
   one job — reassurance — in three cards with three different accents: a black
   panel, a green top rule, a grey fill. One card with hairline dividers. */

body.single-product .tbds-ask-expert,
body.single-product .tbds-product-whatsapp,
body.single-product .tbds-pickup {
  border: 1px solid var(--tbds-line);
  border-radius: 0;
  background: var(--tbds-paper);
  box-shadow: none;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
  text-decoration: none;
  overflow: visible;
}
body.single-product .tbds-ask-expert {
  border-radius: var(--tbds-radius) var(--tbds-radius) 0 0;
}
/* -1px pulls the shared edges into a single hairline */
body.single-product .tbds-product-whatsapp {
  margin-top: -1px;
  border-top-color: var(--tbds-line-soft);
}
body.single-product .tbds-pickup {
  margin-top: -1px;
  margin-bottom: 22px;
  border-top-color: var(--tbds-line-soft);
  border-radius: 0 0 var(--tbds-radius) var(--tbds-radius);
}
/* Out-of-stock and enquiry products have no pickup row — close the card on
   whichever row ends up last. */
body.single-product .tbds-product-whatsapp:not(:has(+ .tbds-pickup)) {
  border-radius: 0 0 var(--tbds-radius) var(--tbds-radius);
  margin-bottom: 22px;
}

/* --- Ask an expert: was a black icon panel with a 23px Bebas heading --- */
body.single-product .tbds-ask-expert-icon {
  flex: none;
  width: 20px;
  min-width: 20px;
  height: 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 1px 0 0;
  display: block;
  align-self: flex-start;
}
body.single-product .tbds-ask-expert-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: var(--tbds-grey-soft);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.single-product .tbds-ask-expert-copy { min-width: 0; flex: 1; padding: 0; }
body.single-product .tbds-ask-expert-copy h2 {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .005em;
  text-transform: none;
  color: var(--tbds-ink);
  margin: 0 0 2px;
}
body.single-product .tbds-ask-expert-copy p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--tbds-grey);
  margin: 0;
}
/* the number is the part anyone actually uses, so it grows */
body.single-product .tbds-ask-expert-copy a {
  display: inline-block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--tbds-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--tbds-amber);
  background: none;
  padding: 0;
}
body.single-product .tbds-ask-expert-copy a:hover,
body.single-product .tbds-ask-expert-copy a:focus-visible { color: var(--tbds-amber-deep); }

/* --- WhatsApp: green top rule gone, icon keeps the brand green --- */
body.single-product .tbds-product-whatsapp { border-top-width: 1px; }
body.single-product .tbds-product-whatsapp .tbds-whatsapp-icon,
body.single-product .tbds-product-whatsapp > svg,
body.single-product .tbds-product-whatsapp img {
  flex: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 1px;
}
body.single-product .tbds-product-whatsapp strong,
body.single-product .tbds-product-whatsapp b {
  font-size: 13px;
  font-weight: 600;
  color: var(--tbds-ink);
}
body.single-product .tbds-product-whatsapp span,
body.single-product .tbds-product-whatsapp small {
  font-size: 12px;
  color: var(--tbds-grey);
}

/* --- Pickup: the tick keeps its green, everything else quiets --- */
body.single-product .tbds-pickup { display: block; }
body.single-product .tbds-pickup-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 2px;
  padding-left: 33px;
  position: relative;
}
body.single-product .tbds-pickup-title::before {
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--tbds-green);
  font-weight: 700;
}
body.single-product .tbds-pickup-note {
  font-size: 12px;
  color: var(--tbds-grey);
  margin: 0 0 3px;
  padding-left: 33px;
}
body.single-product .tbds-pickup-link {
  font-size: 12px;
  margin-left: 33px;
}

/* ======================= 4. STOCK STATE, IN CONTEXT ===================== */

body.single-product .entry-summary p.stock.in-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tbds-green);
  margin: 0 0 10px;
}
body.single-product .entry-summary p.stock.in-stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ========================= 5. QUANTITY STEPPER ========================== */
/* woo-bridge hides input.qty and prints "Quantity" as a ::before label, so the
 * page showed a label with no control. These selectors match woo-bridge's own
 * WooCommerce chain length so they win on source order.
 *
 * Layout: stepper and Add to Cart share a row, Buy it Now takes the full width
 * beneath — the primary action ends up widest, lowest, and the only amber thing.
 */

body.single-product.woocommerce div.product form.cart {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 20px;
}

body.single-product.woocommerce div.product form.cart .quantity {
  grid-column: 1;
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--tbds-line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  margin: 0;
  width: auto;
  float: none;
}
/* the ::before label is redundant once there is a visible control */
body.single-product.woocommerce div.product form.cart .quantity::before { content: none; }

body.single-product.woocommerce div.product form.cart .quantity input.qty {
  display: block;
  width: 46px;
  min-width: 46px;
  height: auto;
  min-height: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--tbds-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
body.single-product.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
body.single-product.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
body.single-product.woocommerce div.product form.cart .quantity input.qty:focus-visible {
  outline: 2px solid var(--tbds-amber);
  outline-offset: -2px;
}

body.single-product.woocommerce div.product form.cart .quantity .tbds-qty-btn {
  flex: none;
  width: 36px;
  min-height: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--tbds-grey);
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
body.single-product.woocommerce div.product form.cart .quantity .tbds-qty-btn:hover {
  background: var(--tbds-paper);
  color: var(--tbds-ink);
}
body.single-product.woocommerce div.product form.cart .quantity .tbds-qty-btn:active {
  background: var(--tbds-line-soft);
}

body.single-product.woocommerce div.product form.cart button.single_add_to_cart_button {
  grid-column: 2;
  margin: 0;
  width: 100%;
  min-height: 46px;
  float: none;
}
body.single-product.woocommerce div.product form.cart .tbds-buy-now {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  float: none;
}

/* Variable products add their own rows inside the same form. */
body.single-product.woocommerce div.product form.cart .variations,
body.single-product.woocommerce div.product form.cart .reset_variations,
body.single-product.woocommerce div.product form.cart .woocommerce-variation,
body.single-product.woocommerce div.product form.cart .woocommerce-variation-description,
body.single-product.woocommerce div.product form.cart .woocommerce-variation-price,
body.single-product.woocommerce div.product form.cart .woocommerce-variation-availability {
  grid-column: 1 / -1;
}
body.single-product.woocommerce div.product form.cart .woocommerce-variation-add-to-cart {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
body.single-product.woocommerce div.product form.cart .woocommerce-variation-add-to-cart .tbds-buy-now {
  grid-column: 1 / -1;
}

@media (prefers-reduced-motion: reduce) {
  body.single-product.woocommerce div.product form.cart .quantity .tbds-qty-btn { transition: none; }
}

/* ============================= 6. BRAND LOGO ============================= */
/* Replaces the text brand badge above the product title with the brand's
   logo. Brands without a logo file fall back to the .tbds-brand text badge. */

body.single-product .tbds-brand-logo-link {
  display: inline-block;
  margin: 0 0 12px;
  line-height: 0;
}
body.single-product .tbds-brand-logo {
  height: 80px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  display: block;
}
