/* ============================================================
   EMYJAY — Marketplace / app-style UI layer
   Loads after style.css + responsive.css and restyles them:
   rounded white cards on a soft background, bold sans headings,
   icon action buttons, category icon row, and a mobile tab bar.
   To change the brand colour, edit --forest / --forest-deep /
   --forest-tint in style.css (e.g. a blue like #1E4FD8).
   ============================================================ */

:root {
  --page-bg: #F4F7F5;
  --line: rgba(15, 40, 30, 0.1);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(15, 40, 30, 0.04), 0 4px 12px rgba(15, 40, 30, 0.05);
  --shadow-raised: 0 4px 10px rgba(15, 40, 30, 0.06), 0 12px 28px rgba(15, 40, 30, 0.09);
  --tab-h: 4.25rem;
}

/* Headings keep the site-wide display serif (Bitter) set in style.css —
   this layer only tightens weight/leading, it does not swap the typeface. */
body { background: var(--page-bg); }
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Global chrome ---------- */
.announcement { background: var(--forest); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.01em; }
.site-header { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.site-header .container { padding-block: 0.8rem; }
.logo .mark { border-radius: 12px; }
.main-nav a::after { background: var(--forest); }
.btn { border-radius: 10px; font-weight: 700; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,40,30,.05); }
.btn-outline:hover { border-color: var(--forest); color: var(--forest); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.cart-count { background: #E5484D; }

/* ---------- Homepage rhythm ---------- */
.home section { padding-block: clamp(0.9rem, 2.2vw, 1.4rem); }
.home .section-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 1rem; align-items: center; }
.home .section-head h2 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); margin: 0; }
.view-all { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--forest); font-weight: 700; font-size: 0.9rem; }
.view-all svg { width: 16px; height: 16px; }
.view-all:hover { color: var(--forest-deep); }

/* Search + category row */
.home-top { padding-top: 1.1rem; }
.search-bar {
  display: flex; align-items: center; gap: 0.6rem; background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 0.3rem 0.3rem 0.3rem 1rem;
  box-shadow: var(--shadow-card);
}
.search-bar:focus-within { border-color: var(--forest); }
.search-bar > svg { width: 20px; height: 20px; color: var(--ink-soft); flex-shrink: 0; }
.search-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; padding: 0.7rem 0; color: var(--ink); }
.search-bar button { width: 2.9rem; height: 2.9rem; border-radius: 11px; background: var(--forest); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.search-bar button:hover { background: var(--forest-deep); }
.search-bar button svg { width: 20px; height: 20px; }

.cat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin-top: 1.1rem; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.cat-icon { width: 100%; max-width: 4.6rem; aspect-ratio: 1; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; transition: transform 0.2s var(--ease), border-color 0.2s; }
.cat-icon svg { width: 58%; height: 58%; color: var(--forest); }
.cat-icon.tone-gold svg { color: var(--gold-deep); }
.cat-icon-all svg { width: 40%; height: 40%; color: var(--ink-soft); }
.cat-tile:hover .cat-icon { transform: translateY(-2px); border-color: var(--forest); }
.cat-label { line-height: 1.25; }

/* Hero banner card */
.home .hero-section { padding-block: 0.6rem 0.9rem; }
.hero-card { background: var(--forest-tint); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); overflow: hidden; }
.hero-card-main { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.5rem; align-items: center; padding: clamp(1.4rem, 3.5vw, 2.75rem); }
.hero-card h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); line-height: 1.08; margin-bottom: 0.9rem; }
.hero-card h1 .accent { color: var(--forest); }
.hero-card p { color: var(--ink-soft); max-width: 46ch; margin-bottom: 1.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-art { position: relative; min-height: 15rem; }
.hero-badge { position: absolute; top: 0; right: 0; z-index: 2; width: 5.6rem; height: 5.6rem; border-radius: 50%; background: var(--gold); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.05; box-shadow: 0 6px 16px rgba(160,111,32,.35); }
.hero-badge small { font-size: 0.62rem; font-weight: 700; }
.hero-badge strong { font-size: 1rem; font-weight: 800; }
.hero-stage { position: absolute; inset: 1.5rem 0 0 0; display: flex; align-items: flex-end; justify-content: center; gap: 0.75rem; }
.hero-stage::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -0.6rem; height: 1.6rem; border-radius: 50%; background: rgba(15,40,30,.08); filter: blur(6px); z-index: 0; }
.stage-tile { position: relative; z-index: 1; width: 31%; border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 10px 24px rgba(15,40,30,.14); background: #fff; }
.stage-tile .pplaceholder { aspect-ratio: 3 / 4; height: auto; }
.stage-tile-1 { transform: translateY(-1.2rem); }
.stage-tile-2 { transform: translateY(0); }
.stage-tile-3 { transform: translateY(-2.4rem); }
.hero-perks { list-style: none; margin: 0; padding: 1rem clamp(1.4rem, 3.5vw, 2.75rem); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.65); }
.hero-perks li { display: flex; align-items: center; gap: 0.7rem; }
.hero-perks svg { width: 26px; height: 26px; color: var(--gold-deep); flex-shrink: 0; }
.hero-perks strong { display: block; font-size: 0.85rem; }
.hero-perks small { display: block; font-size: 0.75rem; color: var(--ink-soft); }

