/* =====================================================================
   Better in Bed Guide — warm editorial redesign (v3)
   Restyles the existing .publisher-* markup: cream/berry/coral palette,
   Fraunces + Hanken Grotesk, wide image-forward layout. Honest framing kept.
   Loaded AFTER the child style so it wins.
   ===================================================================== */
:root{
  --cream:#FFF2E9; --peach:#FFE0CF; --paper:#FFF8F2;
  --berry:#5E1733; --berry-deep:#3C0E22; --plum:#7C1E45;
  --coral:#EE5340; --coral-deep:#D63E2C; --pink:#FF6F8B; --gold:#F4B14A;
  --ink:#2A1620; --muted:#8A6B72; --line:rgba(94,23,51,.12);
  --serif:'Fraunces',Georgia,serif; --sans:'Hanken Grotesk',system-ui,sans-serif;
  --wrap:1170px; --radius:20px;
}
body{ background:var(--cream); color:var(--ink); font-family:var(--sans);
  font-size:17px; line-height:1.6; -webkit-font-smoothing:antialiased; }
a{ color:inherit; }
h1,h2,h3,h4,h5{ font-family:var(--serif); font-weight:600; line-height:1.06;
  letter-spacing:-.02em; color:var(--berry); }
.it,em.accent{ font-style:italic; color:var(--coral); }

/* full-width wrapper; prose reads in a centered column */
.publisher-content-wrapper{ max-width:var(--wrap); margin:0 auto; background:transparent;
  box-shadow:none; padding:0 28px; }

/* ---------- header ---------- */
.publisher-header{ position:sticky; top:0; z-index:40; max-width:none; margin:0;
  background:rgba(255,242,233,.9); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.publisher-header-inner{ max-width:var(--wrap); margin:0 auto; padding:16px 28px;
  display:flex; align-items:center; justify-content:space-between; gap:24px; }
.publisher-logo-text, .publisher-logo{ font-family:var(--serif); font-weight:700;
  font-size:21px; color:var(--berry); letter-spacing:-.02em; }
.publisher-main-nav{ display:flex; align-items:center; gap:22px; }
.publisher-nav-primary{ display:flex; align-items:center; list-style:none; margin:0; padding:0;
  gap:28px; font-family:var(--sans); font-size:15px; font-weight:600; }
.publisher-nav-primary li{ list-style:none; position:relative; }
/* dropdown / megamenu: hidden until hover, never inline-open */
.publisher-megamenu{ display:none; position:absolute; top:calc(100% + 8px); left:0; min-width:540px;
  padding:18px; border-radius:16px; background:#fff; border:1px solid var(--line);
  box-shadow:0 24px 48px -24px rgba(60,14,34,.5); z-index:60; }
.has-megamenu:hover > .publisher-megamenu, .has-megamenu:focus-within > .publisher-megamenu{ display:block; }
.publisher-megamenu-inner{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.publisher-megamenu-col ul{ list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.publisher-megamenu-col a{ font-size:14px; color:var(--ink); }
.publisher-megamenu-col a:hover{ color:var(--coral); }
.publisher-megamenu-cta{ grid-column:1/-1; margin-top:8px; }
.publisher-chevron{ margin-left:4px; }
.publisher-nav-primary > li > a{ color:var(--ink); padding:4px 0; border:0; }
.publisher-nav-primary > li > a:hover,
.publisher-nav-primary > li.current-menu-item > a{ color:var(--coral); }
.publisher-megamenu{ background:#fff; border:1px solid var(--line); border-radius:16px;
  box-shadow:0 24px 48px -24px rgba(60,14,34,.5); }
.publisher-search-toggle{ width:38px; height:38px; border-radius:50%;
  border:1.5px solid rgba(94,23,51,.2); color:var(--berry); }
.publisher-search-toggle:hover{ border-color:var(--coral); color:var(--coral); }
.publisher-menu-toggle span{ background:var(--berry); }

/* ---------- buttons / CTAs ---------- */
.publisher-cta, .publisher-cta--buy, .publisher-cta--arrow, .publisher-btn--primary{
  display:inline-flex; align-items:center; gap:9px; font-family:var(--sans); font-weight:700;
  font-size:15.5px; padding:13px 24px; border-radius:40px; background:var(--coral); color:#fff;
  border:2px solid transparent; box-shadow:0 8px 22px -8px rgba(238,83,64,.6); transition:.18s; }
.publisher-cta:hover, .publisher-btn--primary:hover{ background:var(--coral-deep); transform:translateY(-1px); }
.publisher-cta-ghost, .publisher-btn--ghost{ display:inline-flex; align-items:center; gap:9px;
  font-weight:700; padding:13px 22px; border-radius:40px; background:transparent;
  color:var(--berry); border:2px solid rgba(94,23,51,.28); }
.publisher-cta-ghost:hover{ border-color:var(--berry); }

/* ---------- home hero ---------- */
.publisher-home-hero{ padding:64px 0 48px; }
.publisher-home-eyebrow, .eyebrow{ font-family:var(--sans); font-size:12.5px; font-weight:800;
  letter-spacing:.16em; text-transform:uppercase; color:var(--coral); display:block; margin-bottom:14px; }
.publisher-home-hero h1{ font-size:clamp(2.8rem,6.5vw,4.8rem); color:var(--berry); margin:0 0 20px; }
.publisher-home-hero h1 em{ font-style:italic; color:var(--coral); }
.publisher-home-intro{ font-size:20px; color:var(--ink); max-width:34em; margin-bottom:26px; }
.publisher-hero-cta{ display:flex; gap:13px; flex-wrap:wrap; }

/* ---------- section headers ---------- */
.publisher-home-section, .publisher-method-block, .publisher-home-faq, .publisher-archive{ padding:46px 0; }
.publisher-section-title, .publisher-home-section > h2, .publisher-method-block h2{
  font-size:clamp(2rem,4vw,2.8rem); color:var(--berry); margin:0 0 30px; }

/* ---------- card grid → warm image-forward cards ---------- */
.publisher-card-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; padding:0; }
.publisher-card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; transition:.2s; }
.publisher-card:hover{ transform:translateY(-5px); box-shadow:0 22px 44px -22px rgba(60,14,34,.5); }
.publisher-card-link{ display:flex; flex-direction:column; gap:0; padding:0; color:inherit; text-decoration:none; }
.publisher-card-img{ width:100%; height:auto; aspect-ratio:4/3; min-width:0; border-radius:0;
  background-size:cover; background-position:center; position:relative; }
.publisher-card-img--ph{ background:linear-gradient(135deg,var(--coral),var(--berry)); }
.publisher-card-body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; }
.publisher-card-badge{ font-family:var(--sans); font-size:11px; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:#fff; background:var(--coral); border-radius:30px;
  padding:5px 11px; align-self:flex-start; }
