/* Edibles-style home — Appily Twenty flower theme */

.page-ed-home {
  --ed-green: #5a9688;
  --ed-green-dark: #3d7568;
  --ed-green-light: #7eb8a4;
  --ed-wine: #2d1b2e;
  --ed-blush: #f5e6ea;
  --ed-cream: #faf8f5;
  --ed-gray: #f3f3f3;
  --ed-gray-mid: #888;
  --ed-border: #e8e8e8;
  --ed-shadow: 0 2px 12px rgba(45, 27, 46, 0.06);
  --ed-radius: 6px;
  --ed-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --ed-serif: "Instrument Serif", Georgia, serif;
}

.page-ed-home .ed-home {
  font-family: var(--ed-font);
  color: var(--ed-wine);
  background: #fff;
}

.page-ed-home .ed-wrap {
  width: min(1280px, 94vw);
  margin-inline: auto;
}

/* ── Hero grid ── */
.ed-hero {
  padding: 1.25rem 0 0;
  background: var(--ed-cream);
}

.ed-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.55fr 0.55fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  width: min(1280px, 94vw);
  margin-inline: auto;
  min-height: 420px;
}

.ed-hero-main {
  grid-row: 1 / -1;
  position: relative;
  background: var(--ed-gray);
  border-radius: var(--ed-radius);
  overflow: hidden;
}

.ed-hero-slider {
  position: relative;
  height: 100%;
  min-height: 420px;
}

.ed-hero-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 2rem 2.5rem;
}

.ed-hero-slide.is-active {
  display: grid;
}

.ed-hero-tag {
  display: inline-block;
  background: #f5c842;
  color: var(--ed-wine);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.ed-hero-slide-copy h1 {
  font-family: var(--ed-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.ed-hero-slide-copy p {
  margin: 0 0 1.25rem;
  color: var(--ed-gray-mid);
  font-size: 0.95rem;
}

.ed-btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
}

.ed-btn-solid {
  background: var(--ed-green);
  color: #fff;
}

.ed-btn-solid:hover {
  background: var(--ed-green-dark);
}

.ed-hero-slide-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.ed-hero-slide-img img {
  max-height: 320px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.ed-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 1px solid var(--ed-border);
  background: #fff;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ed-wine);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-hero-prev { left: 12px; }
.ed-hero-next { right: 12px; }

.ed-hero-tall {
  grid-row: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem;
  background: #3a3a3a;
  color: #fff;
  text-decoration: none;
  border-radius: var(--ed-radius);
  overflow: hidden;
}

.ed-hero-tall-sub {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.ed-hero-tall strong {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 8rem;
  position: relative;
  z-index: 1;
}

.ed-hero-tall img {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 70%;
  max-height: 85%;
  object-fit: contain;
  object-position: bottom right;
}

.ed-hero-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ed-hero-mini {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1rem;
  color: #fff;
  text-decoration: none;
  border-radius: var(--ed-radius);
  overflow: hidden;
  min-height: 0;
}

.ed-hero-mini--rose { background: #c94c4c; }
.ed-hero-mini--green { background: var(--ed-green); }

.ed-hero-mini-sub {
  font-size: 0.7rem;
  opacity: 0.9;
}

.ed-hero-mini strong {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 55%;
  position: relative;
  z-index: 1;
}

.ed-hero-mini-cta {
  font-size: 0.7rem;
  text-decoration: underline;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}

.ed-hero-mini img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 50%;
  max-height: 90%;
  object-fit: contain;
}

/* ── Features ── */
.ed-features {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--ed-border);
}

.ed-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.ed-feature-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid var(--ed-green);
  border-radius: 50%;
  margin-bottom: 1rem;
}

.ed-feature h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.ed-feature p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ed-gray-mid);
  line-height: 1.55;
  max-width: 280px;
  margin-inline: auto;
}

/* ── Sections ── */
.ed-section {
  padding: 2.75rem 0;
}

.ed-section-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 2rem;
}

