/* ══════════════════════════════════════════════════════════════════════
   Personalised recommendations rail — one shared stylesheet (never inline),
   reused by every surface + the chat-end modal.

   Card visual mirrors the site's native puja cards (image → orange accent
   line → title → solid "Book now" pill) but compact, so many fit at once.

   Theme-aware: colours read from --aid-* custom properties when present
   (astrologer detail .aid-wrap) and fall back to Shubhpuja orange elsewhere.
   Nav classes are .reco-nav-* — NOT the global .swiper-button-*/.similar-swiper
   the site inits at js/script.js.
   ══════════════════════════════════════════════════════════════════════ */
.reco-section{ --reco-solid:var(--aid-solid,#E96B02); --reco-deep:var(--aid-deep,#b85200);
  --reco-cta1:var(--aid-cta1,#E96B02); --reco-cta2:var(--aid-cta2,#f5a623);
  --reco-light:var(--aid-light,#ffd9b3); --reco-tint:var(--aid-tint,#fff1e3);
  margin:34px 0 8px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.reco-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.reco-head-txt{ min-width:0; }
.reco-eyebrow{ display:inline-flex; align-items:center; gap:8px; font-size:10.5px; font-weight:800;
  letter-spacing:2.2px; text-transform:uppercase; color:var(--reco-deep); margin-bottom:8px; }
.reco-eyebrow::before{ content:""; width:20px; height:2px; border-radius:2px;
  background:linear-gradient(90deg,var(--reco-cta2),var(--reco-cta1)); }
.reco-title{ font-size:1.55rem; font-weight:800; color:#171726; line-height:1.15; margin:0; letter-spacing:-.02em; }
.reco-title span{ background:linear-gradient(115deg,var(--reco-cta1),var(--reco-cta2));
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:var(--reco-solid); }
.reco-sub{ font-size:13px; color:#8a8078; margin-top:5px; }
.reco-nav{ display:flex; gap:9px; flex-shrink:0; }
.reco-nav button{ width:40px; height:40px; border-radius:50%; border:1px solid var(--reco-light);
  background:#fff; color:var(--reco-deep); font-size:14px; cursor:pointer; display:flex;
  align-items:center; justify-content:center; transition:transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow:0 6px 16px -8px rgba(26,15,8,.20); }
.reco-nav button:hover{ background:linear-gradient(150deg,var(--reco-cta2),var(--reco-cta1)); color:#fff;
  border-color:transparent; transform:translateY(-2px); box-shadow:0 12px 22px -10px var(--reco-solid); }
.reco-nav button:active{ transform:translateY(0); }
.reco-nav button:disabled{ opacity:.35; cursor:default; transform:none; background:#fff; color:var(--reco-deep); box-shadow:none; }

/* ── Card — compact, native-puja-card style ─────────────────────────── */
.reco-card{ position:relative; display:flex; flex-direction:column; height:100%; background:#fff;
  border:1px solid #efe4d3; border-radius:14px; overflow:hidden; text-decoration:none; isolation:isolate;
  box-shadow:0 1px 2px rgba(26,15,8,.05), 0 12px 26px -20px rgba(43,15,66,.34);
  transition:transform .24s cubic-bezier(.22,.61,.36,1), box-shadow .24s ease, border-color .24s ease; }
/* Hover only — modern lift with a layered 3D shadow + orange border. Nothing
   stays highlighted at rest (no border on the active/fixed card); the accent
   appears only on the card the pointer is over. */
.reco-card:hover{ transform:translateY(-6px); border-color:#ff8a00;
  box-shadow:0 12px 24px -10px rgba(255,138,0,.30),
             0 28px 54px -22px rgba(43,15,66,.55); }
/* Suppress the browser's default (black) outline on mouse click; keep a subtle
   orange ring only for keyboard focus, for accessibility. */
.reco-card:focus{ outline:none; }
.reco-card:focus-visible{ outline:2px solid #ff8a00; outline-offset:2px; }

.reco-media{ position:relative; aspect-ratio:16/10; background:linear-gradient(155deg,var(--reco-tint),#fff); overflow:hidden; }
.reco-media img{ width:100%; height:100%; object-fit:cover; object-position:top; display:block;
  transition:transform .5s cubic-bezier(.22,.61,.36,1); }
.reco-media::after{ content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(to bottom,transparent 58%,rgba(0,0,0,.34)); }
.reco-card:hover .reco-media img{ transform:scale(1.06); }
.reco-media .reco-emoji{ width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  font-size:38px; background:linear-gradient(150deg,var(--reco-cta2),var(--reco-cta1)); color:#fff; }

.reco-badge{ position:absolute; top:8px; left:8px; z-index:2; font-size:9px; font-weight:800;
  letter-spacing:.5px; text-transform:uppercase; padding:4px 9px; border-radius:50px;
  background:rgba(255,255,255,.85); color:var(--reco-deep); backdrop-filter:blur(10px) saturate(1.4);
  -webkit-backdrop-filter:blur(10px) saturate(1.4); border:1px solid rgba(255,255,255,.6);
  box-shadow:0 3px 10px rgba(20,10,30,.16); }
.reco-badge.is-free{ background:linear-gradient(135deg,rgba(232,247,238,.95),rgba(216,243,227,.95));
  color:#0f7a3d; border-color:rgba(22,101,52,.15); }

/* orange accent line under the image — the native card's signature */
.reco-body{ display:flex; flex-direction:column; flex:1; padding:10px 12px 12px;
  border-top:3px solid var(--reco-solid); }
.reco-name{ font-size:13px; font-weight:700; color:#20202f; line-height:1.32; margin:0 0 5px;
  letter-spacing:-.01em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; }
/* grey subtitle line — the native puja card's descriptor (h1 / meta_title) */
.reco-desc{ font-size:11.5px; color:#8a8078; line-height:1.45; margin:0 0 10px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.reco-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; }
.reco-price{ font-size:14px; font-weight:800; color:#171726; letter-spacing:-.01em; }
.reco-price.is-free{ color:#0f7a3d; }

/* solid orange "Book now" pill, like the reference card */
.reco-cta{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:800; color:#fff;
  padding:7px 12px; border-radius:9px; white-space:nowrap;
  background:linear-gradient(150deg,var(--reco-cta2),var(--reco-cta1));
  box-shadow:0 7px 15px -8px var(--reco-solid); transition:filter .2s ease, gap .2s ease; }
.reco-cta::after{ content:"→"; font-size:12px; line-height:1; transition:transform .2s ease; }
.reco-card:hover .reco-cta{ filter:brightness(1.06); gap:7px; }
.reco-card:hover .reco-cta::after{ transform:translateX(2px); }

/* Swiper slides need equal height */
/* Padding/negative-margin gives the hover lift (translateY(-6px)) and its 3D
   shadow room to render — without it, overflow:hidden clips the top border of a
   lifted card. The negative margin cancels the padding so cards keep position. */
.reco-swiper{ overflow:hidden; padding:14px 6px 22px; margin:-14px -6px 0; }
.reco-swiper .swiper-slide{ height:auto; }

/* ── Grid mode (chat-end modal + any non-carousel use): small dense tiles ── */
.reco-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); gap:12px; }
.reco-grid .reco-card{ border-radius:12px; }
.reco-grid .reco-media{ aspect-ratio:16/10; }
.reco-grid .reco-body{ padding:9px 11px 11px; border-top-width:3px; }
.reco-grid .reco-name{ font-size:11.5px; margin-bottom:4px; line-height:1.3; }
.reco-grid .reco-desc{ font-size:10.5px; margin-bottom:8px; -webkit-line-clamp:2; }
.reco-grid .reco-foot{ flex-direction:column; align-items:flex-start; gap:7px; }
.reco-grid .reco-price{ font-size:12.5px; }
.reco-grid .reco-cta{ font-size:10px; padding:5px 10px; border-radius:8px; }
.reco-grid .reco-badge{ font-size:8px; padding:3px 7px; top:6px; left:6px; }

@media (max-width:991px){
  /* iPad / tablet — fixed 3-up grid */
  .reco-grid{ grid-template-columns:repeat(3,1fr); gap:11px; }
}
@media (max-width:575px){
  .reco-title{ font-size:1.3rem; }
  .reco-nav{ display:none; }
  /* mobile — fixed 2-up grid */
  .reco-grid{ grid-template-columns:repeat(2,1fr); gap:9px; }
  .reco-grid .reco-name{ font-size:11px; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion:reduce){
  .reco-card, .reco-card:hover, .reco-media img, .reco-cta, .reco-cta::after, .reco-nav button{
    transition:none !important; transform:none !important; }
}
