/* home.css - Home Page Specific Layout */

/* --- HERO SLIDER --- */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  background-color: var(--velvet-cream);
}

@media (min-width: 768px) {
  .hero {
    height: 80vh;
  }
}

.hero__slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 800ms ease-in-out, visibility 800ms ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__slide.active {
  opacity: 1;
  visibility: visible;
}

.hero__slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(139, 26, 74, 0.4) 0%, rgba(45, 45, 45, 0.7) 100%);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  color: var(--text-on-accent);
  text-align: center;
  max-width: 700px;
  padding: 0 24px;
}

.hero__subtitle {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--champagne-gold);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  letter-spacing: 3px;
  margin-bottom: 16px;
  display: inline-block;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 4rem;
  }
}

.hero__desc {
  font-size: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  margin-bottom: 32px;
  font-family: var(--font-body);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero__btn {
  box-shadow: 0 4px 14px rgba(139, 26, 74, 0.3);
}

/* Slider Controls */
.hero__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background-color: rgba(253, 248, 244, 0.15);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: background-color var(--transition-fast);
}

.hero__control:hover {
  background-color: var(--primary-rose);
}

.hero__control--prev { left: 16px; }
.hero__control--next { right: 16px; }

.hero__dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background-color: rgba(253, 248, 244, 0.4);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.hero__dot.active {
  background-color: var(--champagne-gold);
  transform: scale(1.2);
}

/* --- SECTION GENERAL --- */
.section {
  /* Longhand on purpose -- several sections carry both "section" and
     "container" classes on the same element (e.g. <section class="section
     container">). The old `padding: 64px 0` shorthand set padding-left/
     right to 0 as part of that shorthand, silently overriding .container's
     16px horizontal padding since this rule loads after it. That zeroed
     the section's horizontal inset, which combined with a child carousel's
     `margin: 0 -16px` edge-to-edge trick to push the whole row (and its
     first card) 16px past the left edge of the screen. */
  padding-top: 64px;
  padding-bottom: 64px;
}

.section--cream {
  background-color: var(--velvet-cream);
}

.section__header {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section__subtitle {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--blush-pink);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.section__title {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background-color: var(--champagne-gold);
}

/* --- CATEGORIES SECTION --- */
.categories-section {
  padding-bottom: 24px;
}

.categories-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.categories-header-text {
  display: flex;
  flex-direction: column;
}

.categories-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary-rose);
  margin-bottom: 8px;
}

.categories-subtitle {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--warm-gray);
  margin: 0;
}

.categories-view-all {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-rose);
  text-decoration: none;
  transition: color 0.2s;
  margin-bottom: 8px; /* align baseline */
}

.categories-view-all:hover {
  color: var(--deep-rose);
}

.categories-carousel-wrapper {
  position: relative;
  width: 100%;
}

.cat-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ivory-white);
  border: 1px solid var(--velvet-cream);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: var(--primary-rose);
  transition: all 0.2s;
}

.cat-nav-btn:hover {
  background: var(--primary-rose);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 26, 74, 0.2);
}

.cat-prev { left: -24px; }
.cat-next { right: -24px; }

.categories-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 24px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

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

/* Category Card */
.cat-card {
  flex: 0 0 calc(16.666% - 13.5px); /* 6 cards */
  aspect-ratio: 1 / 1.8;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.cat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.cat-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  z-index: 1;
}

.cat-card:hover .cat-card__img {
  transform: scale(1.05);
}

.cat-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(30, 20, 25, 0.85) 0%, rgba(30, 20, 25, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
  z-index: 2;
}

.cat-card__content {
  position: relative;
  z-index: 3;
  padding: 20px 16px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px;
}

.cat-card__icon {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  color: #fff;
  margin-bottom: 8px;
}

.cat-card__icon svg {
  width: 28px;
  height: 28px;
}

.cat-card__text {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.cat-card__title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 4px 0;
}

.cat-card__count {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.cat-card__arrow {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  align-self: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}

.cat-card:hover .cat-card__arrow {
  background: var(--primary-rose);
  border-color: var(--primary-rose);
}

.cat-card__arrow svg {
  width: 16px;
  height: 16px;
}

/* Dots indicator */
.cat-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--velvet-cream);
  cursor: pointer;
  transition: all 0.2s;
}

