/* Shopaale — compare, vendor shop, recently viewed (additive styles) */
:root { --brand: #6e1597; --brand-dark: #531073; --brand-soft: #faf0fb; --ink: #2c2530; --muted: #8a8494; --line: #ece8ee; }

/* ── Compare toggle on product cards ─────────────────────────── */
.compare-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer;
  transition: all .15s; white-space: nowrap; }
.compare-toggle i { font-size: 13px; }
.compare-toggle:hover { border-color: var(--brand); color: var(--brand); }
.compare-toggle.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Compare tray (fixed bottom bar) ─────────────────────────── */
#compare-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; transform: translateY(110%);
  transition: transform .25s ease; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(0,0,0,.12); }
#compare-tray.show { transform: translateY(0); }
.ct-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.ct-thumbs { display: flex; gap: 8px; }
.ct-thumb { position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: visible; flex-shrink: 0; }
.ct-thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f5f3f7; }
.ct-remove { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: #e53935; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.ct-info { display: flex; flex-direction: column; font-size: 13px; }
.ct-info span { color: var(--muted); font-size: 12px; }
.ct-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.ct-clear { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; color: var(--muted); }
.ct-go { background: var(--brand); color: #fff; text-decoration: none; border-radius: 10px; padding: 10px 22px; font-weight: 700; font-size: 14px; }
.ct-go:hover { background: var(--brand-dark); }

/* ── Compare page table ──────────────────────────────────────── */
.compare-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px 120px; }
.compare-title { font-size: 24px; font-weight: 800; margin: 6px 0 4px; }
.compare-title span { color: var(--brand); }
.compare-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.compare-table { border-collapse: collapse; width: 100%; min-width: 640px; }
.compare-table th, .compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
.compare-table th.row-label { background: var(--brand-soft); font-weight: 700; width: 150px; position: sticky; left: 0; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: none; }
.cmp-img { width: 130px; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #f5f3f7; }
.cmp-name { font-weight: 700; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-price { font-size: 18px; font-weight: 800; }
.cmp-mrp { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.cmp-off { color: #159447; font-weight: 700; font-size: 13px; margin-left: 6px; }
.cmp-rating { display: inline-flex; align-items: center; gap: 4px; background: #159447; color: #fff; border-radius: 6px; padding: 3px 8px; font-weight: 700; font-size: 13px; }
.cmp-add { background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer; font-size: 13px; }
.cmp-add:hover { background: var(--brand-dark); }
.cmp-rm { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 13px; margin-top: 8px; }
.compare-empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.compare-empty a { color: var(--brand); font-weight: 700; }

/* ── Vendor shop page ───────────────────────────────────────── */
.vshop-hero { background: linear-gradient(135deg, #6e1597, #a03fc4); color: #fff; }
.vshop-hero-inner { max-width: 1200px; margin: 0 auto; padding: 34px 20px; display: flex; gap: 20px; align-items: center; }
.vshop-logo { width: 92px; height: 92px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center;
  font-size: 38px; font-weight: 800; flex-shrink: 0; border: 4px solid rgba(255,255,255,.35); overflow: hidden; }
.vshop-logo img { width: 100%; height: 100%; object-fit: cover; }
.vshop-name { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.vshop-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; opacity: .95; align-items: center; }
.vshop-meta i { margin-right: 5px; }
.vshop-follow { margin-left: auto; background: #fff; color: var(--brand); border: none; border-radius: 999px; padding: 12px 26px; font-weight: 800; cursor: pointer; font-size: 14px; flex-shrink: 0; }
.vshop-follow.following { background: rgba(255,255,255,.18); color: #fff; border: 1.5px solid #fff; }
.vshop-body { max-width: 1200px; margin: 0 auto; padding: 22px 20px 120px; }
.vshop-about { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 24px; }
.vshop-about h3 { margin: 0 0 8px; font-size: 16px; }
.vshop-about p { margin: 0; color: #555; font-size: 14px; line-height: 1.6; }
.vshop-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.vshop-sec-head h2 { font-size: 20px; margin: 0; }
.vshop-sec-head h2 span { color: var(--brand); }
.vshop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vshop-sort { border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; }

/* ── Recently viewed carousel ────────────────────────────────── */
.rv-section { margin: 26px 0; max-width: 100%; overflow: hidden; }
/* Homepage: keep Recently Viewed inside the same centered container as every
   other section (compare.css loads after purplle-home.css, so this needs the
   extra specificity to beat .rv-section) — 2026-10-07 */
.content-section.rv-section { max-width: 1180px; margin: 26px auto; }
.rv-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; margin-bottom: 12px; }
.rv-head h2 { font-size: 19px; margin: 0; font-weight: 800; }
.rv-head h2 span { color: var(--brand); }
.rv-head a { font-size: 13px; color: var(--brand); font-weight: 700; text-decoration: none; }
.rv-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 12px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: 100%; }
.rv-row::-webkit-scrollbar { display: none; }
.rv-row .rv-card { flex: 0 0 168px; scroll-snap-align: start; }

/* sold-by link on cards */
.sold-by { font-size: 11.5px; color: var(--muted); margin: 2px 0 6px; }
.sold-by a { color: var(--brand); font-weight: 600; text-decoration: none; }
.sold-by a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  #compare-tray { bottom: 62px; }
  .vshop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .vshop-hero-inner { padding: 24px 14px; gap: 14px; }
  .vshop-logo { width: 68px; height: 68px; font-size: 28px; }
  .vshop-name { font-size: 20px; }
  .vshop-follow { padding: 10px 18px; font-size: 13px; }
  .vshop-body { padding: 16px 12px 140px; }
  .compare-table th.row-label { width: 110px; }
  .ct-inner { padding: 8px 10px; gap: 10px; }
  .ct-info span { display: none; }
  .rv-row .rv-card { flex-basis: 150px; }
}