.ed-daily {
  background: var(--ed-gray);
}

/* ── Category explorer ── */
.ed-cat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.ed-cat-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  background: var(--ed-gray);
  border-radius: var(--ed-radius);
  padding: 1rem 0.75rem 1rem 1rem;
  min-height: 130px;
}

.ed-cat-copy h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.ed-cat-copy ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ed-cat-copy li {
  margin: 0.15rem 0;
}

.ed-cat-copy a {
  font-size: 0.72rem;
  color: var(--ed-gray-mid);
  text-decoration: none;
}

.ed-cat-copy a:hover {
  color: var(--ed-green);
}

.ed-cat-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}

.ed-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Product cards ── */
.ed-prod-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.ed-prod-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.ed-prod-card:hover {
  box-shadow: var(--ed-shadow);
}

.ed-prod-badge,
.ed-prod-ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: capitalize;
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
  background: var(--ed-green);
  color: #fff;
}

.ed-prod-ribbon {
  background: var(--ed-green-dark);
  transform: rotate(-45deg) translate(-30%, -50%);
  transform-origin: center;
  top: 18px;
  left: 0;
  font-size: 0.55rem;
  letter-spacing: 0.02em;
}

.ed-prod-out,
.ed-list-out {
  background: #666;
}

.ed-prod-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem 0.5rem;
  aspect-ratio: 1;
  text-decoration: none;
}

.ed-prod-img img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.ed-prod-body {
  padding: 0.5rem 0.75rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ed-prod-timer {
  font-size: 0.65rem;
  color: var(--ed-green);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.ed-prod-body h3 {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  flex: 1;
}

.ed-prod-body h3 a {
  color: inherit;
  text-decoration: none;
}

.ed-prod-body h3 a:hover {
  color: var(--ed-green);
}

.ed-prod-stars {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #ddd;
  margin-bottom: 0.4rem;
}

.ed-prod-stars .is-on {
  color: #f5c842;
}

.ed-prod-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.ed-prod-price strong {
  font-size: 0.85rem;
  font-weight: 700;
}

.ed-prod-price s {
  font-size: 0.7rem;
  color: var(--ed-gray-mid);
  margin-left: 0.25rem;
}

.ed-prod-cart {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ed-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: background 0.15s;
}

.ed-prod-cart:hover {
  background: #f0a040;
}

.ed-prod-cart.is-disabled {
  opacity: 0.4;
  cursor: default;
}

.ed-prod-card.is-sold-out .ed-prod-img {
  opacity: 0.55;
}

/* ── Carousels ── */
.ed-carousel-wrap {
  position: relative;
}

.ed-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.25rem 0;
}

.ed-carousel::-webkit-scrollbar {
  display: none;
}

.ed-carousel .ed-prod-card {
  flex: 0 0 calc(12.5% - 11px);
  min-width: 145px;
}

.ed-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid var(--ed-border);
  background: #fff;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--ed-shadow);
}

.ed-carousel-prev { left: -12px; }
.ed-carousel-next { right: -12px; }

/* ── Promo banners ── */
.ed-promo-trio {
  padding: 1rem 0 2rem;
}

.ed-promo-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ed-promo-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  padding: 1.5rem;
  border-radius: var(--ed-radius);
  text-decoration: none;
  overflow: hidden;
}

.ed-promo-banner--dark {
  color: #fff;
}

.ed-promo-banner--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 70%);
  z-index: 1;
}

.ed-promo-banner--light {
  color: var(--ed-wine);
}

.ed-promo-banner--light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.2) 65%);
  z-index: 1;
}

.ed-promo-banner span {
  font-size: 0.75rem;
  position: relative;
  z-index: 2;
}

.ed-promo-banner strong {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 55%;
  margin: 0.25rem 0;
  position: relative;
  z-index: 2;
}

.ed-promo-banner em {
  font-size: 0.75rem;
  font-style: normal;
  text-decoration: underline;
  position: relative;
  z-index: 2;
}