.publisher-card-body h3{ font-family:var(--serif); font-weight:600; font-size:18px; line-height:1.15;
  color:var(--berry); margin:2px 0; }
.publisher-card-body p{ font-size:13.5px; color:var(--muted); line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.publisher-card-buy{ padding:0 18px 18px; }
.publisher-card-buy .publisher-cta{ display:flex; justify-content:center; width:100%;
  font-size:14px; padding:11px; }

/* category grid → bold warm tiles (name + count). Matches publisher_render_category_grid markup. */
.publisher-cat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.publisher-cat-tile{ display:flex; flex-direction:column; gap:6px; justify-content:center;
  min-height:104px; padding:22px 20px; border-radius:18px; color:#fff; transition:.2s;
  background:linear-gradient(135deg,var(--plum),var(--berry-deep)); }
.publisher-cat-tile:nth-child(3n+1){ background:linear-gradient(135deg,var(--coral),var(--coral-deep)); }
.publisher-cat-tile:nth-child(3n+2){ background:linear-gradient(135deg,var(--berry),var(--plum)); }
.publisher-cat-tile:hover{ transform:translateY(-4px); box-shadow:0 18px 36px -18px rgba(60,14,34,.6); }
.publisher-cat-name{ font-family:var(--serif); font-weight:700; font-size:19px; color:#fff; line-height:1.1; }
.publisher-cat-count{ font-size:12.5px; color:rgba(255,255,255,.82); letter-spacing:.04em; }
@media(max-width:980px){ .publisher-cat-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:560px){ .publisher-cat-grid{ grid-template-columns:1fr; } }

/* ---------- single: title, byline, meta ---------- */
.publisher-content-wrapper > article, .publisher-single, .entry-header{ max-width:760px; margin:0 auto; }
.publisher-title-accent, .publisher-archive-header h1, .entry-title{ font-family:var(--serif);
  font-weight:700; font-size:clamp(2.2rem,4.5vw,3.2rem); color:var(--berry); padding:36px 0 6px; }
.publisher-badge{ display:inline-block; font-family:var(--sans); font-size:11px; font-weight:800;
  letter-spacing:.1em; text-transform:uppercase; color:#fff; background:var(--coral);
  border-radius:30px; padding:5px 12px; margin:18px 0 0; }
.publisher-meta-row{ font-family:var(--sans); font-size:13.5px; color:var(--muted);
  padding:14px 0 0; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.publisher-meta-row strong, .publisher-author-mini__name{ color:var(--berry); }
.publisher-meta-dot{ width:3px; height:3px; border-radius:50%; background:var(--muted); display:inline-block; }

/* ---------- prose (readable column) ---------- */
.publisher-test-content, .entry-content, .publisher-prose, .publisher-article-content{
  max-width:720px; margin:0 auto; padding:4px 0; }
.entry-content h2, .publisher-test-content h2, .publisher-article-content h2{
  font-family:var(--serif); font-weight:600; font-size:1.8rem; color:var(--berry); margin:34px 0 12px; }
.entry-content h3, .publisher-test-content h3{ font-family:var(--serif); font-weight:600;
  font-size:1.35rem; color:var(--berry); margin:24px 0 8px; }
.entry-content p, .publisher-test-content p{ margin:0 0 16px; font-size:17.5px; }
.entry-content a, .publisher-test-content a{ color:var(--coral); text-decoration:underline; text-underline-offset:2px; }
.publisher-hero-image, .publisher-body-img{ max-width:760px; margin:22px auto; }
.publisher-hero-image img, .publisher-body-img img{ width:100%; border-radius:var(--radius); }

/* ---------- author byline + bio box ---------- */
.publisher-author-mini__avatar, .publisher-author-bio__avatar{ background:var(--coral); color:#fff;
  font-family:var(--serif); font-weight:700; }
.publisher-author-bio{ max-width:760px; margin:32px auto; background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); padding:22px 24px; }
.publisher-author-bio h2{ font-size:1.1rem; }
.publisher-author-name{ color:var(--berry); }

/* ---------- verdict + score (warm) ---------- */
.publisher-verdict, .publisher-price-block{ max-width:760px; margin:22px auto; background:#fff;
  border:1px solid var(--line); border-radius:var(--radius); padding:22px; }
.gauge i{ height:22px; border-radius:3px; background:var(--peach); }
.gauge i.f{ background:var(--coral); } .gauge i.h{ background:linear-gradient(90deg,var(--coral) 50%,var(--peach) 50%); }
.publisher-verdict-scorenum{ font-family:var(--serif); font-weight:700; color:var(--coral); }
.publisher-verdict p, .publisher-verdict .takeaway{ font-family:var(--serif); font-style:italic;
  color:var(--berry); border-left:2px solid var(--coral); padding-left:12px; }
.publisher-verdict__best-not{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; }
.publisher-verdict__best-not > div{ background:var(--cream); border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; }
.publisher-verdict__label{ font-family:var(--sans); font-size:10px; font-weight:800;
  letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.publisher-price-headline .price, .publisher-offer-price{ font-family:var(--serif); font-weight:700; color:var(--berry); }

/* ---------- method / trust band ---------- */
.publisher-method-block{ background:var(--berry); color:#FCE3DA; border-radius:var(--radius);
  padding:56px 40px; margin:46px 0; }
.publisher-method-block h2, .publisher-method-block .publisher-home-eyebrow{ color:#fff; }
.publisher-method-block .publisher-home-eyebrow{ color:var(--pink); }
.publisher-method-steps{ counter-reset:s; list-style:none; padding:0; display:grid; gap:14px; max-width:720px; }
.publisher-method-steps li{ padding-left:42px; position:relative; color:#F2C9BE; }
.publisher-method-steps li::before{ counter-increment:s; content:counter(s,decimal-leading-zero);
  position:absolute; left:0; font-family:var(--serif); color:var(--coral); font-weight:700; }
.publisher-trust-strip{ display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.publisher-trust-strip li, .publisher-trust-strip span{ font-size:13.5px; color:var(--muted); }

/* ---------- FAQ ---------- */
.publisher-home-faq details{ border-bottom:1px solid var(--line); padding:16px 0; }
.publisher-home-faq summary{ font-family:var(--serif); font-weight:600; font-size:1.1rem; color:var(--berry); cursor:pointer; }

/* ---------- newsletter ---------- */
.publisher-home-newsletter{ background:linear-gradient(120deg,var(--coral),var(--pink));
  border-radius:26px; padding:52px 44px; text-align:center; color:#fff; max-width:720px; margin:46px auto; }
.publisher-home-newsletter h2{ color:#fff; }
.publisher-home-newsletter p{ color:rgba(255,255,255,.92); }

/* ---------- footer ---------- */
.publisher-footer{ background:var(--berry-deep); color:#C99FA8; margin-top:40px; }
.publisher-footer a{ color:#C99FA8; } .publisher-footer a:hover{ color:#fff; }
.publisher-footer h3, .publisher-footer h5{ color:var(--coral); }
.publisher-footer .publisher-logo-text{ color:#fff; }

/* ---------- logo image sizing (custom logo) ---------- */
.publisher-logo img{ max-height:46px; width:auto; height:auto; display:inline-block; }
.publisher-footer-logo img{ max-height:60px; width:auto; }

/* ---------- "Article on its way" / read-on ---------- */
.publisher-read-on{ max-width:720px; margin:14px auto; font-style:italic; color:var(--muted); }
.publisher-404{ text-align:center; padding:80px 0; }
.publisher-404__title{ font-size:clamp(2.2rem,5vw,3.4rem); }

/* ---------- responsive ---------- */
@media(max-width:980px){ .publisher-card-grid{ grid-template-columns:repeat(2,1fr); }
  .publisher-category-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:560px){ .publisher-card-grid,.publisher-category-grid{ grid-template-columns:1fr; }
  .publisher-content-wrapper,.publisher-header-inner{ padding-left:20px; padding-right:20px; }
  .publisher-method-block,.publisher-home-newsletter{ padding:36px 24px; } }
@media(prefers-reduced-motion:reduce){ *{ transition:none!important; } }

/* ============================================================
   PRODUCT GALLERY — thumbnail rail + main image + lightbox
   Markup from publisher_render_gallery(): .publisher-gallery >
   .publisher-gallery-main (img[data-publisher-gallery-main]) +
   .publisher-gallery-thumbs (img.publisher-gallery-thumb[.is-active])
   ============================================================ */
.publisher-gallery{ display:flex; flex-direction:row-reverse; gap:16px; align-items:flex-start; margin:0 0 28px; }
.publisher-gallery-main{
  flex:1 1 auto; min-width:0; position:relative; background:var(--paper);
  border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
  aspect-ratio:1/1; display:flex; align-items:center; justify-content:center;
}
.publisher-gallery-main-img{ width:100%; height:100%; object-fit:contain; display:block; cursor:zoom-in; transition:opacity .18s ease; }
.publisher-gallery-caption{
  position:absolute; left:0; right:0; bottom:0; padding:10px 14px;
  background:linear-gradient(transparent, rgba(42,22,32,.72)); color:#fff; font:500 13px/1.4 var(--sans);
}
.publisher-gallery-thumbs{ flex:0 0 84px; display:flex; flex-direction:column; gap:10px; max-height:520px; overflow-y:auto; padding:2px; }
.publisher-gallery-thumb{
  width:84px; height:84px; object-fit:cover; cursor:pointer; display:block;
  border:2px solid var(--line); border-radius:12px; background:var(--paper);
  opacity:.72; transition:opacity .15s ease, border-color .15s ease, transform .15s ease;
}
.publisher-gallery-thumb:hover{ opacity:1; transform:translateY(-1px); }
.publisher-gallery-thumb.is-active{ opacity:1; border-color:var(--coral); }
.publisher-lightbox{
  position:fixed; inset:0; z-index:9999; display:none; background:rgba(42,22,32,.92);
  align-items:center; justify-content:center; padding:32px; cursor:zoom-out;
}
.publisher-lightbox.is-open{ display:flex; }
.publisher-lightbox img{ max-width:92vw; max-height:90vh; object-fit:contain; border-radius:8px; }
.publisher-lightbox-close{
  position:absolute; top:18px; right:24px; width:44px; height:44px; border:none;
  background:rgba(255,255,255,.12); color:#fff; font-size:26px; line-height:1; border-radius:50%; cursor:pointer;
}
.publisher-lightbox-close:hover{ background:rgba(255,255,255,.24); }
@media(max-width:760px){
  .publisher-gallery{ flex-direction:column; }
  .publisher-gallery-thumbs{ flex-direction:row; flex:0 0 auto; max-height:none; width:100%; overflow-x:auto; overflow-y:hidden; }
  .publisher-gallery-thumb{ width:64px; height:64px; flex:0 0 auto; }
}

/* ============================================================
   RELATED — slideable card carousel (image + badge + title + teaser)
   ============================================================ */
.publisher-related-box{ margin:40px 0; }
.publisher-related-h{ font:600 22px/1.2 var(--serif); color:var(--berry); margin:0 0 16px; }
.publisher-related-carousel{ position:relative; }
.publisher-related-track{
  display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory;
  scroll-behavior:smooth; padding:4px 2px 12px; -webkit-overflow-scrolling:touch;
}
.publisher-related-track::-webkit-scrollbar{ height:6px; }
.publisher-related-track::-webkit-scrollbar-thumb{ background:var(--line); border-radius:3px; }
.publisher-related-card{
  flex:0 0 230px; scroll-snap-align:start; display:flex; flex-direction:column;
  background:var(--paper); border:1px solid var(--line); border-radius:16px;
  overflow:hidden; text-decoration:none; transition:transform .15s ease, box-shadow .15s ease;
}
.publisher-related-card:hover{ transform:translateY(-3px); box-shadow:0 8px 24px rgba(94,23,51,.12); }
.publisher-related-img{ display:block; width:100%; height:140px; background:var(--peach) center/cover no-repeat; }
.publisher-related-img--ph{ background:linear-gradient(135deg,var(--peach),var(--cream)); }
.publisher-related-body{ display:flex; flex-direction:column; gap:6px; padding:12px 14px 16px; }
.publisher-related-badge{
  align-self:flex-start; font:600 10px/1 var(--sans); letter-spacing:.06em; text-transform:uppercase;
  color:#fff; background:var(--coral); padding:4px 8px; border-radius:999px;
}
.publisher-related-title{ font:600 15px/1.3 var(--serif); color:var(--ink); }
.publisher-related-teaser{ font:400 13px/1.45 var(--sans); color:var(--muted); }
.publisher-carousel-nav{
  position:absolute; top:calc(50% - 18px); transform:translateY(-50%); z-index:2;
  width:40px; height:40px; border:1px solid var(--line); border-radius:50%; cursor:pointer;
  background:#fff; color:var(--berry); font-size:24px; line-height:1; display:none;
  box-shadow:0 2px 10px rgba(94,23,51,.15);
}
.publisher-carousel-prev{ left:-8px; }
.publisher-carousel-next{ right:-8px; }
.publisher-related-carousel.is-scrollable .publisher-carousel-nav{ display:block; }
@media(max-width:560px){ .publisher-related-card{ flex-basis:75vw; } .publisher-carousel-nav{ display:none!important; } }

/* ============================================================
   COMPACT FOOTER — one slim row, no mega-columns / less scroll
   ============================================================ */
.publisher-footer--compact{ background:var(--berry); color:#fff; padding:26px 0; margin-top:48px; }
.publisher-footer--compact .publisher-footer-inner{ max-width:var(--wrap); margin:0 auto; padding:0 24px; }
.publisher-footer-row{ display:flex; flex-wrap:wrap; align-items:center; gap:14px 28px; justify-content:space-between; }
.publisher-footer-brand{ display:flex; flex-direction:column; gap:2px; }
.publisher-footer--compact .publisher-footer-logo{ font:700 20px var(--serif); color:#fff; text-decoration:none; }
.publisher-footer--compact .publisher-footer-tagline{ font:400 13px var(--sans); color:rgba(255,255,255,.7); }
.publisher-footer-nav{ display:flex; gap:20px; flex-wrap:wrap; }
.publisher-footer-nav a{ color:#fff; text-decoration:none; font:500 14px var(--sans); opacity:.9; }
.publisher-footer-nav a:hover{ opacity:1; text-decoration:underline; }
.publisher-footer--compact .publisher-trust-badges{ display:flex; gap:16px; list-style:none; margin:0; padding:0; flex-wrap:wrap; }
.publisher-footer--compact .publisher-trust-badges li{ font:500 12px var(--sans); color:rgba(255,255,255,.78); }
.publisher-footer--compact .publisher-trust-badges li::before{ content:"\2713 "; color:var(--gold); }
.publisher-footer--compact .publisher-affiliate-disclosure{ font:400 12px/1.5 var(--sans); color:rgba(255,255,255,.6); margin:14px 0 0; max-width:780px; }
.publisher-footer-bottom{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.15); font:400 13px var(--sans); color:rgba(255,255,255,.7); }
.publisher-footer-bottom .publisher-footer-menu{ display:flex; gap:16px; list-style:none; margin:0; padding:0; }
.publisher-footer-bottom a{ color:rgba(255,255,255,.8); text-decoration:none; }
.publisher-footer-bottom a:hover{ color:#fff; text-decoration:underline; }
.publisher-footer--compact .publisher-social{ display:flex; gap:12px; list-style:none; margin:0 0 0 auto; padding:0; }
@media(max-width:640px){ .publisher-footer-row{ flex-direction:column; align-items:flex-start; } }
