/* ============================================================
   HOMEPAGE STANDALONE CSS
   ============================================================ */

/* ============================================================
   HOME PAGE FOUNDATION
   ============================================================ */

.home-page {
  overflow-x: hidden;
}

.home-page main {
  width: 100%;
}

.home-page .storefront-container {
  width: min(100% - 32px, 1240px);
  margin-inline: auto;
}

/* ============================================================
   HERO
   ============================================================ */

.home-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f5f5f5;
}

.home-hero-slider {
  position: relative;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
}

.home-hero-slides {
  position: relative;
  width: 100%;
  height: 520px;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;

  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.home-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* ============================================================
   HERO IMAGE
   ============================================================ */

.home-hero-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ============================================================
   HERO OVERLAY
   ============================================================ */

.home-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.42),
    rgba(0, 0, 0, 0.08) 55%,
    rgba(0, 0, 0, 0.18)
  );

  pointer-events: none;
}

/* ============================================================
   HERO TITLE
   ============================================================ */

.home-page #home-hero-title {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;

  display: block;

  width: min(90%, 1100px);

  margin: 0;
  padding: 0;

  color: #ffffff;

  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;

  text-align: center;

  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.22);

  transform: translate(-50%, -50%);

  clip: auto;
  clip-path: none;

  overflow: visible;
  white-space: normal;
}

/* ============================================================
   HERO CONTROLS
   ============================================================ */

.home-hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;

  padding: 0;

  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.28);

  color: #ffffff;

  font-size: 1.2rem;

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.home-hero-control:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #ffffff;
}

.home-hero-control:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

.home-hero-control:active {
  transform: translateY(-50%) scale(0.95);
}

.home-hero-prev {
  left: 24px;
}

.home-hero-next {
  right: 24px;
}

/* ============================================================
   HERO INDICATORS
   ============================================================ */

.home-hero-indicators {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
}

.home-hero-indicator {
  width: 9px;
  height: 9px;

  padding: 0;

  border: 1px solid #ffffff;
  border-radius: 50%;

  background: transparent;

  opacity: 0.75;

  cursor: pointer;

  transition:
    width 0.2s ease,
    border-radius 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
}

.home-hero-indicator:hover {
  opacity: 1;
}

.home-hero-indicator.is-active {
  width: 28px;

  border-radius: 999px;

  background: #ffffff;

  opacity: 1;
}

.home-hero-indicator:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ============================================================
   HERO - MOBILE
   ============================================================ */

@media (max-width: 767px) {
  .home-hero-slider {
    min-height: 620px;
  }

  .home-hero-slides {
    height: 620px;
  }

  .home-hero-slide img {
    object-position: center center;
  }

  .home-hero-control {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .home-hero-prev {
    left: 12px;
  }

  .home-hero-next {
    right: 12px;
  }

  .home-hero-indicators {
    bottom: 18px;
  }

  .home-page #home-hero-title {
    width: calc(100% - 48px);
    font-size: clamp(2rem, 9vw, 3rem);
  }
}

/* ============================================================
   HERO - SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {
  .home-hero-slider {
    min-height: 600px;
  }

  .home-hero-slides {
    height: 600px;
  }

  .home-hero-control {
    width: 38px;
    height: 38px;
  }

  .home-hero-prev {
    left: 10px;
  }

  .home-hero-next {
    right: 10px;
  }
}

/* ============================================================
   GENERAL HOME SECTION
   ============================================================ */

.home-categories-section,
.home-products-section {
  padding: 72px 0;
}

.home-categories-section {
  background: #ffffff;
  padding-bottom: 32px;
}

.home-featured-products-section {
  background: #f8f8f8;
  padding-top: 32px;
}

.home-all-products-section {
  background: #ffffff;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.home-section-header h2 {
  margin: 0;
  color: #111111;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

.home-section-link {
  flex-shrink: 0;
  color: #09075e;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.home-section-link:hover {
  color: #d71920;
}

.home-section-link:focus-visible {
  outline: 2px solid #09075e;
  outline-offset: 4px;
}

/* ============================================================
   CATEGORIES - DESKTOP / TABLET
   ============================================================ */

.home-categories-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.home-categories-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  min-width: 100%;
  padding-bottom: 10px;
}

.home-category-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 54px;
  padding: 14px 22px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background: #ffffff;
  color: #222222;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.home-category-item:hover {
  border-color: #09075e;
  background: #09075e;
  color: #ffffff;
  transform: translateY(-2px);
}

.home-category-item:focus-visible {
  outline: 2px solid #09075e;
  outline-offset: 3px;
}

/* ============================================================
   CATEGORIES - MOBILE DROPDOWN
   ============================================================ */

