/* ==========================================================================
   HDI — store product page (WHMCS "legacy_modern" order form)
   css/hdi-store.css

   The /clients/index.php?rp=/store/... pages use WHMCS's legacy_modern template,
   not our hdi_cart fork, so they never picked up the brand. This restyles that
   markup in place: no template fork, nothing to switch in the admin.

   Scoped to #main-body so it cannot touch the hdi_cart pages, which carry their
   own ID-scoped rules that outrank anything here anyway.
   ========================================================================== */

/* --- the two-column rows overflow their container by 30px (Bootstrap gutters)
       and leave a gap on the right; :has() keeps this to product rows only --- */
#main-body .row:has(> [class*="col-"] > .product){margin-left:0;margin-right:0}

/* --- page header ------------------------------------------------------- */
#main-body .title-bar{display:flex;flex-direction:column;align-items:center;gap:12px;padding:8px 0 4px}
#main-body .title-bar h1{
  font-family:'Montserrat',system-ui,sans-serif;font-weight:900;letter-spacing:-.02em;
  font-size:1.85rem!important;color:#3A3244;margin:0;
}
#main-body .choosecat .btn{
  border:1px solid #E7DDC9;background:#fff;color:#3A3244;border-radius:100px;
  font-family:'Montserrat',sans-serif;font-weight:600;font-size:.82rem;padding:8px 16px;
}
#main-body .currencychooser{display:flex;justify-content:flex-end;margin:0 0 12px}
#main-body .currencychooser .btn{
  border:1px solid #E7DDC9;background:#fff;color:#5C5670;font-size:.8rem;font-weight:600;padding:7px 14px;
}
#main-body .currencychooser .btn.active{background:#3A3244;border-color:#3A3244;color:#fff}

/* --- product card ------------------------------------------------------ */
#main-body .product{
  position:relative;display:flex!important;flex-direction:column;
  text-align:left;
  background:#fff;border:1px solid #E7DDC9;border-radius:16px;
  padding:22px 22px 20px!important;margin:0 0 4px;
  box-shadow:0 1px 2px rgba(46,39,54,.05), 0 8px 24px rgba(46,39,54,.05);
  transition:transform .16s,box-shadow .16s,border-color .16s;
  min-height:100%;
}
#main-body .product:hover{transform:translateY(-2px);box-shadow:0 18px 44px rgba(46,39,54,.10);border-color:#E4DBEC}

/* the stray <br><br> between spec rows is what makes the stock chips unreadable */
#main-body .product br{display:none}

#main-body .product > *{order:5}

#main-body .product > .name{
  order:1;
  font-family:'Montserrat',sans-serif;font-weight:800;font-size:1.05rem;color:#3A3244;
  letter-spacing:-.01em;margin:0 0 2px;line-height:1.25;padding-right:0;
}

/* price was pinned top-right and collided with the first spec row; it now sits
   under the product name as the card's focal number */
#main-body .product > .pricing{
  order:2;position:static;float:none!important;margin:0 0 16px!important;
  display:flex;align-items:baseline;flex-wrap:wrap;gap:5px;text-align:left;
}
#main-body .product .pricing .pricing,
#main-body .product .pricing span{
  font-family:'Montserrat',sans-serif;font-weight:900;letter-spacing:-.02em;
  color:#3A3244!important;text-transform:none!important;display:inline;
  font-size:1.05rem!important;line-height:1.1;
}
/* the rupee figure is the last element in that cluster — make it the big one */
#main-body .product .pricing > .pricing:last-child,
#main-body .product .pricing > span:last-child{font-size:1.5rem!important}

/* spec rows: label left, value right — a clean table, not chips */
#main-body .product > .prodfeature{
  order:3;
  display:flex!important;align-items:baseline;justify-content:space-between;gap:12px;
  width:100%!important;max-width:none!important;
  padding:7px 0!important;margin:0!important;
  background:transparent!important;border:0!important;border-radius:0!important;
  border-bottom:1px solid #F3ECF7!important;
  font-family:'Inter',system-ui,sans-serif;font-weight:600;font-size:.88rem;color:#3A3244!important;
  text-align:left;vertical-align:baseline;
}
#main-body .product .prodfeature .feature{
  display:inline!important;font-size:.78rem;font-weight:500;letter-spacing:0;text-transform:none;
  color:#5C5670!important;margin:0;
}

/* order button */
#main-body .product .btn,
#main-body .product a.btn{
  order:6;
  display:block!important;width:100%!important;margin-top:auto;
  font-family:'Montserrat',sans-serif;font-weight:700;font-size:.9rem;
  padding:12px 16px;border-radius:10px;text-decoration:none!important;
  background:#5E4C72!important;border:1px solid #5E4C72!important;color:#fff!important;
  box-shadow:0 8px 18px rgba(94,76,114,.22);
}
#main-body .product .btn:hover{background:#6E5A85!important;border-color:#6E5A85!important}

/* the card is a flex column so the button always sits at the bottom */
#main-body [class*="col-"]:has(> .product){display:flex}
#main-body [class*="col-"]:has(> .product) > .product{display:flex;flex-direction:column;width:100%}
#main-body [class*="col-"]:has(> .product) > .product > .btn,
#main-body [class*="col-"]:has(> .product) > .product > a.btn{margin-top:auto}

@media (max-width:767px){
  #main-body .product .prodfeature{width:100%}
  #main-body .title-bar h1{font-size:1.45rem!important}
  #main-body .product .pricing{float:none;text-align:left;margin:0 0 8px}
}

/* descriptions pasted from the admin can carry inline colours (one product's
   coupon note renders bright red); keep the card in the palette */
#main-body .product [style*="color"]{color:#5C5670!important}
#main-body .product p{color:#5C5670;font-size:.85rem;line-height:1.55}
