/* =========================================================================
   Greenzone storefront — shared product-card pieces (added 2026-07-29)

   Star rating widget + price/MRP/discount row. Deliberately NOT scoped to the
   home sliders: these have to look identical on the home rails, the search /
   category listing grid and the product detail page, which all render different
   card markup around them.

   Loaded LAST, after home-sliders.css.
   ========================================================================= */

/* ==========================================================================
   1. Rating — five stars, always one line
   ==========================================================================
   A grey five-star base with a gold five-star row clipped over it. Compared to
   emitting N filled + M empty glyphs this keeps fractional ratings exact (4.5
   really is half a star, not a rounded 4 or 5) and makes wrapping impossible,
   because both rows are a single unbreakable string.
   Glyph is Font Awesome 4.5 (\f005), already loaded site-wide. */
.gz-rating{
  display: flex; align-items: center; gap: 7px;
  line-height: 1;
  margin: 0 0 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.gz-stars{
  position: relative;
  display: inline-block;
  flex: none;
  font-family: FontAwesome;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 1.5px;
  white-space: nowrap;
  color: #d5dcd7;                 /* unrated / remainder */
  -webkit-font-smoothing: antialiased;
}
.gz-stars::before{ content: "\f005\f005\f005\f005\f005"; }
.gz-stars-on{
  position: absolute; left: 0; top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #f5a623;                 /* golden yellow */
  pointer-events: none;
}
.gz-stars-on::before{ content: "\f005\f005\f005\f005\f005"; }

.gz-rating-count{
  font-size: 11.5px; font-weight: 600;
  color: var(--muted, #5f7367);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.gz-rating-none{ font-weight: 500; color: #9aa8a0; }

/* ==========================================================================
   2. Price row — offer price, struck MRP, % off
   ==========================================================================
   The discount chip is the SAVING, i.e. (mrp - offer) / mrp * 100 — the number
   a shopper reads as "29% OFF". */
.gz-price{
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  line-height: 1.25;
}
.gz-price .gz-price-now{
  font-size: 19px; font-weight: 700;
  color: var(--herb-d, #0f5e34);
}
.gz-price .gz-price-mrp{
  font-size: 13px; font-weight: 500;
  color: var(--muted, #5f7367);
  text-decoration: line-through;
}
.gz-price .gz-price-off{
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gz-orange-soft, #fff3ea);
  color: var(--turmeric-d, #c06f14);
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap;
}

/* --- inside a slider / listing card, the price row is the existing .pp ---
   `.pp` already carries the offer price as a bare text node, so only the
   siblings need normalising. */
.pro-box .slider-text .pp .crossprice{
  font-size: 13px !important; font-weight: 500 !important;
  color: var(--muted, #5f7367) !important;
  text-decoration: line-through;
}
.pro-box .slider-text .pp .items-offerTags{
  position: static !important;
  top: auto !important; left: auto !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  background: var(--gz-orange-soft, #fff3ea) !important;
  color: var(--turmeric-d, #c06f14) !important;
  font-size: 11.5px !important; font-weight: 700 !important;
  letter-spacing: .3px;
  white-space: nowrap;
  border: 0 !important;
}
/* the listing grid keeps its own card shell, but the price row should still
   read as one tidy line rather than a stacked ribbon.
   ORDER matters: the JSP emits the struck MRP BEFORE the offer price, and the
   offer price is a bare text node. Bare text becomes an anonymous flex item,
   which cannot be reordered and always sits at order:0 — so giving the two real
   elements a higher order puts the row in reading order:
   price -> struck MRP -> saving. */
.pro-box .slider-text .pp{
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
}
.pro-box .slider-text .pp .crossprice{ order: 2; }
.pro-box .slider-text .pp .items-offerTags{ order: 3; }

/* ==========================================================================
   3. Product detail page
   ========================================================================== */
.product-section .gz-rating{ margin: 6px 0 14px; }
.product-section .gz-stars{ font-size: 16px; letter-spacing: 2px; }
.product-section .gz-rating-count{ font-size: 13px; }

/* struck MRP + saving next to the PDP price */
.product-section .gz-pdp-mrp{
  font-size: 16px; font-weight: 500;
  color: var(--muted, #5f7367);
  text-decoration: line-through;
  margin-right: 10px;
}
.product-section .product-ammount-saving,
.product-section .gz-pdp-off{
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--gz-orange-soft, #fff3ea);
  color: var(--turmeric-d, #c06f14);
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap;
}

/* --- pincode serviceability ------------------------------------------------
   Markup added to the PDP; the behaviour is product.js checkPincodeServicable(),
   which already existed and was already wired (it even auto-checks a saved
   pincode cookie on load) but had no UI. */
.gz-pincode{
  margin: 16px 0 6px;
  padding: 14px 16px;
  border: 1px solid var(--line, #e2ebe0);
  border-radius: 14px;
  background: #fbfdfa;
  max-width: 430px;
}
.gz-pincode .gz-pincode-head{
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--ink, #182a20);
  margin-bottom: 10px;
}
.gz-pincode .gz-pincode-head i{ color: var(--herb, #167a45); font-size: 15px; }
.gz-pincode .gz-pincode-row{ display: flex; gap: 8px; align-items: stretch; }
.gz-pincode input[type="text"],
.gz-pincode input[type="tel"],
.gz-pincode input#pincodeInputId{
  flex: 1 1 auto; min-width: 0;
  height: 42px !important; line-height: 42px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--line, #e2ebe0) !important;
  border-radius: 10px !important;
  background: #fff !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
.gz-pincode input#pincodeInputId:focus{
  border-color: var(--herb, #167a45) !important;
  box-shadow: 0 0 0 3px rgba(22,122,69,.14) !important;
}
.gz-pincode .gz-pincode-btn{
  flex: 0 0 auto;
  height: 42px; line-height: 42px;
  padding: 0 18px;
  border: 0; border-radius: 10px;
  background: var(--herb, #167a45); color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.gz-pincode .gz-pincode-btn:hover{ background: var(--herb-d, #0f5e34); transform: translateY(-1px); }
.gz-pincode .product-box-pincode{
  display: none;                 /* product.js .show()s it with the verdict */
  margin-top: 10px;
  font-size: 13px; font-weight: 600;
}
.gz-pincode .product-box-pincode.green-text{ color: var(--herb, #167a45) !important; }
.gz-pincode .product-box-pincode.red-text{ color: #c0392b !important; }

@media only screen and (max-width: 600px){
  .gz-pincode{ max-width: 100%; padding: 12px 13px; }
  .gz-pincode .gz-pincode-btn{ padding: 0 13px; font-size: 11.5px; }
  .product-section .gz-stars{ font-size: 14px; }
}
