/* =====================================================================
   VastuGuruji.in — product page polish (2026-12-02)
   Loaded only on product detail pages (controllers/detail.php).
   To switch off: rename this file (the page checks is_file()).
   ===================================================================== */

:root{
  --vgx-navy:#1e3a5f;
  --vgx-saffron:#c65d00;
  --vgx-cream:#fffaf2;
  --vgx-line:#ece3d3;
  --vgx-muted:#5b6472;
  --vgx-ui:"Inter","Noto Sans Devanagari",system-ui,-apple-system,"Segoe UI",sans-serif;
  --vgx-safe:env(safe-area-inset-bottom, 0px);
}

/* ---------- 1. Page scroll: the window scrolls, never <body> ----------
   (devta pages had html/body height:100% + overflow-x:hidden, which made
   <body> a 900px scroll box: sticky bars, lazy images and "scroll to"
   links all broke). clip = no side scroll, without a scroll box.        */
html:root{height:auto;overflow-x:clip;overflow-y:visible}
html:root body:not(#vgx){height:auto;min-height:100%;overflow-x:clip;overflow-y:visible;max-width:100%}

/* ---------- 2. Hidden helper texts ---------- */
#vgpIntelHint{display:none !important}               /* "High-intent profile detected…" */
.vg-dup-hidden{display:none !important}               /* idol: second copy of reviews */

/* ---------- 3. Sticky "Add to Cart" bar (phones) ----------
   The oil page had no styles for it, so it showed as a raw block
   (tiny photo, ₹590.00, button touching the edge) above the footer. */
body .vgp-sticky-bar{
  position:fixed;left:0;right:0;bottom:0;z-index:990;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:0;padding:10px 16px calc(10px + var(--vgx-safe));
  background:rgba(255,253,249,.97);
  -webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);
  border-top:1px solid var(--vgx-line);
  box-shadow:0 -8px 24px rgba(30,58,95,.08);
  transform:translateY(110%);transition:transform .28s ease;
  font-family:var(--vgx-ui);
}
body .vgp-sticky-bar.is-visible{transform:none}
body .vgp-sticky-bar .vgp-sticky-info{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;overflow:hidden}
body .vgp-sticky-bar .vgp-sticky-info > div{min-width:0}
body .vgp-sticky-bar .vgp-sticky-info img{width:44px;height:44px;flex:0 0 44px;object-fit:cover;border-radius:10px;border:1px solid var(--vgx-line);background:#fff}
body .vgp-sticky-bar .vgp-sticky-title{font:600 13.5px/1.3 var(--vgx-ui);color:var(--vgx-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
body .vgp-sticky-bar .vgp-sticky-price{font:700 15px/1.3 var(--vgx-ui);color:var(--vgx-saffron);margin:2px 0 0}
body .vgp-sticky-bar .vgp-cta{
  flex:0 0 auto;width:auto;min-height:46px;margin:0;padding:0 20px;
  display:inline-flex;align-items:center;justify-content:center;
  border:0;border-radius:12px;background:var(--vgx-saffron);color:#fff;
  font:700 15px/1 var(--vgx-ui);box-shadow:0 6px 16px rgba(198,93,0,.25);white-space:nowrap;
}
@media (min-width:768px){ body .vgp-sticky-bar{display:none} }

/* Room at the end of the page so nothing hides behind the bar */
@media (max-width:767px){
  body:has(.vgp-sticky-bar) .vgp-footer,
  body:has(.vmr-sticky, .vsp-sticky, .dv3-sticky-bar) .vgp-footer{padding-bottom:calc(96px + var(--vgx-safe)) !important}
  /* App-install card and Google badge sit ABOVE the bar when it shows */
  body:has(.vgp-sticky-bar.is-visible) #vg-pwa-banner{bottom:calc(84px + var(--vgx-safe))}
  body:has(.vgp-sticky-bar.is-visible, .idol-sticky.is-visible, .dv3-sticky-bar.is-visible, .vmr-sticky.is-visible, .vsp-sticky.is-visible) #___ratingbadge_0{bottom:calc(84px + var(--vgx-safe)) !important}
  /* App-install card and Google badge never sit on top of each other */
  body:has(#vg-pwa-banner) #___ratingbadge_0{opacity:0 !important;pointer-events:none !important}
}

/* ---------- 4. Festival strip: slim on phones ---------- */
@media (max-width:767px){
  body .vgf-fest-banner{
    display:block !important;text-align:center;
    padding:8px 14px !important;font:500 12.5px/1.6 var(--vgx-ui) !important;border-top-width:1px !important;
  }
  body .vgf-fest-banner a{margin:2px 0 0 8px !important;padding:4px 12px !important;font-size:12px !important;border-radius:999px !important;display:inline-block !important;line-height:1.5}
}

/* ---------- 5. Buy box: full-width buttons, real tap targets ---------- */
body .vgp-buybox .vgp-qtybtn{min-width:44px;min-height:44px;font-size:20px;line-height:1}
body .vgp-buybox .vgp-qtyinp{min-height:44px;font-size:16px;text-align:center}
@media (max-width:767px){
  body .vgp-buybox .vgp-cta-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
  body .vgp-buybox .vgp-cta-row .vgp-qty{flex:0 0 auto}
  body .vgp-buybox .vgp-cta-row .vgp-cta-alt{flex:1 1 150px;min-height:48px;width:auto;margin:0}
  body .vgp-buybox .vgp-cta-row .vgp-cta-primary{flex:1 1 100%;width:100%;min-height:50px;margin:0}
}
a.idol-btn-buy, .idol-buy a, a[data-buy-now], .vgp-cta{ text-decoration:none !important }

/* ---------- 6. Section headings: one calm size on phones ---------- */
@media (max-width:767px){
  body .vgp-section > h2,
  body .vgp-reviews-section > h2{font-size:clamp(22px,6.4vw,27px);line-height:1.25;margin:0 0 14px}
}

/* ---------- 7. "You may also like" cards ---------- */
body .vgp-related{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:900px){ body .vgp-related{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px} }
body .vgp-related .vgp-rel{
  display:flex;flex-direction:column;min-width:0;
  background:#fff;border:1px solid var(--vgx-line);border-radius:16px;overflow:hidden;
  box-shadow:0 4px 14px rgba(30,58,95,.06);text-decoration:none;color:inherit;
  transition:transform .2s ease, box-shadow .2s ease;
}
body .vgp-related .vgp-rel:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(30,58,95,.10)}
body .vgp-related .vgp-rel img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;background:#f6f1e8;border:0}
body .vgp-related .vgp-rel .rbody{display:flex;flex-direction:column;flex:1 1 auto;gap:6px;padding:12px 12px 14px}
body .vgp-related .vgp-rel .rname{
  margin:0;font:600 14px/1.35 var(--vgx-ui);color:var(--vgx-navy);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em;
}
body .vgp-related .vgp-rel .vgp-rel-price{margin:0;font:700 16px/1.2 var(--vgx-ui);color:var(--vgx-saffron)}
body .vgp-related .vgp-rel .vgp-rel-btn{
  margin-top:auto;display:flex;align-items:center;justify-content:center;min-height:40px;
  border:1px solid var(--vgx-saffron);border-radius:10px;color:var(--vgx-saffron);background:#fff;
  font:600 13.5px/1 var(--vgx-ui);transition:background .2s ease,color .2s ease;
}
body .vgp-related .vgp-rel:hover .vgp-rel-btn{background:var(--vgx-saffron);color:#fff}
/* guide cards: small label, same family as the card */
body .vgp-related .vgp-rel .vgp-guide-label,
body .vgp-related .vgp-rel .rbody .vgp-note{margin:auto 0 0;font:600 13px/1.35 var(--vgx-ui);color:var(--vgx-saffron)}

/* ---------- 8. Customer reviews ---------- */
body .vgp-reviews-section{
  margin:18px 0 0;padding:20px 18px;background:#fff;border:1px solid var(--vgx-line);
  border-radius:16px;box-shadow:0 8px 20px rgba(16,24,40,.05);
}
body .vgp-reviews-section > h2{margin-top:0}
body .vgp-review-summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 14px;font:500 14.5px/1.4 var(--vgx-ui);color:var(--vgx-muted)}
body .vgp-review-summary strong{color:var(--vgx-navy);font-size:16px}
body .vgp-stars{color:#e0a100;letter-spacing:2px;font-size:17px;line-height:1}
body .vgp-stars .vgp-stars-off{color:#e5dccd}
body .vgp-review-empty{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;
  padding:20px 16px;border:1px dashed #e3d4bb;border-radius:14px;background:var(--vgx-cream);
}
body .vgp-review-empty-title{margin:0;font:600 17px/1.3 "Lora",serif;color:var(--vgx-navy)}
body .vgp-review-empty-sub{margin:0;font:400 14px/1.5 var(--vgx-ui);color:var(--vgx-muted)}
body .vgp-review-signin{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;padding:0 18px;
  border:1px solid var(--vgx-navy);border-radius:999px;background:#fff;color:var(--vgx-navy);
  font:600 14px/1.2 var(--vgx-ui);text-decoration:none;text-align:center;
}
body .vgp-review-signin:hover{background:var(--vgx-navy);color:#fff}
body .vgp-reviews{display:flex;flex-direction:column;gap:12px;margin-top:14px}
body .vgp-review-card{padding:14px 16px;border:1px solid var(--vgx-line);border-radius:14px;background:#fffdf9}
body .vgp-review-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
body .vgp-review-name{font:600 14.5px/1.3 var(--vgx-ui);color:var(--vgx-navy)}
body .vgp-review-body{font-size:15px;line-height:1.6}
body .vgp-review-date{margin-top:6px;font:400 12px/1.3 var(--vgx-ui);color:#94a3b8}
@media (max-width:767px){ body .vgp-reviews-section{padding:18px 14px} }

/* ---------- 9. Idol page: first-review note ---------- */
.idol-rev-first{font-family:var(--vgx-ui)}
