/* ─────────────────────────────────────────────────────────────
   Crevita — "Shop Crevita Best Sellers" sales section
   Scoped under .shopx-* so it can't collide with existing styles.
   Theme-aware: uses brand tokens (--brown/--cream/--gold/--white/
   --border) which flip automatically in body.dark.
   ───────────────────────────────────────────────────────────── */

.shop-best {
  padding: 56px 0 8px;
}
.shopx-inner {
  width: min(1240px, 92%);
  margin: 0 auto;
}

/* ── Header ── */
.shopx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.shopx-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold, #B8712A);
  margin-bottom: 8px;
}
.shopx-title {
  font-family: var(--ff-head, Georgia, serif);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.08;
  color: var(--brown, #3D1F0A);
  margin: 0 0 6px;
}
.shopx-lede {
  font-size: 15px;
  color: var(--muted, #7B6A58);
  margin: 0;
  max-width: 46ch;
}
.shopx-viewall {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--brown, #3D1F0A);
  text-decoration: none;
  padding: 10px 18px;
  border: 1.5px solid var(--border, #E6DDCD);
  border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.shopx-viewall:hover {
  background: var(--brown, #3D1F0A);
  border-color: var(--brown, #3D1F0A);
  color: #fff;
}

/* ── Carousel shell ── */
.shopx-rail { position: relative; }

.shopx-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 2px 18px;
  align-items: stretch;      /* equal card heights */
}
.shopx-track::-webkit-scrollbar { display: none; }

/* ── Card ── */
.shopx-card {
  flex: 0 0 auto;
  width: calc((100% - 3 * 20px) / 4);   /* desktop: 4 across */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--white, #fff);
  border: 1px solid var(--border, #EbE2D2);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(36, 20, 9, .04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.shopx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(36, 20, 9, .12);
  border-color: rgba(184, 113, 42, .35);
}

/* media */
.shopx-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--cream-mid, #F3EDE3);
  overflow: hidden;
}
.shopx-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.shopx-card:hover .shopx-media img { transform: scale(1.05); }
.shopx-media--noimg { display: flex; align-items: center; justify-content: center; }
.shopx-imgfallback {
  font-family: var(--ff-head, serif);
  font-size: 64px;
  font-weight: 700;
  color: rgba(61, 31, 10, .18);
}

/* badge */
.shopx-badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
}
.shopx-badge--hot  { background: #B8712A; }        /* gold/espresso accent */
.shopx-badge--new  { background: #5A8C3A; }        /* fresh green */
.shopx-badge--value{ background: #3D1F0A; }        /* deep espresso */
.shopx-badge--soon { background: #8A7A66; }        /* muted taupe */

/* body */
.shopx-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 17px;
}
.shopx-name {
  font-family: var(--ff-head, serif);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--brown, #3D1F0A);
  text-decoration: none;
  margin: 0 0 5px;
}
.shopx-name:hover { color: var(--gold, #B8712A); }
.shopx-sub {
  font-size: 12.5px;
  color: var(--muted, #7B6A58);
  margin: 0 0 12px;
  line-height: 1.4;
}
.shopx-size {
  font-weight: 700;
  color: var(--brown-mid, #7B4F28);
}

/* price hierarchy: selling price dominant */
.shopx-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.shopx-sell {
  font-family: var(--ff-head, serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--brown, #3D1F0A);
  line-height: 1;
}
.shopx-mrp {
  font-size: 13px;
  color: var(--muted, #9a8b78);
  text-decoration: line-through;
}
.shopx-save {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #2d7a3a;
  background: rgba(45, 122, 58, .10);
  padding: 3px 8px;
  border-radius: 6px;
}
.shopx-meta {
  font-size: 11px;
  color: var(--muted, #8a7a68);
  margin: 0 0 14px;
  line-height: 1.4;
}

/* actions pinned to bottom → equal visual rhythm across cards */
.shopx-actions {
  margin-top: auto;
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.shopx-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border, #E6DDCD);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.shopx-qty-btn {
  width: 34px;
  height: 42px;
  border: none;
  background: transparent;
  color: var(--brown, #3D1F0A);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.shopx-qty-btn:hover { background: var(--cream-mid, #F3EDE3); }
.shopx-qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown, #3D1F0A);
}
.shopx-add {
  flex: 1;
  min-height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--brown, #3D1F0A);
  color: #fff;
  font-family: var(--ff-body, system-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.shopx-add:hover { background: #52290e; }
.shopx-add:active { transform: scale(.98); }
.shopx-add.is-added { background: #2d7a3a; }
.shopx-add--soon,
.shopx-add:disabled {
  background: var(--cream-mid, #EEE6D8);
  color: var(--muted, #9a8b78);
  cursor: not-allowed;
  width: 100%;
}
.shopx-notify {
  display: inline-block;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 700;
  color: #1f7a43;
  text-decoration: none;
}
.shopx-notify:hover { text-decoration: underline; }

.shopx-card--soon .shopx-media img { opacity: .82; filter: saturate(.85); }

/* ── Arrows (desktop) ── */
.shopx-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--white, #fff);
  border: 1px solid var(--border, #E6DDCD);
  color: var(--brown, #3D1F0A);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(36,20,9,.14);
  z-index: 5;
  transition: background .2s, color .2s, opacity .2s;
}
.shopx-arrow:hover { background: var(--brown, #3D1F0A); color: #fff; }
.shopx-arrow:disabled { opacity: 0; pointer-events: none; }
.shopx-arrow--prev { left: -18px; }
.shopx-arrow--next { right: -18px; }

/* ── Skeleton loading ── */
.shopx-skel {
  flex: 0 0 auto;
  width: calc((100% - 3 * 20px) / 4);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border, #EbE2D2);
  background: var(--white, #fff);
}
.shopx-skel-media { aspect-ratio: 4/5; background: var(--cream-mid, #F0E9DC); }
.shopx-skel-line { height: 12px; margin: 12px 16px; border-radius: 6px; background: var(--cream-mid, #F0E9DC); }
.shopx-skel-line.sm { width: 50%; }
.shopx-track.is-ready .shopx-skel { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .shopx-skel-media, .shopx-skel-line { animation: shopxPulse 1.3s ease-in-out infinite; }
}
@keyframes shopxPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ── Trust strip ── */
.shopx-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin: 10px auto 0;
  padding: 16px 0 4px;
}
.shopx-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brown-mid, #7B4F28);
}
.shopx-trust svg { color: var(--gold, #B8712A); flex-shrink: 0; }

/* ── Combos strip ── */
.shopx-combos { padding: 46px 0 10px; }
.shopx-combos .shopx-inner { text-align: center; }
.shopx-combos .shopx-title { margin-bottom: 8px; }
.shopx-combos-lede {
  font-size: 15px; color: var(--muted, #7B6A58);
  margin: 0 auto 26px; max-width: 52ch;
}
.shopx-combo {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 26px;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
  background: var(--white, #fff);
  border: 1px solid var(--border, #EbE2D2);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(36,20,9,.08);
}
.shopx-combo-media {
  aspect-ratio: 1;
  background: var(--cream-mid, #F3EDE3);
  display: flex; align-items: center; justify-content: center;
}
.shopx-combo-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.shopx-combo-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; padding: 0; }
.shopx-combo-grid picture { display: block; background: var(--white, #fff); }
.shopx-combo-grid img { padding: 8px; aspect-ratio: 4/5; }
.shopx-combo-body { padding: 26px 26px 26px 0; }
.shopx-combo-tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: var(--gold, #B8712A);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.shopx-combo-name {
  font-family: var(--ff-head, serif); font-size: 24px; color: var(--brown, #3D1F0A);
  margin: 0 0 6px;
}
.shopx-combo-desc { font-size: 14px; color: var(--muted, #7B6A58); margin: 0 0 14px; }
.shopx-combo-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.shopx-combo-price .now { font-family: var(--ff-head, serif); font-size: 26px; font-weight: 700; color: var(--brown, #3D1F0A); }
.shopx-combo-price .was { font-size: 15px; color: var(--muted); text-decoration: line-through; }
.shopx-combo-price .save { font-size: 12px; font-weight: 800; color: #2d7a3a; background: rgba(45,122,58,.10); padding: 3px 9px; border-radius: 6px; }

/* ── Raw Makhana teaser (links out to raw-makhana.html) ── */
.shopx-rawmakhana { padding: 10px 0 16px; }
.shopx-rawmakhana .shopx-inner { text-align: center; }
.shopx-rawmakhana .shopx-title { margin-bottom: 8px; }
.shopx-rm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.shopx-rm-emoji { font-size: 64px; }

/* ── Wholesale / B2B CTA (separate funnel) ── */
.shopx-bulk { padding: 40px 0 60px; }
.shopx-bulk-card {
  width: min(1240px, 92%);
  margin: 0 auto;
  background: linear-gradient(135deg, #3D1F0A 0%, #5A3413 100%);
  border-radius: 24px;
  padding: 46px clamp(24px, 5vw, 60px);
  color: #F6EEE0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
}
.shopx-bulk-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #E0B36A; margin-bottom: 10px; display: block;
}
.shopx-bulk h2 {
  font-family: var(--ff-head, serif);
  font-size: clamp(24px, 3vw, 34px);
  color: #fff; margin: 0 0 10px; line-height: 1.12;
}
.shopx-bulk p { font-size: 15px; color: #E8D9C4; margin: 0 0 6px; max-width: 54ch; }
.shopx-bulk-tags { font-size: 12.5px; color: #C9B79C; margin-top: 8px; letter-spacing: .02em; }
.shopx-bulk-actions { display: flex; flex-direction: column; gap: 12px; min-width: 210px; }
.shopx-bulk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-size: 14px; font-weight: 700;
  text-decoration: none; text-align: center; transition: transform .15s, background .2s, opacity .2s;
}
.shopx-bulk-btn--primary { background: #E0B36A; color: #3D1F0A; }
.shopx-bulk-btn--primary:hover { background: #E8C079; transform: translateY(-2px); }
.shopx-bulk-btn--ghost { background: transparent; color: #F6EEE0; border: 1.5px solid rgba(246,238,224,.4); }
.shopx-bulk-btn--ghost:hover { background: rgba(246,238,224,.10); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1199px) {
  .shopx-card, .shopx-skel { width: calc((100% - 2 * 20px) / 3.25); }  /* ~3.25 across */
}
@media (max-width: 900px) {
  .shopx-card, .shopx-skel { width: calc((100% - 20px) / 2.3); }        /* tablet ~2.3 */
  .shopx-arrow { display: none; }                                        /* swipe on touch */
  .shopx-combo { grid-template-columns: 160px 1fr; gap: 18px; }
  .shopx-combo-body { padding: 20px 20px 20px 0; }
}
@media (max-width: 640px) {
  .shop-best { padding: 40px 0 4px; }
  .shopx-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .shopx-card, .shopx-skel { width: 78%; }                               /* ~1.28 → partial next card */
  .shopx-track { gap: 14px; scroll-padding-left: 4px; }
  .shopx-bulk-card { grid-template-columns: 1fr; padding: 34px 24px; }
  .shopx-bulk-actions { min-width: 0; }
  .shopx-combo { grid-template-columns: 1fr; max-width: 420px; text-align: center; }
  .shopx-combo-media { aspect-ratio: 16/10; }
  .shopx-combo-body { padding: 4px 22px 24px; }
  .shopx-combo-price { justify-content: center; }
  .shopx-rm-row { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 400px) {
  .shopx-card, .shopx-skel { width: 82%; }
}

/* ── Dark mode: keep CTAs & accents high-contrast ──
   In dark mode --brown flips to a light tan, so the solid-brown
   buttons need an explicit gold-on-espresso treatment instead. */
body.dark .shopx-add { background: #E0B36A; color: #3D1F0A; }
body.dark .shopx-add:hover { background: #EBC77E; }
body.dark .shopx-add.is-added { background: #3FA35A; color: #08210F; }
body.dark .shopx-add--soon,
body.dark .shopx-add:disabled { background: rgba(255,255,255,.08); color: #B7A488; }
body.dark .shopx-viewall:hover { background: #E0B36A; color: #3D1F0A; border-color: #E0B36A; }
body.dark .shopx-save,
body.dark .shopx-combo-price .save { color: #8EE0A2; background: rgba(126,212,146,.15); }
body.dark .shopx-card { box-shadow: 0 1px 2px rgba(0,0,0,.3); }
body.dark .shopx-card:hover { box-shadow: 0 16px 34px rgba(0,0,0,.45); }

@media (prefers-reduced-motion: reduce) {
  .shopx-card, .shopx-media img, .shopx-add, .shopx-bulk-btn { transition: none; }
  .shopx-card:hover { transform: none; }
  .shopx-card:hover .shopx-media img { transform: none; }
}