.ed-promo-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ed-promo-duo {
  padding: 0 0 2.5rem;
}

.ed-promo-duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ed-promo-wide {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  padding: 2rem;
  border-radius: var(--ed-radius);
  text-decoration: none;
  overflow: hidden;
}

.ed-promo-wide--cool {
  color: var(--ed-wine);
}

.ed-promo-wide--cool::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(220,235,240,0.92) 0%, rgba(220,235,240,0.3) 60%);
  z-index: 1;
}

.ed-promo-wide--warm {
  color: #fff;
}

.ed-promo-wide--warm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(240,140,50,0.85) 0%, rgba(245,180,80,0.4) 65%);
  z-index: 1;
}

.ed-promo-wide span {
  font-size: 0.8rem;
  position: relative;
  z-index: 2;
}

.ed-promo-wide strong {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 50%;
  margin: 0.35rem 0;
  position: relative;
  z-index: 2;
}

.ed-promo-wide em {
  font-size: 0.8rem;
  font-style: normal;
  text-decoration: underline;
  position: relative;
  z-index: 2;
}

.ed-promo-wide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ── Best sellers ── */
.ed-best-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ed-best-col {
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  overflow: hidden;
  background: #fff;
}

.ed-best-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--ed-gray);
  text-decoration: none;
  color: inherit;
}

.ed-best-head h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.ed-best-head img {
  width: 80px;
  height: 60px;
  object-fit: contain;
}

.ed-best-list {
  padding: 0.5rem 0.75rem 0.75rem;
}

.ed-list-row {
  display: grid;
  grid-template-columns: 56px 1fr 32px;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--ed-border);
}

.ed-list-row:last-child {
  border-bottom: none;
}

.ed-list-thumb {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
}

.ed-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ed-list-sale {
  position: absolute;
  top: -2px;
  left: -2px;
  font-size: 0.5rem;
  font-weight: 700;
  background: var(--ed-green);
  color: #fff;
  padding: 0.1rem 0.25rem;
  border-radius: 2px;
  z-index: 1;
}

.ed-list-copy h4 {
  font-size: 0.72rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.ed-list-copy h4 a {
  color: inherit;
  text-decoration: none;
}

.ed-list-copy h4 a:hover {
  color: var(--ed-green);
}

.ed-list-stars {
  font-size: 0.55rem;
  color: #ddd;
  letter-spacing: 0.5px;
}

.ed-list-stars .is-on {
  color: #f5c842;
}

.ed-list-price strong {
  font-size: 0.78rem;
  font-weight: 700;
}

.ed-list-price s {
  font-size: 0.65rem;
  color: var(--ed-gray-mid);
  margin-left: 0.2rem;
}

.ed-list-cart {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ed-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.8rem;
}

.ed-list-cart:hover {
  background: #f0a040;
}

.ed-list-cart.is-disabled {
  opacity: 0.4;
}

.ed-list-row.is-sold-out .ed-list-thumb {
  opacity: 0.5;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .ed-prod-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ed-cat-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .ed-carousel .ed-prod-card {
    flex: 0 0 calc(25% - 9px);
    min-width: 140px;
  }
}

@media (max-width: 900px) {
  .ed-hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: unset;
  }

  .ed-hero-main,
  .ed-hero-tall {
    grid-row: auto;
  }

  .ed-hero-slider,
  .ed-hero-slide.is-active {
    min-height: 320px;
  }

  .ed-hero-stack {
    flex-direction: row;
  }

  .ed-features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ed-best-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ed-promo-trio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ed-hero-slide.is-active {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem;
  }

  .ed-hero-slide-img {
    order: -1;
  }

  .ed-cat-row {
    grid-template-columns: 1fr;
  }

  .ed-prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ed-promo-duo-grid {
    grid-template-columns: 1fr;
  }

  .ed-best-grid {
    grid-template-columns: 1fr;
  }

  .ed-carousel .ed-prod-card {
    flex: 0 0 calc(50% - 6px);
  }
}
