/* ============================================================
   homepage.css — Phase 1 homepage redesign
   Covers: the hero carousel (auto-slide, swipe, arrows, dots)
   and the redesigned "Shop by Category" showcase section.
   Scoped entirely to the homepage — no shared class names with
   checkout/cart/admin/account styles.
   ============================================================ */

/* ── HERO CAROUSEL ── */
#hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  height: 360px;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 50px rgba(17,24,39,0.16);
  touch-action: pan-y;
  background: #1f2937; /* shows briefly while the first slide's bg-image decodes */
}
@media (min-width: 640px)  { #hero-carousel { height: 420px; } }
@media (min-width: 1024px) { #hero-carousel { height: 480px; } }

#hero-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17,24,39,0.10) 0%, rgba(17,24,39,0.20) 45%, rgba(17,24,39,0.88) 100%),
    linear-gradient(90deg, rgba(17,24,39,0.55) 0%, rgba(17,24,39,0.05) 62%);
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 1.75rem 1.5rem 2.25rem;
  color: #fff;
  max-width: 560px;
}
@media (min-width: 640px) { .hero-slide-content { padding: 2.25rem 2.75rem 2.75rem; } }
.hero-slide-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero-slide-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 8px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.hero-slide-subtitle {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.94;
  margin-bottom: 18px;
  max-width: 420px;
}
@media (min-width: 640px) { .hero-slide-subtitle { font-size: 15.5px; } }
.hero-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #111827;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: 14px;
  font-size: 13.5px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-slide-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 30px rgba(0,0,0,0.38); }
.hero-slide-cta:active { transform: translateY(0) scale(0.98); }

/* Arrows — desktop/tablet only; touch devices rely on swipe (see responsive.css) */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  color: #111827;
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.hero-arrow-prev { left: 14px; }
.hero-arrow-next { right: 14px; }

#hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 5;
}
.hero-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  transition: all 0.25s ease;
  padding: 0;
}
.hero-dot.active { background: #fff; width: 22px; }

/* ── CATEGORIES SHOWCASE ── */
.cat-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
@media (min-width: 640px)  { .cat-showcase-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .cat-showcase-grid { grid-template-columns: repeat(6, 1fr); } }

.cat-group-card {
  grid-column: span 2 / span 2;
  background: linear-gradient(135deg, #fdf2f8 0%, #eef2ff 100%);
  border: 1px solid #f0eefe;
  border-radius: 20px;
  padding: 1.4rem 1.4rem 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
@media (min-width: 1024px) { .cat-group-card { grid-column: span 3 / span 3; } }
.cat-group-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(79,70,229,0.13); }
.cat-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-group-icon {
  font-size: 22px; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(17,24,39,0.06);
}
.cat-group-head h3 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 17px; color: #1f2937; }
.cat-group-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.cat-group-links button {
  text-align: left; font-size: 12.5px; font-weight: 600; color: #4b5563;
  background: #fff; border: 1px solid #eeedf5; border-radius: 10px;
  padding: 10px 12px; transition: all 0.18s ease;
}
.cat-group-links button:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; transform: translateY(-2px); }
.cat-group-cta {
  font-size: 12.5px; font-weight: 700; color: #4f46e5;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.18s ease;
}
.cat-group-cta:hover { gap: 8px; text-decoration: underline; }

.cat-icon-tile {
  background: #fff;
  border: 1px solid #f2f1f5;
  border-radius: 18px;
  padding: 1.35rem 0.75rem;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.cat-icon-tile .cat-icon-badge {
  font-size: 26px; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease;
}
.cat-icon-tile:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(79,70,229,0.14); border-color: #e0e7ff; }
.cat-icon-tile:hover .cat-icon-badge { transform: scale(1.12) rotate(-4deg); }
.cat-icon-tile p { font-size: 12.5px; font-weight: 700; color: #374151; line-height: 1.25; }
.cat-icon-tile:active { transform: translateY(-2px) scale(0.98); }

/* ── COLLECTION PAGE BANNER (Phase 2/3) ── */
.collection-banner-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #1f2937; /* Funeral Collection deliberately has no photo — see navigation.js */
  display: flex;
  align-items: flex-end;
  box-shadow: 0 16px 40px rgba(17,24,39,0.14);
}
@media (min-width: 640px) { .collection-banner-visual { min-height: 280px; } }
.collection-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,24,39,0.15) 0%, rgba(17,24,39,0.35) 45%, rgba(17,24,39,0.88) 100%);
}
.collection-banner-visual.collection-banner-noimage .collection-banner-overlay {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}
.collection-banner-content {
  position: relative;
  z-index: 2;
  padding: 1.75rem 1.5rem 2rem;
}
@media (min-width: 640px) { .collection-banner-content { padding: 2.25rem 2.5rem 2.5rem; } }

/* Wedding-only role sub-filter chips (Bride / Bridesmaid / Groom / Guest) */
.role-chip {
  font-size: 12.5px; font-weight: 600; color: #4b5563;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 999px;
  padding: 7px 16px; transition: all 0.18s ease;
}
.role-chip:hover { border-color: #c7d2fe; color: #4f46e5; }
.role-chip.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }

/* Related collections (internal linking) */
.related-collection-card {
  background: #fff; border: 1px solid #f2f1f5; border-radius: 16px;
  padding: 1.1rem 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.related-collection-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(79,70,229,0.12); }
.related-collection-icon { font-size: 22px; }
.related-collection-label { font-size: 12px; font-weight: 700; color: #374151; }

/* Collection page closing CTA */
.collection-cta {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-radius: 24px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
