/* Bridge only — SomaMimi tokens must win over wbook.css */

body.wb-store {
  margin: 0 !important;
  font-family: var(--font-body), "Public Sans", system-ui, sans-serif !important;
  color: var(--foreground) !important;
  background: var(--background) !important;
  line-height: 1.5 !important;
  min-height: 100vh;
}

body.wb-store h1,
body.wb-store h2,
body.wb-store h3,
body.wb-store h4 {
  font-family: var(--font-display), "Archivo", system-ui, sans-serif !important;
  color: inherit !important;
  margin: 0 !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

body.wb-store a {
  color: inherit;
  text-decoration: none;
}

body.wb-store p {
  margin: 0;
}

body.wb-store img {
  max-width: none;
}

body.wb-store .wb-nav,
body.wb-store footer.wb-footer {
  display: none !important;
}

/* Force SomaMimi theme tokens even if wbook.css redefined :root */
body.wb-store {
  --radius: .5rem;
  --background: oklch(97.5% .003 250);
  --foreground: oklch(22% .01 260);
  --card: oklch(100% 0 0);
  --card-foreground: oklch(22% .01 260);
  --primary: oklch(60.5% .22 32);
  --primary-foreground: oklch(99.5% 0 0);
  --secondary: oklch(95.5% .006 250);
  --secondary-foreground: oklch(32% .012 260);
  --muted: oklch(95.5% .006 250);
  --muted-foreground: oklch(53% .012 260);
  --accent: oklch(55% .23 20);
  --accent-foreground: oklch(99.5% 0 0);
  --sage: oklch(72% .17 66);
  --clay: oklch(94% .05 48);
  --border: oklch(90.5% .005 255);
  --input: oklch(90.5% .005 255);
  --ring: oklch(60.5% .22 32);
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --shadow-book: 0 10px 24px -14px oklch(22% .01 260 / .35);
  --shadow-soft: 0 2px 10px -4px oklch(22% .01 260 / .18);
  --gradient-warm: linear-gradient(90deg, oklch(60.5% .22 32), oklch(66% .2 48));
  --gradient-hero: linear-gradient(180deg, oklch(60.5% .22 32), oklch(68% .2 46));
}

/* Explicit top bar + header (so it always matches the reference) */
.sm-topbar {
  background: #111;
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
}

.sm-topbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.375rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.sm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #e03c15;
  color: #fff;
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.18);
}

.sm-header-row {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.sm-logo {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff !important;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.sm-logo span {
  color: #ffe8d6;
}

.sm-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  min-width: 0;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  order: 3;
}

@media (min-width: 768px) {
  .sm-search {
    order: 0;
  }
}

.sm-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: #111;
  font-family: inherit;
}

.sm-search button {
  margin: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
}

.sm-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sm-join {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
}

@media (min-width: 640px) {
  .sm-join {
    display: inline-block;
  }
}

.sm-order {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  color: #e03c15 !important;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.sm-cats {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sm-cats-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.sm-cats-inner::-webkit-scrollbar {
  display: none;
}

.sm-cat {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
}

.sm-cat.is-active {
  background: #fff;
  color: #e03c15 !important;
}

/* Hero top block */
.sm-hero {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem 1rem 0;
}

.sm-hero-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .sm-hero-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.sm-promo {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #e03c15, #f06a2f);
  color: #fff;
  padding: 1.5rem;
  min-height: 280px;
}

@media (min-width: 768px) {
  .sm-promo {
    padding: 2.25rem;
    min-height: 320px;
  }
}

.sm-promo-tag {
  display: inline-block;
  background: #fff;
  color: #e03c15;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
}

.sm-promo h1 {
  margin-top: 0.75rem !important;
  max-width: 28rem;
  font-size: clamp(1.75rem, 4vw, 3rem) !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  color: #fff !important;
}

.sm-promo-text {
  margin-top: 0.5rem;
  max-width: 24rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
}

.sm-promo-cta {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.sm-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #e03c15 !important;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  text-decoration: none;
}

.sm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  text-decoration: none;
  background: transparent;
}

