/* ==========================================================================
   RORA Kids homepage v4 — mobile first (2026-10-16)
   Loaded only on the front page (front-page.php). Designed at 360–414 px,
   widens gracefully. Tokens come from rora.css :root (DESIGN-SYSTEM.md).
   ========================================================================== */

.rhm {
  --rhm-ink: #080849;
  --rhm-plum: var(--rora-ink, #4a3b52);
  --rhm-soft: var(--rora-soft-ink, #6e5e77);
  --rhm-purple: #7048f1;
  --rhm-purple-dark: #5a35d6;
  --rhm-pink: #ff4f90;
  --rhm-line: rgba(74, 59, 82, 0.1);
  --rhm-card: #fff;
  --rhm-radius: 18px;
  --rhm-gutter: 14px;
  --rhm-instock-fg: #17663f;
  --rhm-instock-bg: #dff5e8;
  --rhm-preorder-fg: #8a3d00;
  --rhm-preorder-bg: #ffecd2;
  --rhm-font: var(--rora-rounded, "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  display: block;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px var(--rhm-gutter) 24px;
  color: var(--rhm-plum);
  font-family: var(--rhm-font);
  overflow-x: clip;
}

.rhm *,
.rhm *::before,
.rhm *::after { box-sizing: border-box; }

/* Storefront wraps content in .col-full with its own gutters; let the
   homepage own the full phone width. */
.home .site-content > .col-full { padding-left: 0; padding-right: 0; max-width: none; }

/* ---------- shared bits ---------- */
.rhm-section { margin: 22px 0 0; }

.rhm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.rhm-title {
  margin: 0 0 10px;
  color: var(--rhm-ink);
  font-family: var(--rhm-font);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}
.rhm-head .rhm-title { margin: 0; }

.rhm-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  color: var(--rhm-purple);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.rhm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 14px;
  font-family: var(--rhm-font);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.rhm-btn--primary {
  background: var(--rhm-purple);
  color: #fff !important;
  box-shadow: 0 10px 22px -12px rgba(112, 72, 241, 0.8);
}
.rhm-btn--primary:active { background: var(--rhm-purple-dark); }
.rhm-btn--ghost {
  background: #fff;
  border: 2px solid #e2d8fb;
  color: var(--rhm-purple) !important;
}

.rhm-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--rhm-pink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
}

.rhm-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
}
.rhm-price__now {
  color: var(--rhm-ink);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
}
.rhm-price__was {
  color: #8d8399;
  font-size: 1rem;
  font-weight: 700;
}
.rhm-price .woocommerce-Price-amount { font: inherit; color: inherit; }

/* fulfillment pill + ETA */
.rhm-ful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}
.rhm-ful__label {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.rhm-ful--instock .rhm-ful__label { background: var(--rhm-instock-bg); color: var(--rhm-instock-fg); }
.rhm-ful--instock .rhm-ful__eta { color: var(--rhm-instock-fg); }
.rhm-ful--preorder .rhm-ful__label { background: var(--rhm-preorder-bg); color: var(--rhm-preorder-fg); }
.rhm-ful--preorder .rhm-ful__eta { color: var(--rhm-preorder-fg); }

/* ---------- 1. star product ---------- */
.rhm-star {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ece4fb;
  border-radius: 22px;
  background: linear-gradient(160deg, #f3edff 0%, #fff 55%, #fff7d6 100%);
}

.rhm-star__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  aspect-ratio: 4 / 3;
}
.rhm-star__media img,
.rhm-star__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
}
.rhm-star__badge { position: absolute; top: 10px; left: 10px; }

.rhm-star__body { display: grid; gap: 8px; min-width: 0; }

