/*
 * Widgets.HomepageLayout - homepage sections on top of the Emporium theme (homepage only).
 * Colours/fonts come from Widgets.BrandStyling's tokens (--lwh-*), with fallbacks so this file
 * also works on its own.
 *
 *   1. Shared: buttons, section headings, stars
 *   2. Hero over the slider
 *   3. Tea of the month
 *   4. Reviews strip
 *   5. Story (the SEO text HTML widget, restyled)
 *   6. Tea guides
 */

/* ---------- 1. Shared ---------- */
.lwh-home-section,
.home-page .lwh-home-story {
  margin: 0 0 60px;
}

.lwh-btn {
  display: inline-block;
  padding: 12px 26px;
  border: 2px solid var(--lwh-olive, #4a5d23);
  border-radius: 3px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.lwh-btn-primary {
  background: var(--lwh-olive, #4a5d23);
  color: #fff;
}
.lwh-btn-primary:hover,
.lwh-btn-primary:focus {
  background: var(--lwh-olive-dark, #3a4a1b);
  border-color: var(--lwh-olive-dark, #3a4a1b);
  color: #fff;
}
.lwh-btn-outline {
  background: transparent;
  color: var(--lwh-olive, #4a5d23);
}
.lwh-btn-outline:hover,
.lwh-btn-outline:focus {
  background: var(--lwh-olive, #4a5d23);
  color: #fff;
}
.lwh-btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--lwh-olive-dark, #3a4a1b);
}
.lwh-btn-light:hover,
.lwh-btn-light:focus {
  background: var(--lwh-cream, #faf6ee);
  border-color: var(--lwh-cream, #faf6ee);
  color: var(--lwh-olive-dark, #3a4a1b);
}
.lwh-btn:focus-visible {
  outline: 3px solid var(--lwh-gold, #b8893b);
  outline-offset: 2px;
}

.lwh-home-section {
  text-align: left; /* the theme centres text inherited from its containers */
}

/* Centred like the theme's carousel titles, with the extra line (average / view all) underneath. */
.lwh-section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  text-align: center;
}
.lwh-section-title {
  margin: 0;
  font-family: var(--lwh-serif, Georgia, serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--lwh-ink, #2b2b2b);
}
.lwh-view-all {
  color: var(--lwh-olive, #4a5d23);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lwh-view-all::after {
  content: " \00BB";
}
.lwh-view-all:hover,
.lwh-view-all:focus {
  text-decoration: underline;
}
.lwh-eyebrow {
  margin: 0 0 6px;
  color: var(--lwh-gold-text, #8a6a2b);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lwh-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lwh-muted, #666);
  font-size: 14px;
}
.lwh-home-section .product-review-box .rating {
  margin: 0;
}

/* ---------- 2. Hero ---------- */
.slider-wrapper.lwh-has-hero {
  position: relative;
}
.lwh-hero {
  color: #fff;
}
.lwh-hero-inner {
  max-width: 620px;
}
.lwh-hero-title {
  margin: 0 0 12px;
  font-family: var(--lwh-serif, Georgia, serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}
.lwh-hero-sub {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.5;
}
.lwh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Phones (and no slider at all): a solid olive band under the video, so the text never fights the footage. */
.lwh-hero,
.lwh-hero.lwh-hero-standalone {
  padding: 28px 20px;
  background: var(--lwh-olive-dark, #3a4a1b);
}
.lwh-hero.lwh-hero-standalone {
  margin: 0 0 30px;
}

@media (min-width: 769px) {
  /* Over the video: left-aligned text on a dark gradient (white text stays ≥ 4.5:1 on the darkest half). */
  .lwh-has-hero .lwh-hero {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 40px 6%;
    background: linear-gradient(90deg, rgba(25, 30, 12, .78) 0%, rgba(25, 30, 12, .55) 45%, rgba(25, 30, 12, 0) 75%);
    pointer-events: none; /* keep the slider's arrows usable */
  }
  .lwh-has-hero .lwh-hero-inner {
    pointer-events: auto;
  }
  .lwh-has-hero .lwh-hero-title,
  .lwh-has-hero .lwh-hero-sub {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  }
  .lwh-hero-title {
    font-size: 40px;
  }
  .lwh-hero-sub {
    font-size: 18px;
  }
}
@media (min-width: 1281px) {
  .lwh-hero-title {
    font-size: 48px;
  }
}

/* ---------- 3. Tea of the month ---------- */
.lwh-totm {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--lwh-line, #e7ddc8);
  border-radius: 4px;
  background: var(--lwh-cream, #faf6ee);
  scroll-margin-top: 90px;
}
.lwh-totm-media {
  display: block;
  background: #fff;
}
.lwh-totm-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
}
.lwh-totm-body {
  padding: 28px 24px;
  align-self: center;
  text-align: center;
}
.lwh-totm .lwh-rating,
.lwh-totm-actions {
  justify-content: center;
}
.lwh-totm-name {
  margin: 0 0 10px;
  font-family: var(--lwh-serif, Georgia, serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
}
.lwh-totm-name a {
  color: var(--lwh-ink, #2b2b2b);
}
.lwh-totm-name a:hover {
  color: var(--lwh-olive, #4a5d23);
}
.lwh-totm .lwh-rating {
  margin: 0 0 14px;
}
.lwh-totm-intro {
  margin: 0 0 16px;
  color: var(--lwh-text, #474747);
  font-size: 16px;
  line-height: 1.6;
}
.lwh-totm-intro p {
  margin: 0 0 8px;
}
.lwh-totm-price {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
}
.lwh-totm-price .actual-price {
  color: var(--lwh-price, #33421e);
}
.lwh-totm-price .old-price {
  margin-right: 8px;
  color: var(--lwh-muted, #666);
  font-size: 16px;
  font-weight: 400;
  text-decoration: line-through;
}
.lwh-totm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 769px) {
  .lwh-totm {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
  /* The photo fills the text column's height instead of setting it. */
  .lwh-totm-media {
    position: relative;
    min-height: 320px;
  }
  .lwh-totm-media img {
    position: absolute;
    inset: 0;
    max-height: none;
  }
  .lwh-totm-body {
    padding: 40px 48px;
    text-align: left;
  }
  .lwh-totm .lwh-rating,
  .lwh-totm-actions {
    justify-content: flex-start;
  }
}

/* ---------- 4. Reviews ---------- */
.lwh-reviews-average {
  font-weight: 700;
  color: var(--lwh-text, #474747);
}
.lwh-reviews-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lwh-review figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 22px 22px 18px;
  border: 1px solid var(--lwh-line, #e7ddc8);
  border-radius: 4px;
  background: #fff;
}
.lwh-review blockquote {
  flex: 1;
  margin: 12px 0 14px;
  padding: 0;
  border: 0;
  color: var(--lwh-text, #474747);
  font-size: 15px;
  line-height: 1.6;
}
.lwh-review blockquote p {
  margin: 0 0 6px;
}
.lwh-review .lwh-review-title {
  color: var(--lwh-ink, #2b2b2b);
  font-weight: 700;
}
.lwh-review figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 14px;
}
.lwh-review-author {
  color: var(--lwh-ink, #2b2b2b);
  font-weight: 700;
}
.lwh-review figcaption a {
  color: var(--lwh-olive, #4a5d23);
  text-decoration: underline;
}

@media (min-width: 769px) {
  .lwh-reviews-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 5. Story (the existing SEO text widget) ---------- */
.home-page .lwh-home-story {
  padding: 36px 24px;
  border-radius: 4px;
  background: var(--lwh-cream, #faf6ee);
}
.home-page .lwh-home-story .category-description {
  max-width: 760px;
  margin: 0 auto;
  color: var(--lwh-text, #474747);
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}
.home-page .lwh-home-story h1 {
  margin: 0 0 16px;
  font-family: var(--lwh-serif, Georgia, serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lwh-ink, #2b2b2b);
}
.home-page .lwh-home-story a {
  color: var(--lwh-olive, #4a5d23);
  text-decoration: underline;
}

/* ---------- 6. Tea guides ---------- */
.lwh-guides-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lwh-guide a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--lwh-line, #e7ddc8);
  border-radius: 4px;
  background: #fff;
  color: var(--lwh-text, #474747);
  text-decoration: none;
}
.lwh-guide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.lwh-guide-title {
  margin: 18px 20px 8px;
  font-family: var(--lwh-serif, Georgia, serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--lwh-ink, #2b2b2b);
}
.lwh-guide-teaser {
  flex: 1;
  margin: 0 20px 14px;
  font-size: 15px;
  line-height: 1.6;
}
.lwh-guide-more {
  margin: 0 20px 20px;
  font-size: 15px;
  color: var(--lwh-olive, #4a5d23);
  font-weight: 700;
  text-decoration: underline;
}
.lwh-guide a:hover .lwh-guide-title,
.lwh-guide a:focus .lwh-guide-title {
  color: var(--lwh-olive, #4a5d23);
}

@media (min-width: 769px) {
  .lwh-guides-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