.home-categories-mobile {
  display: none;
}

.home-categories-mobile select {
  width: 100%;
  min-height: 52px;
  padding: 0 44px 0 16px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background-color: #ffffff;
  color: #222222;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.home-categories-mobile select:focus {
  outline: 2px solid #09075e;
  outline-offset: 2px;
}

/* ============================================================
   HOME PRODUCT GRID
   ============================================================ */

.home-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/*
 * The product card itself is intentionally not redesigned here.
 *
 * Shop / Category / Search / Home use the same card structure.
 * Existing customer.css remains the source of truth for the
 * shared product-card appearance.
 */

/* ============================================================
   HOME PRODUCT STATES
   ============================================================ */

.home-page .products-state {
  min-height: 24px;
  margin-top: 24px;
  color: #666666;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.home-page .products-state:empty {
  display: none;
}

/* ============================================================
   HOMEPAGE PAGINATION
   ============================================================ */

.home-page .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.home-page .pagination-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  background: #ffffff;
  color: #222222;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.home-page .pagination-button:hover:not(:disabled) {
  border-color: #09075e;
  background: #09075e;
  color: #ffffff;
}

.home-page .pagination-button.is-active {
  border-color: #09075e;
  background: #09075e;
  color: #ffffff;
}

.home-page .pagination-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.home-page .pagination-button:focus-visible {
  outline: 2px solid #09075e;
  outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE - LARGE TABLET / SMALL DESKTOP
   ============================================================ */

@media (max-width: 1100px) {
  .home-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .home-hero-slider,
  .home-hero-slides {
    min-height: 480px;
    height: 480px;
  }
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */

@media (max-width: 800px) {
  .home-page .storefront-container {
    width: min(100% - 28px, 700px);
  }

  .home-categories-section,
  .home-products-section {
    padding: 56px 0;
  }

  .home-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .home-hero-slider,
  .home-hero-slides {
    min-height: 430px;
    height: 430px;
  }

  .home-hero-control {
    width: 42px;
    height: 42px;
  }

  .home-hero-prev {
    left: 16px;
  }

  .home-hero-next {
    right: 16px;
  }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (max-width: 600px) {
  .home-page .storefront-container {
    width: min(100% - 24px, 520px);
  }

  .home-categories-section,
  .home-products-section {
    padding: 48px 0;
  }

  .home-section-header {
    align-items: flex-end;
    margin-bottom: 24px;
  }

  .home-section-header h2 {
    font-size: 1.55rem;
  }

  .home-section-link {
    font-size: 0.85rem;
  }

  /* ----------------------------------------------------------
     HERO
     ---------------------------------------------------------- */

  .home-hero-slider,
  .home-hero-slides {
    min-height: 380px;
    height: 380px;
  }

  .home-page #home-hero-title {
    width: calc(100% - 72px);
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.08;
  }

  .home-hero-control {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .home-hero-prev {
    left: 12px;
  }

  .home-hero-next {
    right: 12px;
  }

  .home-hero-indicators {
    bottom: 18px;
  }

  /* ----------------------------------------------------------
     CATEGORIES
     ---------------------------------------------------------- */

  .home-categories-scroll {
    display: none;
  }

  .home-categories-mobile {
    display: block;
  }

  /* ----------------------------------------------------------
     PRODUCT GRID
     ---------------------------------------------------------- */

  .home-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  /* ----------------------------------------------------------
     PAGINATION
     ---------------------------------------------------------- */

  .home-page .pagination {
    gap: 6px;
    margin-top: 32px;
  }

  .home-page .pagination-button {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }
}

/* ============================================================
   RESPONSIVE - SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {
  .home-page .storefront-container {
    width: calc(100% - 20px);
  }

  .home-categories-section,
  .home-products-section {
    padding: 40px 0;
  }

  .home-section-header {
    gap: 12px;
  }

  .home-section-header h2 {
    font-size: 1.4rem;
  }

  .home-section-link {
    font-size: 0.8rem;
  }

  .home-hero-slider,
  .home-hero-slides {
    min-height: 330px;
    height: 330px;
  }

  .home-page #home-hero-title {
    width: calc(100% - 64px);
    font-size: 2rem;
  }

  .home-hero-control {
    width: 34px;
    height: 34px;
  }

  .home-hero-prev {
    left: 10px;
  }

  .home-hero-next {
    right: 10px;
  }

  .home-products-grid {
    gap: 10px;
  }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .home-hero-slide,
  .home-hero-control,
  .home-hero-indicator,
  .home-category-item,
  .home-section-link,
  .home-page .pagination-button {
    transition: none;
  }
}