.rhm-star__eyebrow {
  margin: 0;
  color: var(--rhm-purple);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rhm-star__eyebrow span { color: #f5b400; }

.rhm-star__title {
  margin: 0;
  font-family: var(--rhm-font);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}
.rhm-star__title a { color: var(--rhm-ink); font-weight: inherit; text-decoration: none; }

.rhm-star__cta { margin-top: 4px; }

.rhm-star__trust {
  margin: 0;
  color: var(--rhm-soft);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ---------- 2. categories ---------- */
.rhm-cats__row {
  display: flex;
  gap: 10px;
  margin: 0 calc(var(--rhm-gutter) * -1);
  padding: 2px var(--rhm-gutter) 6px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--rhm-gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rhm-cats__row::-webkit-scrollbar { display: none; }
.rhm-cats__row > li { flex: 0 0 auto; margin: 0; scroll-snap-align: start; }

.rhm-cat {
  display: grid;
  grid-template-columns: 44px auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px 10px 10px;
  border: 1px solid #e8e0f8;
  border-radius: 16px;
  background: #fff;
  color: var(--rhm-ink);
  text-decoration: none;
}
.rhm-cat__img,
.rhm-cat__icon {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3edff;
}
.rhm-cat__icon { display: grid; place-items: center; color: var(--rhm-purple); }
.rhm-cat__name { font-size: 0.95rem; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.rhm-cat__count { color: var(--rhm-soft); font-size: 14px; font-weight: 700; }
.rhm-cat--all { background: #f6f2ff; }

/* ---------- 3. how ordering works ---------- */
.rhm-how {
  padding: 14px;
  border-radius: var(--rhm-radius);
  background: #fff8dc;
}
.rhm-how__steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rhm-how__steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}
.rhm-how__steps strong { color: var(--rhm-ink); font-weight: 900; }
.rhm-how__num {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rhm-purple);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}

/* ---------- 4/5. product cards (shared loop card, homepage layout) ---------- */
.rhm .rhm-cards-wrap { margin: 0; }

/* rora.css has !important full-bleed shop-grid rules at <=640px; the
   homepage owns its own gutters, so these must win. */
.rhm .woocommerce ul.products.rhm-cards {
  display: grid !important;
  gap: 10px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.rhm .woocommerce ul.products.rhm-cards::before,
.rhm .woocommerce ul.products.rhm-cards::after { display: none; content: none; }

.rhm .woocommerce ul.products.rhm-cards li.product {
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0;
}

.rhm .woocommerce ul.products.rhm-cards--grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* Offers: one swipeable row (≈2¼ cards visible hints there is more) */
.rhm .woocommerce ul.products.rhm-cards--strip {
  display: flex !important;
  margin: 0 calc(var(--rhm-gutter) * -1) !important;
  padding: 2px var(--rhm-gutter) 8px !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--rhm-gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rhm .woocommerce ul.products.rhm-cards--strip::-webkit-scrollbar { display: none; }
.rhm .woocommerce ul.products.rhm-cards--strip li.product {
  flex: 0 0 calc((100vw - 2 * var(--rhm-gutter) - 10px) / 2.15) !important;
  scroll-snap-align: start;
}
.rhm .woocommerce ul.products.rhm-cards li.product .rora-collection-card { height: 100%; }

.rhm-grid__all { margin-top: 12px; }

/* ---------- 6. trust ---------- */
.rhm-trust__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rhm-trust__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f2ff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}
.rhm-trust__list svg { flex: 0 0 22px; color: var(--rhm-purple); }
.rhm-trust__list strong { color: var(--rhm-ink); font-weight: 900; }

/* ---------- 7. reviews ---------- */
.rhm-reviews__row {
  display: flex;
  gap: 10px;
  margin: 0 calc(var(--rhm-gutter) * -1);
  padding: 2px var(--rhm-gutter) 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--rhm-gutter);
  scrollbar-width: none;
}
.rhm-reviews__row::-webkit-scrollbar { display: none; }

.rhm-review {
  display: flex;
  flex: 0 0 82%;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid #ece4fb;
  border-radius: 16px;
  background: #fff;
  scroll-snap-align: start;
}
.rhm-review__quote { margin: 0; padding: 0; border: 0; quotes: none; }
.rhm-review__quote::before { display: none; }
.rhm-review__quote p {
  margin: 0;
  color: var(--rhm-plum);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;
}
.rhm-review__by {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--rhm-ink);
  font-size: 0.9rem;
  font-weight: 900;
}
.rhm-review__by img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; margin: 0; }
.rhm-review__by small { display: block; color: var(--rhm-soft); font-size: 12.5px; font-weight: 800; }

/* ---------- Message RORA ---------- */
.rhm-chat {
  padding: 16px 14px;
  border-radius: var(--rhm-radius);
  background: #f6f2ff;
}
.rhm-chat .rhm-title { margin-bottom: 4px; }
.rhm-chat__note { margin: 0 0 12px; color: var(--rhm-plum); font-size: 0.95rem; font-weight: 700; line-height: 1.4; }
.rhm-chat__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rhm-chat__btn { min-height: 48px; color: #fff !important; }
.rhm-chat__btn--whatsapp { background: #128c4a; }
.rhm-chat__btn--messenger { background: #0866ff; }

/* ---------- short phones: keep the star CTA above the tab bar ---------- */
@media (max-width: 639px) and (max-height: 759px) {
  .rhm { padding-top: 8px; }
  .rhm-star { gap: 8px; padding: 10px; }
  .rhm-star__media { aspect-ratio: auto; height: 30vh; min-height: 150px; }
  .rhm-star__body { gap: 6px; }
  .rhm-star__title { font-size: 1.2rem; }
  .rhm-star__cta { margin-top: 0; }
}

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .rhm { --rhm-gutter: 20px; padding-top: 18px; }
  .rhm-star {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    padding: 18px;
  }
  .rhm-star__media { aspect-ratio: 1 / 1; }
  .rhm-star__title { font-size: 1.7rem; }
  .rhm-star__cta { justify-self: start; min-width: 320px; }
  .rhm-star__trust { text-align: left; }
  .rhm-how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rhm-trust__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rhm .woocommerce ul.products.rhm-cards--grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
  .rhm .woocommerce ul.products.rhm-cards--strip li.product { flex: 0 0 264px !important; }
  .rhm-review { flex-basis: 320px; }
  .rhm-grid__all { max-width: 360px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 1000px) {
  .rhm-section { margin-top: 32px; }
  .rhm-title { font-size: 1.35rem; }
  .rhm .woocommerce ul.products.rhm-cards--grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .rhm-star { grid-template-columns: 440px minmax(0, 1fr); }
  .rhm-star__title { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rhm *, .rhm *::before, .rhm *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Storefront/v3 leftovers give the front-page .col-full side margins. */
body.home #content > .col-full {
  width: auto;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
body.home .rhm .rhm-star__title,
body.home .rhm .rhm-title { font-family: var(--rhm-font); font-weight: 900; }

/* Homepage cards: the category label is noise next to the ETA line. */
.rhm .rora-collection-card__body > small { display: none; }