.cat-dot.active {
  background: var(--primary-rose);
  width: 16px;
  border-radius: 4px;
}

.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 1200px) {
  .cat-card { flex: 0 0 calc(25% - 12px); /* 4 cards on tablet landscape */ }
}

@media (max-width: 992px) {
  .cat-card { flex: 0 0 calc(33.333% - 10.6px); /* 3 cards on tablet portrait */ }
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  
  .cat-nav-btn { display: none; }
  
  .categories-header-text {
    align-items: center;
    text-align: center;
    width: 100%;
  }
  
  .categories-carousel {
    margin: 0 -16px;
    padding: 0 16px 24px 16px;
    /* See .product-row below -- same scroll-snap + padding combination that
       can leave the container's initial scrollLeft at 16px instead of 0,
       shifting card 1 off the left edge of the screen on load. */
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
  }
  
  .cat-card {
    flex: 0 0 calc(45% - 8px); /* ~2.2 cards peek */
    aspect-ratio: 1 / 1.5; /* slightly less tall on mobile */
  }
}

/* --- PRODUCT CAROUSEL / ROW --- */
.product-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.section__view-all-btn {
  display: block;
  width: fit-content;
  margin: 28px auto 0;
  padding: 12px 28px;
  border: 1px solid var(--primary-rose);
  border-radius: var(--radius-button);
  color: var(--primary-rose);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.section__view-all-btn:hover {
  background-color: var(--primary-rose);
  color: var(--text-on-accent);
}

@media (max-width: 480px) {
  .section__view-all-btn {
    width: 100%;
    margin-top: 20px;
  }
}

@media (max-width: 992px) {
  .product-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* Without this, Chrome's snap-position calculation on load ignores the
       row's own padding-left and treats the first card's un-padded edge as
       the "start" snap point -- initializing scrollLeft to 16px (the
       padding amount) instead of 0, which shifted card 1 that same 16px to
       the left, off the edge of the screen, before the user ever touched
       the carousel. scroll-padding tells the snap algorithm where the real
       edge is. */
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
    gap: 16px;
    padding-bottom: 16px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
  }

  .product-row::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
  }

  .product-row .product-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }
}

/* --- WHY CHOOSE US --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 992px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-card {
  background-color: var(--ivory-white);
  padding: 24px;
  border-radius: var(--radius-card);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--velvet-cream);
  transition: transform var(--transition-normal);
}

.why-card:hover {
  transform: translateY(-4px);
}

.why-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--primary-rose);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-card__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.why-card__title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.why-card__desc {
  font-size: 0.85rem;
  color: var(--warm-gray);
  margin-bottom: 0;
}

/* --- REVIEWS CAROUSEL --- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 992px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .reviews-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* See .product-row above -- same scroll-snap + padding combination that
       can leave the container's initial scrollLeft at 16px instead of 0,
       shifting card 1 off the left edge of the screen on load. */
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
    gap: 16px;
    margin: 0 -16px;
    padding: 0 16px 16px;
    scrollbar-width: none;
  }

  .reviews-grid::-webkit-scrollbar {
    display: none;
  }

  .reviews-grid .review-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }
}

/* --- INSTAGRAM GALLERY --- */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

@media (max-width: 992px) {
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.instagram-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.instagram-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.instagram-item__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(139, 26, 74, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 2;
}

.instagram-item:hover .instagram-item__img {
  transform: scale(1.08);
}

.instagram-item:hover .instagram-item__overlay {
  opacity: 1;
}

.instagram-item__overlay svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* --- WHATSAPP CALL TO ACTION --- */
.wa-banner {
  background: linear-gradient(135deg, var(--wa-green) 0%, var(--wa-green-hover) 100%);
  color: var(--text-on-accent);
  padding: 48px 24px;
  border-radius: var(--radius-card);
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.wa-banner__title {
  color: var(--text-on-accent);
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.wa-banner__desc {
  color: var(--text-on-accent);
  opacity: 0.9;
  font-size: 1rem;
  max-width: 500px;
  margin-bottom: 0;
}

.wa-banner__btn {
  background-color: var(--ivory-white);
  color: var(--wa-green-hover);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wa-banner__btn:hover {
  background-color: var(--velvet-cream);
  color: var(--wa-green-hover);
  transform: translateY(-2px);
}