/* Delivery offer band */
.deal-band { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1rem, 3vw, 2rem); align-items: center; background: var(--forest-deep); color: #fff; border-radius: var(--radius-lg); padding: clamp(1rem, 2.5vw, 1.5rem); }
.deal-thumb { width: clamp(5rem, 12vw, 7.5rem); aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.deal-kicker { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.9rem; color: var(--gold-tint); }
.deal-kicker svg { width: 16px; height: 16px; }
.deal-copy h2 { color: #fff; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem); margin: 0.25rem 0; }
.deal-copy p { margin: 0 0 0.9rem; opacity: 0.85; font-size: 0.9rem; }
.deal-stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.6rem; }
.deal-stats li { min-width: 4.6rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 0.7rem 0.5rem; text-align: center; }
.deal-stats strong { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.deal-stats span { font-size: 0.68rem; opacity: 0.85; }

/* Category cards */
.cat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.cat-card { display: flex; align-items: center; gap: 0.8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.75rem; transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s; }
.cat-card:hover { box-shadow: var(--shadow-card); }
.cat-card:hover { transform: translateY(-2px); border-color: var(--forest); }
.cat-thumb { width: 3.6rem; height: 3.6rem; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--forest-tint); }
.cat-thumb.tone-gold { background: var(--gold-tint); }
.cat-thumb svg { width: 62%; height: 62%; color: var(--forest); }
.cat-thumb.tone-gold svg { color: var(--gold-deep); }
.cat-card-text strong { display: block; font-size: 0.9rem; }
.cat-card-text small { color: var(--ink-soft); font-size: 0.78rem; }

/* Product cards (vertical) */
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15,40,30,.12); }
.product-card .thumb-link { border-radius: 0; margin-bottom: 0; }
.product-card .badge { border-radius: 6px; background: #E5484D; }
.product-card .badge.badge-out { background: var(--ink-soft); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 0.85rem 0.95rem 0.95rem; }
.product-card .cat, .feature-card .cat { font-size: 0.78rem; font-weight: 600; color: var(--gold-deep); margin: 0 0 0.25rem; }
.product-card h3, .feature-card h3 { font-size: 0.95rem; line-height: 1.3; margin: 0 0 0.2rem; }
.product-card .size, .feature-card .size { font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.product-card .price-row, .feature-card .price-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: auto 0 0; }
.price { font-weight: 800; font-size: 1.05rem; }
.price-tbd { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.card-actions { display: flex; gap: 0.4rem; margin: 0; }
.icon-action { width: 2.4rem; height: 2.4rem; border-radius: 10px; border: 1.5px solid var(--forest); color: var(--forest); background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; cursor: pointer; }
.icon-action svg { width: 18px; height: 18px; }
.icon-action:hover:not(:disabled) { background: var(--forest); color: #fff; }
.icon-action:disabled { opacity: 0.4; cursor: not-allowed; }
.icon-action-wa { border-color: var(--whatsapp); color: #1DAE56; }
.icon-action-wa:hover { background: var(--whatsapp) !important; color: #fff !important; }

/* Featured horizontal cards */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.feature-card { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.8rem; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.feature-card:hover { box-shadow: var(--shadow-card); }
.feature-card:hover { transform: translateY(-2px); }
.feature-thumb { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; align-self: start; }
.feature-body { display: flex; flex-direction: column; min-width: 0; padding-block: 0.15rem; }
.feature-card h3 { font-size: 1.02rem; }
.feature-card h3 a:hover { color: var(--forest); }

/* Collection banners */
.promo-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.promo-card { display: grid; grid-template-columns: 1fr 9rem; gap: 1rem; align-items: center; border-radius: var(--radius-lg); padding: clamp(1.1rem, 2.5vw, 1.6rem); min-height: 11rem; overflow: hidden; }
.promo-gold { background: var(--gold-tint); }
.promo-green { background: var(--forest-tint); }
.promo-copy h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.promo-copy p { font-size: 0.85rem; margin: 0 0 1rem; color: rgba(22,36,29,.8); }
.promo-copy .btn svg { width: 16px; height: 16px; }
.promo-art { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; }

/* Horizontal product rail */
.rail { display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x proximity; padding: 0.25rem 0.1rem 1rem; margin-inline: -0.1rem; scrollbar-width: thin; }
.rail:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 12px; }
.rail .product-card { flex: 0 0 13.5rem; scroll-snap-align: start; }

/* Benefits + steps as cards */
.benefits-grid, .steps-row { gap: 1rem; }
.benefit, .step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.2rem; }
.benefit svg { width: 30px; height: 30px; padding: 6px; box-sizing: content-box; border-radius: 10px; background: var(--forest-tint); color: var(--forest); margin-bottom: 0.75rem; }
.benefit h4, .step-card h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.benefit p, .step-card p { font-size: 0.88rem; margin: 0; color: var(--ink-soft); }
.step-num { border-radius: 50%; }

/* WhatsApp contact card */
.wa-band-card { display: flex; align-items: center; gap: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem; }
.wa-band-icon { width: 3.4rem; height: 3.4rem; border-radius: 14px; background: #E7F9EE; color: #1DAE56; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-band-icon svg { width: 26px; height: 26px; }
.wa-band-text { flex: 1; min-width: 0; }
.wa-band-text h2 { font-size: 1.15rem; margin: 0 0 0.2rem; }
.wa-band-text p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Products page ---------- */
.filter-chip { border-radius: 999px; }

/* ---------- Mobile tab bar ---------- */
.tab-bar { display: none; }

@media (max-width: 1024px) {
  .cat-cards { grid-template-columns: repeat(2, 1fr); }
  .hero-card-main { grid-template-columns: 1fr; }
  .hero-art { min-height: 14rem; order: -1; }
  .hero-stage { inset: 2rem 0 0 0; }
  .stage-tile { width: 26%; }
}

@media (max-width: 900px) {
  .feature-grid, .promo-pair { grid-template-columns: 1fr; }
  .deal-band { grid-template-columns: auto 1fr; }
  .deal-stats { grid-column: 1 / -1; }
  .deal-stats li { flex: 1; }
}

@media (max-width: 768px) {
  body.has-tab-bar { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
  .wa-float { display: none; }
  .tab-bar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 140;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(15,40,30,.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; min-height: var(--tab-h); font-size: 0.7rem; font-weight: 600; color: var(--ink-soft); background: none; border: 0; cursor: pointer; font-family: inherit; }
  .tab-item.is-active { color: var(--forest); }
  .tab-icon { position: relative; display: inline-flex; }
  .tab-icon svg { width: 24px; height: 24px; }
  .tab-item:focus-visible { outline: 2px solid var(--forest); outline-offset: -3px; }
  .tab-item.is-active .tab-icon svg { stroke-width: 2.4; }
}

@media (max-width: 640px) {
  .cat-row { gap: 0.4rem; margin-top: 0.9rem; }
  .cat-tile { font-size: 0.7rem; }
  .cat-icon { border-radius: 14px; }
  .hero-perks { grid-template-columns: 1fr; gap: 0.7rem; }
  .hero-card-main { padding: 1.25rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-badge { width: 4.6rem; height: 4.6rem; }
  .hero-badge strong { font-size: 0.8rem; }
  .deal-band { grid-template-columns: 1fr; }
  .deal-thumb { width: 5rem; }
  .feature-card { grid-template-columns: 7rem 1fr; gap: 0.8rem; }
  .promo-card { grid-template-columns: 1fr 6.5rem; }
  .wa-band-card { flex-wrap: wrap; }
  .wa-band-card .btn { width: 100%; }
  .rail .product-card { flex-basis: 11.5rem; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .product-card .card-actions .icon-action { width: 2.1rem; height: 2.1rem; }
  .product-card .price-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card, .feature-card, .cat-card, .cat-icon { transition: none; }
}

/* ---------- Refinements after visual review ---------- */
.hero-card .hero-perks { padding: 1rem clamp(1.4rem, 3.5vw, 2.75rem); }
.deal-band .deal-stats, .wa-band-card { margin: 0; }
.product-card .price-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-top: auto; }
.product-card .card-actions { width: 100%; }
.product-card .card-actions .icon-action { flex: 1; }
.price-tbd { white-space: nowrap; }
@media (min-width: 1100px) {
  .rail { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; padding-bottom: 0.25rem; }
  .rail .product-card { flex: none; }
}
.hero-card p { font-size: 0.98rem; }

/* ---------- Multi-buy offers on product pages ---------- */
.bundle-offers { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bundle-offers li { background: var(--gold-tint); color: var(--ink); border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.85rem; }
.bundle-offers small { opacity: 0.75; }
#priceRow { display: block; }

/* ============================================================
   Ratings, wishlist, reviews & testimonials
   ============================================================ */

/* ---------- Stars (text glyphs: grey base, gold overlay clipped by --pct) ---------- */
.stars { position: relative; display: inline-block; font-size: 0.95rem; line-height: 1; letter-spacing: 0.08em; color: #D4DAD6; white-space: nowrap; }
.stars::before { content: "★★★★★"; }
.stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--pct, 0%); overflow: hidden; color: #F5A623; }
.rating-row { display: flex; align-items: center; gap: 0.35rem; min-height: 1.1rem; margin: 0 0 0.55rem; font-size: 0.78rem; }
.rating-row .stars { font-size: 0.85rem; }
.rating-num { font-weight: 800; }
.rating-count, .no-reviews { color: var(--ink-soft); }
.no-reviews { font-size: 0.74rem; }
.product-rating { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.4rem 0 0.2rem; font-size: 0.9rem; }
.product-rating .stars { font-size: 1.05rem; }
.product-rating:hover .rating-count, .product-rating:hover .no-reviews { color: var(--forest); text-decoration: underline; }

/* ---------- Wishlist hearts ---------- */
.product-card, .feature-card { position: relative; }
.wish-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-soft); }
.wish-btn svg { width: 20px; height: 20px; transition: transform 0.15s var(--ease); }
.wish-btn.is-saved { color: #E5484D; }
.wish-btn.is-saved svg { fill: currentColor; }
.wish-btn:active svg { transform: scale(0.85); }
.wish-card { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255,255,255,0.94); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(15,40,30,.12); }
.wish-card:hover { color: #E5484D; }
.wish-btn-lg { gap: 0.4rem; flex: 0 0 auto; min-width: 0; }
.wish-btn-lg svg { width: 18px; height: 18px; }
.wish-btn-lg.is-saved { border-color: #E5484D; color: #E5484D; background: #FFF5F5; }
.wish-link.icon-btn[aria-current="page"] { color: var(--forest); }
.wishlist-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; padding-block: 3rem; }
.wishlist-empty svg { width: 3rem; height: 3rem; color: #C9D2CD; }
.wishlist-empty p { margin: 0 0 0.75rem; color: var(--ink-soft); }

/* ---------- Reviews section (product page) ---------- */
.reviews-section { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.reviews-section .section-head, .testimonials-section .section-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 1rem; align-items: center; }
.reviews-layout { display: grid; grid-template-columns: 17rem 1fr; gap: 1.5rem; align-items: start; }
.reviews-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.25rem; text-align: center; }
.summary-score strong { font-size: 3rem; font-weight: 800; line-height: 1; }
.summary-score span { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.4rem; }
.reviews-summary .stars { font-size: 1.3rem; }
.reviews-summary > p { margin: 0.4rem 0 1rem; font-size: 0.85rem; color: var(--ink-soft); }
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.78rem; }
.rating-bars li { display: grid; grid-template-columns: 1.8rem 1fr 1.6rem; align-items: center; gap: 0.5rem; text-align: left; }
.rating-bars .bar { height: 8px; border-radius: 99px; background: #E8EDEA; overflow: hidden; }
.rating-bars .bar span { display: block; height: 100%; background: #F5A623; border-radius: 99px; }
.rating-bars .n { text-align: right; color: var(--ink-soft); }
.reviews-main { display: grid; gap: 1rem; min-width: 0; }
.review-list, .testimonial-grid { display: grid; gap: 0.9rem; }
.testimonial-grid { grid-template-columns: repeat(3, 1fr); }
.reviews-empty, .testimonial-empty { background: #fff; border: 1px dashed rgba(15,40,30,.2); border-radius: var(--radius-md); padding: 1.25rem; margin: 0; color: var(--ink-soft); text-align: center; }
.testimonial-empty p { margin: 0; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.review-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.review-head .stars { margin-left: auto; font-size: 0.95rem; }
.review-avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--forest-tint); color: var(--forest); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.review-who { min-width: 0; display: flex; flex-direction: column; }
.review-who strong { font-size: 0.92rem; overflow-wrap: anywhere; }
.review-who small { font-size: 0.74rem; color: var(--ink-soft); }
.review-text { margin: 0; font-size: 0.92rem; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line; }
.review-mine { margin: 0.7rem 0 0; font-size: 0.78rem; color: var(--ink-soft); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--forest); cursor: pointer; text-decoration: underline; }
.view-all.link-btn { text-decoration: none; }
.link-btn:hover { color: var(--forest-deep); }

/* ---------- Review form ---------- */
.review-form-wrap { min-width: 0; }
.review-form-wrap[hidden] { display: none; }
.testimonials-section .review-form-wrap { margin-top: 1rem; }
.review-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.25rem; display: grid; gap: 0.9rem; }
.review-form h3 { margin: 0; font-size: 1.1rem; }
.review-form .form-field { margin: 0; display: grid; gap: 0.35rem; border: 0; padding: 0; min-width: 0; }
.review-form label, .review-form legend { font-weight: 700; font-size: 0.85rem; padding: 0; }
.review-form input[type="text"], .review-form select, .review-form textarea { width: 100%; font: inherit; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.review-form textarea { resize: vertical; min-height: 6rem; }
.review-form input:focus-visible, .review-form select:focus-visible, .review-form textarea:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; border-color: var(--forest); }
.review-form .field-error { margin: 0; min-height: 0; font-size: 0.8rem; color: var(--error); }
.review-form .field-error:empty { display: none; }
.review-form .btn { justify-self: start; }
.form-status { margin: 0; font-size: 0.88rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--error); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Star picker: radios reversed so hovering/checking fills stars to the left */
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.15rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; font-size: 2rem; line-height: 1; color: #D4DAD6; padding: 0.1rem; transition: color 0.12s, transform 0.12s; }
.star-input label::before { content: "★"; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #F5A623; }
.star-input label:hover { transform: scale(1.1); }
.star-input input:focus-visible + label { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 6px; }

/* ---------- Testimonials ---------- */
.home .testimonials-section { padding-block: clamp(0.9rem, 2.2vw, 1.4rem); }

@media (max-width: 900px) {
  .reviews-layout { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .testimonial-grid { grid-template-columns: 1fr; }
  .review-head { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  /* Tab bar no longer has a Chat tab, so keep the WhatsApp button reachable above it */
  .wa-float { display: inline-flex; bottom: calc(var(--tab-h) + 0.9rem + env(safe-area-inset-bottom, 0px)); right: 1rem; width: 3rem; height: 3rem; }
  .wa-float svg { width: 24px; height: 24px; }
}
.reviews-section .section-head h2, .testimonials-section .section-head h2 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); margin: 0; }
.testimonials-section .review-form { max-width: 44rem; }

/* ---------- Testimonials carousel ---------- */
.testimonials-head { text-align: center; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.testimonials-head h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); line-height: 1.1; margin: 0 0 0.6rem; }
.testimonials-head p { margin: 0; color: var(--ink-soft); font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem); }
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0.35rem 1.5rem 1rem; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-centered { justify-content: center; -webkit-mask-image: none; mask-image: none; }
.carousel-track:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 12px; }
.testimonial-card {
  flex: 0 0 min(24rem, 82%); scroll-snap-align: center; display: flex; flex-direction: column; gap: 0.9rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.4rem 1.5rem;
}
.testimonial-card .stars { font-size: 1rem; align-self: flex-start; }
.testimonial-text {
  margin: 0; font-size: 1.02rem; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.testimonial-card.is-expanded .testimonial-text { display: block; -webkit-line-clamp: unset; }
.read-more { align-self: flex-start; font-size: 0.85rem; margin-top: -0.4rem; }
.testimonial-author { display: flex; align-items: center; gap: 0.8rem; margin-top: auto; }
.testimonial-author .review-avatar { width: 3rem; height: 3rem; font-size: 1.1rem; }
.testimonial-author strong { font-size: 1rem; }
.testimonial-author small { font-size: 0.88rem; }
.testimonial-card .review-mine { margin: 0; }
.carousel-btn {
  position: absolute; top: 45%; transform: translateY(-50%); z-index: 3; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(15,40,30,.15); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.carousel-btn[hidden] { display: none; }
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover:not(:disabled) { background: var(--forest); color: #fff; border-color: var(--forest); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-prev { left: 0.25rem; }
.carousel-next { right: 0.25rem; }
.testimonials-cta { display: flex; justify-content: center; margin-top: 1rem; }
.testimonials-cta .btn { padding: 0.85rem 2rem; font-size: 1rem; }
.review-form .optional { font-weight: 500; color: var(--ink-soft); }
.testimonials-section .review-form-wrap { max-width: 44rem; margin: 1.25rem auto 0; }
@media (max-width: 640px) {
  .carousel-track { padding-inline: 1rem; gap: 0.75rem; }
  .testimonial-card { flex-basis: 84%; padding: 1.15rem; }
  .carousel-btn { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { .carousel-track { scroll-behavior: auto; } }
.testimonials-head p { margin-inline: auto; max-width: 38rem; }
.testimonial-empty p, .reviews-empty { max-width: none; margin-inline: auto; }


/* ============================================================
   Reviews section in the "marketplace" style + floating WhatsApp
   ============================================================ */
.testimonials-head { text-align: left; margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem); }
.testimonials-eyebrow { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-deep); }
.testimonials-head h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 0.75rem; }
.testimonials-head p { margin: 0; max-width: 40rem; margin-inline: 0; color: var(--ink-soft); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); }

.carousel-track { gap: 1.25rem; padding: 0.75rem 0.25rem 1.5rem; scroll-snap-type: x proximity; }
.carousel-track.is-centered { justify-content: flex-start; }
.testimonial-card {
  flex: 0 0 calc((100% - 3 * 1.25rem) / 4); scroll-snap-align: start; gap: 1rem;
  padding: 1.6rem 1.5rem 1.4rem; background: #fff; border: 1px solid rgba(22, 36, 29, 0.09); border-radius: 18px;
  box-shadow: 0 2px 6px rgba(22, 36, 29, 0.04), 0 10px 26px rgba(22, 36, 29, 0.06);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(22, 36, 29, 0.06), 0 16px 34px rgba(22, 36, 29, 0.10); }
.testimonial-card .stars { font-size: 0.95rem; letter-spacing: 0.12em; }
.testimonial-card .stars::after { color: var(--gold); }
.testimonial-text { font-size: 1.05rem; line-height: 1.6; -webkit-line-clamp: 4; }
.testimonial-author { gap: 0.85rem; padding-top: 0.25rem; }
.testimonial-author .review-avatar { width: 3.1rem; height: 3.1rem; font-size: 1.15rem; background: var(--forest-deep); color: #fff; }
.testimonial-author strong { font-size: 1.05rem; font-weight: 800; }
.testimonial-author small { font-size: 0.9rem; color: var(--ink-soft); }
.testimonials-cta { margin-top: 1.25rem; }
.testimonials-cta .btn {
  background: #fff; color: var(--ink); border: 1.5px solid rgba(22, 36, 29, 0.18); border-radius: 14px;
  padding: 1rem 2.6rem; font-size: 1.1rem; font-weight: 800; box-shadow: 0 2px 8px rgba(22, 36, 29, 0.05);
}
.testimonials-cta .btn:hover { border-color: var(--forest); color: var(--forest); background: #fff; }
@media (max-width: 1100px) { .testimonial-card { flex-basis: calc((100% - 2 * 1.25rem) / 3); } }
@media (max-width: 820px)  { .testimonial-card { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (max-width: 640px)  { .testimonial-card { flex-basis: 84%; padding: 1.3rem 1.2rem; } .testimonials-head { text-align: left; } }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  width: 4rem; height: 4rem; bottom: 1.75rem; right: 1.75rem; background: var(--whatsapp); color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 3px 8px rgba(0, 0, 0, 0.18);
}
.wa-float svg { width: 34px; height: 34px; position: relative; z-index: 1; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--whatsapp); opacity: 0.55;
  animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wa-float::before { animation: none; display: none; } }
@media (max-width: 768px) {
  .wa-float { width: 3.5rem; height: 3.5rem; right: 1rem; bottom: calc(var(--tab-h) + 0.9rem + env(safe-area-inset-bottom, 0px)); }
  .wa-float svg { width: 30px; height: 30px; }
}

/* Carousel: no edge fade over the first card; arrows sit half outside the cards */
.carousel-track, .carousel-track.is-centered { -webkit-mask-image: none; mask-image: none; }
.carousel-prev { left: -1.2rem; }
.carousel-next { right: -1.2rem; }
@media (max-width: 1280px) { .carousel-prev { left: -0.4rem; } .carousel-next { right: -0.4rem; } }


/* ============================================================
   Chat widget (opens from the floating WhatsApp button)
   ============================================================ */
.wa-float .wa-close-icon { display: none; width: 28px; height: 28px; position: relative; z-index: 1; }
.wa-float.is-open .wa-close-icon { display: block; }
.wa-float.is-open > svg:not(.wa-close-icon) { display: none; }
.wa-float.is-open::before { display: none; }

.chat-panel {
  position: fixed; z-index: 160; right: 1.75rem; bottom: 6.6rem; width: min(23.5rem, calc(100vw - 2rem));
  display: flex; flex-direction: column; max-height: min(38rem, calc(100vh - 8.5rem));
  background: #fff; border-radius: 22px; overflow: hidden; font-family: var(--font-body);
  box-shadow: 0 24px 60px rgba(11, 40, 30, 0.28), 0 4px 14px rgba(11, 40, 30, 0.12);
  animation: chatIn 0.22s var(--ease);
}
.chat-panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.1rem; background: var(--forest-deep); color: #fff; flex-shrink: 0; }
.chat-avatar { position: relative; flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--forest); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.02em; }
.chat-avatar-lg { width: 3rem; height: 3rem; background: rgba(255, 255, 255, 0.18); }
.chat-dot { position: absolute; right: 0; bottom: 0; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #3DDC84; border: 2px solid var(--forest-deep); }
.chat-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.chat-title strong { font-size: 1.02rem; }
.chat-title span { font-size: 0.85rem; opacity: 0.9; display: inline-flex; align-items: center; gap: 0.4rem; }
.chat-dot-inline { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #3DDC84; display: inline-block; }
.chat-close { margin-left: auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-close:hover { background: rgba(255, 255, 255, 0.26); }
.chat-close svg { width: 18px; height: 18px; }
.chat-body { flex: 1 1 auto; overflow-y: auto; padding: 1.1rem 1rem 0.9rem; background: #EEF2F0; display: grid; gap: 0.9rem; align-content: start; }
.chat-row { display: flex; gap: 0.7rem; align-items: flex-start; }
.chat-bubble { background: #fff; border-radius: 6px 18px 18px 18px; padding: 0.9rem 1rem 0.6rem; box-shadow: 0 2px 8px rgba(22, 36, 29, 0.07); min-width: 0; }
.chat-bubble p { margin: 0 0 0.45rem; font-size: 1rem; line-height: 1.5; color: var(--ink); }
.chat-bubble time { display: block; text-align: right; font-size: 0.75rem; color: #9AA5A0; }
.chat-quick { display: grid; gap: 0.6rem; padding-left: 3.3rem; }
.chat-chip {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 2px solid rgba(15, 92, 70, 0.16); color: var(--forest-deep); border-radius: 999px;
  padding: 0.7rem 1rem; font: inherit; font-weight: 800; font-size: 0.98rem;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}
.chat-chip:hover, .chat-chip:focus-visible { border-color: var(--forest); background: var(--forest-tint); transform: translateX(2px); }
.chat-form { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.75rem 0.9rem 0.3rem; background: #fff; flex-shrink: 0; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 0.8rem 1.1rem; border: 0; border-radius: 999px; background: #EEF2F0; color: var(--ink); }
.chat-form input:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }
.chat-send { flex: 0 0 auto; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 0; background: var(--forest-deep); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-send:hover { background: var(--forest); }
.chat-send svg { width: 20px; height: 20px; }
.chat-foot { margin: 0; padding: 0.35rem 1rem 0.85rem; background: #fff; text-align: center; font-size: 0.82rem; color: #8A9690; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 0.35rem; }
.chat-foot svg { width: 14px; height: 14px; color: var(--whatsapp); }
@media (max-width: 768px) {
  .chat-panel { right: 0.75rem; left: 0.75rem; width: auto; bottom: calc(var(--tab-h) + 0.9rem + 3.5rem + 0.7rem + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - var(--tab-h) - 8rem); }
}
@media (prefers-reduced-motion: reduce) { .chat-panel { animation: none; } .chat-chip { transition: none; } }


/* Review form: note under the WhatsApp button */
.review-note { margin: -0.2rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.review-form .btn-whatsapp { display: inline-flex; align-items: center; gap: 0.5rem; }


/* Share row: real brand icons, brand colour on hover, wraps on small screens */
.share-row { flex-wrap: wrap; gap: 0.6rem; }
.share-row > span:first-child { margin-right: 0.35rem; }
.share-row .icon-btn { width: 2.25rem; height: 2.25rem; transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease); }
.share-row .icon-btn svg { width: 16px; height: 16px; }
.share-whatsapp { --brand: #25D366; } .share-facebook { --brand: #1877F2; } .share-x { --brand: #000000; }
.share-email { --brand: var(--forest); }
.share-row .share-btn[data-share]:hover, .share-row .share-btn[data-share]:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; }
.share-row [data-copy-link]:hover { background: var(--forest); border-color: var(--forest); color: #fff; }
.share-row .copy-feedback { font-size: 0.85rem; }
@media (max-width: 480px) { .share-row > span:first-child { flex: 1 0 100%; margin: 0; } }


/* ============================================================
   Photo banner: full-width photo background, dark overlay,
   centred gold kicker, big white heading, text and a button.
   Set the picture per banner with style="background-image:url('...')" in the HTML.
   ============================================================ */
.photo-banner {
  position: relative; isolation: isolate; display: grid; place-items: center; text-align: center; color: #fff;
  min-height: clamp(22rem, 44vw, 31rem); padding: clamp(3rem, 7vw, 5rem) 1.25rem;
  background: #0B2F24 center / cover no-repeat; overflow: hidden;
}
.photo-banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6, 22, 17, 0.78) 0%, rgba(6, 22, 17, 0.55) 50%, rgba(6, 22, 17, 0.7) 100%);
}
.photo-banner-inner { width: 100%; max-width: 54rem; margin-inline: auto; }
.photo-banner-kicker { display: block; margin-bottom: 0.75rem; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); font-weight: 700; color: #E2A93F; letter-spacing: 0.01em; }
.photo-banner h1, .photo-banner h2 { color: #fff; margin: 0 0 1rem; font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); line-height: 1.12; letter-spacing: -0.01em; }
.photo-banner p { max-width: 42rem; margin: 0 auto 1.75rem; color: rgba(255, 255, 255, 0.86); font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.6; opacity: 1; }
.photo-banner-btn { padding: 1rem 2.2rem; font-size: 1.05rem; font-weight: 800; border-radius: 12px; }
.photo-banner .btn-gold { background: #E2B04A; color: #1A1408; }
.photo-banner .btn-gold:hover { background: #F0C265; }
.photo-banner .deal-stats { justify-content: center; margin-top: 1.75rem; flex-wrap: wrap; }
.photo-banner .deal-stats li { backdrop-filter: blur(4px); }
@media (max-width: 640px) {
  .photo-banner { min-height: 20rem; }
  .photo-banner-btn { width: 100%; max-width: 22rem; }
}


/* ---------- Product photos & logo image (added with the media update) ---------- */
/* A photo sits on top of the line-art icon; if the file is missing the <img> removes itself and the icon shows. */
.pplaceholder { overflow: hidden; }
.pplaceholder .pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.5s ease; }
.pplaceholder .pimg.is-loaded { opacity: 1; }
.thumb-row .pplaceholder .pimg { object-fit: cover; }

/* Real logo (assets/images/logo.png) replaces the "EJ" circle when the file exists */
.logo .mark.has-logo, .footer-brand .logo .mark.has-logo { background: transparent; border-radius: 0; font-size: 0; width: 2.4rem; height: 2.4rem; }
.logo .mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Footer contact: icon rows (WhatsApp / call / email / Facebook / location) */
.footer-col .fc-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.7rem; }
.footer-col .fc-country { font-size: var(--step-1); font-weight: 600; min-width: 4.4rem; opacity: 0.9; }
.footer-col .fc-num { font-size: var(--step-1); opacity: 0.75; white-space: nowrap; }
.footer-col .fc-icons { display: inline-flex; gap: 0.4rem; }
.footer-col a.fc-ico { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255,255,255,0.12); opacity: 1; transition: background 0.15s ease, color 0.15s ease; }
.footer-col a.fc-ico svg { width: 16px; height: 16px; }
.footer-col a.fc-ico:hover { background: var(--gold-tint, rgba(255,255,255,0.25)); color: #16241d; }
.footer-col a.fc-wa:hover { background: #25D366; color: #fff; }
.footer-col .fc-row a, .footer-col .fc-row p.plain { display: flex; align-items: flex-start; gap: 0.6rem; }
.footer-col .fc-row svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.15em; }

/* Category tiles show the product photo (with the icon as fallback) */
.cat-icon, .cat-thumb { overflow: hidden; }
.cat-icon .pplaceholder, .cat-thumb .pplaceholder { width: 100%; height: 100%; }
.cat-icon .pplaceholder svg, .cat-thumb .pplaceholder svg { width: 58%; height: 58%; }
