/* ============================================================
   CraftyWorth v2 — Homepage Sections
   ============================================================ */

/* ── Hero ── */
.cw-hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  display: flex;
  align-items: center;
  background: var(--ink);
  color: #fff;
}
.cw-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  display: flex;
  align-items: center;
}
.cw-hero__slide.active { opacity: 1; }
.cw-hero__slide--linked { text-decoration: none; cursor: pointer; }
.cw-hero__slide--linked:hover { opacity: .96; }
.cw-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cw-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16,8,4,.75) 0%, rgba(16,8,4,.35) 55%, rgba(16,8,4,.1) 100%);
}
.cw-hero__content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s20) var(--px);
  width: 100%;
  max-width: 640px;
  padding-left: var(--px);
}
.cw-hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--a);
  margin-bottom: var(--s3);
}
.cw-hero__title {
  font-size: clamp(30px, 5.5vw, 58px);
  line-height: 1.05;
  font-weight: 500;
  color: #fff;
  margin-bottom: var(--s4);
  letter-spacing: -.02em;
}
.cw-hero__title em { font-style: italic; color: rgba(255,255,255,.8); }
.cw-hero__sub { font-size: 16px; color: rgba(255,255,255,.8); margin-bottom: var(--s8); max-width: 440px; line-height: 1.6; }
.cw-hero__ctas { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* Hero dots */
.cw-hero__dots {
  position: absolute;
  bottom: 24px;
  left: var(--px);
  display: flex; gap: 6px; z-index: 3;
}
.cw-hero__dot {
  width: 8px; height: 8px;
  border-radius: var(--pill);
  background: rgba(255,255,255,.4);
  border: 0; cursor: pointer;
  padding: 0;
  transition: all var(--t);
}
.cw-hero__dot.active { background: #fff; width: 24px; }

/* Hero arrows */
.cw-hero__arrows {
  position: absolute;
  right: var(--px);
  bottom: 24px;
  display: flex; gap: 8px; z-index: 3;
}
.cw-hero__arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t);
  backdrop-filter: blur(4px);
}
.cw-hero__arrow:hover { background: rgba(255,255,255,.28); }

/* ── Occasions strip (horizontal scroll) ── */
.cw-occasions { padding: 40px 0; }
.cw-occasions__track {
  display: flex;
  gap: 12px;
  padding: 0 var(--px);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.cw-occasions__track::-webkit-scrollbar { display: none; }
.cw-occasion {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  min-width: 120px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t);
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--ink);
}
.cw-occasion:hover { border-color: var(--p); transform: translateY(-2px); }
.cw-occasion__icon { font-size: 32px; line-height: 1; }
.cw-occasion__name { font-size: 13px; font-weight: 600; }
.cw-occasion__price { font-size: 11px; color: var(--ink-3); }

/* ── Product Slider Row ── */
.cw-product-row { position: relative; }
.cw-product-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 4px 0 8px;
}
.cw-product-slider::-webkit-scrollbar { display: none; }
.cw-product-slider .cw-card,
.cw-product-slider .product {
  min-width: 240px;
  max-width: 260px;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.cw-product-row__nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.cw-row-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t);
}
.cw-row-btn:hover { border-color: var(--p); background: var(--p-l); color: var(--p); }
.cw-row-btn:disabled { opacity: .35; cursor: default; }

/* ── Editorial Split Section ── */
.cw-editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}
.cw-editorial--reverse { direction: rtl; }
.cw-editorial--reverse > * { direction: ltr; }
.cw-editorial__img {
  position: relative;
  overflow: hidden;
  background: var(--off);
}
.cw-editorial__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.cw-editorial:hover .cw-editorial__img img { transform: scale(1.03); }
.cw-editorial__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s16) var(--s12);
  background: var(--off);
}
.cw-editorial__content .eyebrow { margin-bottom: var(--s3); }
.cw-editorial__content h2 { margin-bottom: var(--s4); }
.cw-editorial__content p { font-size: 15px; color: var(--ink-2); line-height: 1.7; margin-bottom: var(--s8); max-width: 400px; }