.sm-promo-img {
  display: none;
  position: absolute;
  right: -2rem;
  bottom: 0;
  height: 100%;
  width: 50%;
  object-fit: cover;
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
  opacity: 0.92;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .sm-promo-img {
    display: block;
  }
}

.sm-side {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .sm-side {
    grid-template-columns: 1fr 1fr;
  }
}

.sm-side-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sm-promo-rotator {
  position: relative;
  min-height: 7.5rem;
  overflow: hidden;
}

.sm-promo-slides {
  position: relative;
  min-height: 5.5rem;
}

.sm-promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.sm-promo-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sm-promo-dots {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.sm-promo-dots button {
  width: 0.45rem;
  height: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #d8d8d8;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.sm-promo-dots button.is-active {
  width: 1.1rem;
  background: #e03c15;
}

.sm-side-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #e03c15;
}

.sm-side-title {
  margin-top: 0.25rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: #111;
}

.sm-side-text {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6b6b6b;
}

.sm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.sm-stats strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 900;
  color: #e03c15;
}

.sm-stats span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b6b6b;
}

.sm-trust {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b6b6b;
}

@media (min-width: 768px) {
  .sm-trust {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sm-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

@media (min-width: 640px) {
  .sm-menu-btn {
    display: none;
  }
}

body.wb-store .wb-mobile-menu.open {
  display: block !important;
}

body.wb-store .wb-chat-launcher,
body.wb-store .wb-chat-panel-head {
  background: #e03c15 !important;
}

body.wb-store .wb-chat-bubble--me .wb-chat-bubble-body {
  background: #e03c15 !important;
}

body.wb-store .wb-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  body.wb-store .wb-book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

details summary::-webkit-details-marker {
  display: none;
}

/* ── Alibaba-style marketplace extras (additive) ── */
.ali-protect-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  background: linear-gradient(135deg, #fff8f5 0%, #fff 55%);
  border: 1px solid #f0d4c8;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}

.ali-protect-bar > div {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #5a5a5a;
}

.ali-protect-bar strong {
  color: #c2410c;
  font-size: 0.88rem;
}

@media (min-width: 768px) {
  .ali-protect-bar {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    align-items: center;
  }
}

.ali-hot-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.ali-hot-label {
  font-weight: 800;
  color: #1a1a1a;
}

.ali-hot-searches a {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e8e8e8;
  background: #fafafa;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  transition: border-color 0.15s, background 0.15s;
}

.ali-hot-searches a:hover {
  border-color: #e03c15;
  background: #fff5f2;
  color: #e03c15;
}

.ali-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #6b6b6b;
  background: #1a1a1a;
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.ali-countdown span {
  opacity: 0.85;
  margin-right: 0.2rem;
}

.ali-countdown strong {
  background: #e03c15;
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
  min-width: 1.6rem;
  text-align: center;
  font-size: 0.9rem;
}

.ali-protect-card {
  background: #fff8f5;
  border: 1px solid #f0d4c8;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
}

.ali-protect-card strong {
  display: block;
  color: #c2410c;
  margin-bottom: 0.4rem;
}

.ali-protect-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.55;
}

.ali-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.ali-share a {
  color: #e03c15;
  font-weight: 700;
  text-decoration: none;
}

.ali-share a:hover {
  text-decoration: underline;
}

.ali-compare-fab {
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.ali-compare-fab span {
  background: #e03c15;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
}

.ali-compare-table th,
.ali-compare-table td {
  vertical-align: top;
}

.ali-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.ali-track-step {
  text-align: center;
  position: relative;
  opacity: 0.45;
}

.ali-track-step.is-done {
  opacity: 1;
}

.ali-track-step.is-fail span {
  background: #b91c1c;
}

.ali-track-step span {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e03c15;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.ali-track-step p {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #333;
}

@media (max-width: 640px) {
  .ali-track {
    grid-template-columns: 1fr 1fr;
  }
}

/* Guaranteed 4-col book rows on desktop (SomaMimi shelves) */
.sm-book-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .sm-book-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