/* ── Trust Strip ── */
.cw-trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--off); }
.cw-trust__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.cw-trust__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border-right: 1px solid var(--line);
  transition: background var(--t);
}
.cw-trust__item:last-child { border-right: 0; }
.cw-trust__item:hover { background: rgba(160,41,62,.03); }
.cw-trust__item svg { color: var(--p); flex-shrink: 0; }
.cw-trust__item__text strong { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.cw-trust__item__text span  { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ── Corporate Section ── */
.cw-corp {
  background: var(--ink);
  color: rgba(255,255,255,.8);
  padding: var(--sec) 0;
}
.cw-corp__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.cw-corp__eyebrow { font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--a); margin-bottom: var(--s3); }
.cw-corp__title { font-size: clamp(26px, 3.5vw, 44px); color: #fff; margin-bottom: var(--s4); line-height: 1.08; }
.cw-corp__title em { color: rgba(255,255,255,.6); font-style: italic; }
.cw-corp__body { font-size: 15px; line-height: 1.7; margin-bottom: var(--s8); }
.cw-corp__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.cw-corp__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.cw-corp__stat {
  padding: 24px 20px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
  border-right: 1px solid rgba(255,255,255,.06);
}
.cw-corp__stat:nth-child(2n) { border-right: 0; }
.cw-corp__stat:nth-child(3), .cw-corp__stat:nth-child(4) { border-bottom: 0; }
.cw-corp__stat strong { display: block; font-family: var(--head); font-size: 32px; font-weight: 600; color: var(--a); line-height: 1; margin-bottom: 4px; }
.cw-corp__stat span { font-size: 12px; color: rgba(255,255,255,.5); }

/* ── Category Grid ── */
.cw-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cw-cat-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: block;
  text-decoration: none;
  background: var(--off);
}
.cw-cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.cw-cat-card:hover img { transform: scale(1.06); }
.cw-cat-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(16,8,4,.7) 100%);
}
.cw-cat-card__label {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  color: #fff;
}
.cw-cat-card__label b { display: block; font-family: var(--head); font-size: 18px; font-weight: 600; }
.cw-cat-card__label small { font-size: 12px; opacity: .8; }
.cw-cat-card--bg { background: var(--ink); }
.cw-cat-card--accent { background: var(--p); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cw-editorial { grid-template-columns: 1fr; min-height: auto; }
  .cw-editorial__content { padding: var(--s10) var(--px); }
  .cw-editorial--reverse { direction: ltr; }
  .cw-corp__inner { grid-template-columns: 1fr; gap: 40px; }
  .cw-trust__inner { grid-template-columns: repeat(2,1fr); }
  .cw-trust__item:nth-child(2) { border-right: 0; }
  .cw-trust__item:nth-child(3) { border-right: 1px solid var(--line); }
  .cw-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cw-hero { min-height: 460px; }
}
@media (max-width: 768px) {
  /* Hero — readable text over image */
  .cw-hero { min-height: 420px; }
  .cw-hero__scrim {
    background: linear-gradient(180deg, rgba(16,8,4,.45) 0%, rgba(16,8,4,.75) 100%);
  }
  .cw-hero__content { padding: 64px 16px; }
  .cw-hero__title { font-size: clamp(26px, 7vw, 36px); line-height: 1.1; }
  .cw-hero__sub { font-size: 14px; line-height: 1.5; }

  /* Trust bar — strict 2x2 grid, no horizontal scroll */
  .cw-trust__inner { grid-template-columns: repeat(2, 1fr) !important; }
  .cw-trust__item { padding: 14px 12px; border-right: 0; }
  .cw-trust__item:nth-child(odd) { border-right: 1px solid var(--line); }
  .cw-trust__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  /* Category grid — 2 cols on mobile */
  .cw-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Product row — horizontal scroll snap, min 160px cards */
  .cw-product-slider {
    gap: 12px;
    padding: 4px 16px 8px;
    margin: 0 -16px;
  }
  .cw-product-slider .cw-card,
  .cw-product-slider .product {
    min-width: 160px;
    max-width: 180px;
  }

  /* Section headings — smaller but prominent */
  .cw-sh__title { font-size: clamp(20px, 5vw, 26px); }
  .cw-sh__sub { font-size: 13.5px; }
}

@media (max-width: 640px) {
  .cw-hero { min-height: 380px; }
  .cw-hero__arrows { display: none; }
  .cw-hero__title { margin-bottom: var(--s3); }
  .cw-hero__ctas { flex-direction: column; }
  .cw-hero__ctas .btn { width: 100%; text-align: center; justify-content: center; }
  .cw-trust__item svg { width: 20px; height: 20px; }
  .cw-corp__stats { grid-template-columns: repeat(2,1fr); }
  .cw-corp__ctas { flex-direction: column; }
  .cw-corp__ctas .btn { width: 100%; justify-content: center; }
  .cw-cat-grid { gap: 10px; }
}
