/* ============================================================================
   HEMA DIGITAL - HOME.CSS
   Homepage: hero slider, category slider, banner, product slider (Cobra)
   ============================================================================ */

/* ==========================================================================
   LEGACY HERO/TILES/BANDS
   ========================================================================== */

.aor-hero {
  position: relative;
  min-height: 420px;
  background: var(--c-black);
}

.aor-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-overlay-medium), var(--c-overlay-light));
}

.aor-hero__content {
  position: relative;
  padding: 120px 0 70px;
}

.aor-hero__title {
  color: var(--c-white);
  font-size: var(--text-6xl);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

@media (max-width: 980px) {
  .aor-hero__title {
    font-size: var(--text-4xl);
  }
}

/* Shop tiles */
.aor-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

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

.aor-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-text-primary);
  aspect-ratio: 16 / 10;
  text-decoration: none;
  padding: var(--space-base);
}

.aor-tile__label {
  background: var(--c-overlay-dark);
  color: var(--c-white);
  padding: var(--space-lg) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 700;
}

/* Bands */
.aor-band {
  position: relative;
  min-height: 260px;
  background: var(--c-text-primary);
  margin-top: var(--space-lg);
}

.aor-band__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-overlay-medium), var(--c-overlay-light));
}

.aor-band__content {
  position: relative;
  padding: 86px 0;
}

.aor-band__title {
  color: var(--c-white);
  font-size: var(--text-4xl);
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.aor-band--alt {
  background: #0b0b0b;
}

/* ==========================================================================
   HERO SLIDER (Swiper)
   ========================================================================== */

.home-hero {
  width: 100%;
  height: min(72vh, 750px);
  max-height: 760px;
  position: relative;
}

/* Force Swiper to behave even if Swiper CSS fails to load */
.home-hero .hero-swiper {
  height: 100%;
  position: relative;
}

.home-hero .swiper-wrapper {
  height: 100%;
  display: flex;
}

.home-hero .swiper-slide {
  height: 100%;
  flex: 0 0 100%;
  position: relative;
  overflow: hidden;
}

/* Link fills slide */
.home-hero .slide-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.home-hero .slide-link picture {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero .slide-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Caption overlay */
.home-hero .caption {
  position: absolute;
  left: clamp(var(--space-lg), 6vw, 80px);
  bottom: clamp(60px, 18vh, 180px);
  z-index: 3;
  color: var(--c-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(28px, 6.2vw, 84px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px var(--c-overlay-medium);
  opacity: 0;
  transform: translateY(var(--space-xl));
}

.home-hero .swiper-slide-active .caption {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.55s ease;
}

/* Progress bar at top of hero */
.home-hero .swiper-pagination {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 5;
}

.home-hero .swiper-pagination-progressbar {
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.home-hero .swiper-pagination-progressbar-fill {
  background: var(--c-red);
}

/* Force red progress bar */
.home-hero {
  --swiper-theme-color: var(--c-red);
}

/* Hero arrows */
.home-hero .hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 52px;
  height: 52px;
  border: 0;
  background: transparent;
  color: var(--c-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.home-hero .hero-nav--prev {
  left: clamp(var(--space-xl), 4vw, 60px);
}

.home-hero .hero-nav--next {
  right: clamp(var(--space-xl), 4vw, 60px);
}

/* Arrow icon */
.home-hero .hero-nav::before {
  content: "";
  width: var(--space-xl);
  height: var(--space-xl);
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  display: block;
}

.home-hero .hero-nav--prev::before {
  transform: rotate(135deg);
  position: relative;
  right: -5px;
}

.home-hero .hero-nav--next::before {
  transform: rotate(-45deg);
  position: relative;
  left: -5px;
}

@media (hover: hover) {
  .home-hero .hero-nav:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--c-red);
  }
}

/* Mobile tuning */
@media (max-width: 767px) {
  .home-hero {
    height: 60vh;
    max-height: 600px;
  }

  .home-hero .caption {
    left: var(--space-md);
    right: var(--space-md);
    bottom: 14vh;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  }
}

/* ==========================================================================
   CATEGORIES SLIDER (Swiper)
   ========================================================================== */

.home-cats {
  width: 100%;
  padding: 26px 0 var(--space-xxs);
}

.home-cats__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 var(--space-lg);
}

/* Full width slider, LEFT aligned to .hd-inner start */
.home-cats .cat-swiper {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  padding-right: 18vw;
  overflow: visible;
}

/* Slides MUST be fixed width for slidesPerView:'auto' */
.home-cats .cat-swiper .swiper-slide {
  width: 190px;
  flex: 0 0 auto;
  height: auto;
}

/* Card */
.home-cats__card {
  display: block;
  text-decoration: none;
  color: var(--c-text-primary);
}

.home-cats__media {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 0;
  overflow: hidden;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-cats__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
}

.home-cats__label {
  margin-top: var(--space-lg);
  font-weight: 700;
  line-height: var(--leading-tight);
}

/* Stop selection / dragging issues while sliding */
.home-cats,
.home-cats * {
  -webkit-user-select: none;
  user-select: none;
}

.home-cats img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Keep links clickable */
.home-cats a {
  pointer-events: auto;
}

/* Scrollbar (hidden until dragging) */
.home-cats .swiper-scrollbar {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  height: 4px;
  margin-top: 40px;
  width: min(var(--wrap), calc(100vw - var(--space-3xl)));
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.home-cats.is-dragging .swiper-scrollbar {
  opacity: 1;
}

.home-cats .swiper-scrollbar-drag {
  height: 100%;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.60);
}

/* Desktop arrows (site width edges, bottom edge of image area) */
@media (min-width: 960px) {
  .home-cats .cat-nav {
    position: absolute;
    z-index: 50;
    top: 120px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(95, 95, 95, 0.65);
    color: var(--c-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
  }

  .home-cats .cat-nav::before {
    content: "";
    width: var(--space-sm);
    height: var(--space-sm);
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    display: block;
    position: relative;
  }

  .home-cats .cat-nav--prev::before {
    transform: rotate(135deg);
    left: 3px;
  }

  .home-cats .cat-nav--next::before {
    transform: rotate(-45deg);
    left: -3px;
  }

  .home-cats .cat-nav--prev {
    left: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  }

  .home-cats .cat-nav--next {
    right: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  }

  /* Hide left arrow at start / right arrow at end */
  .home-cats .cat-swiper.at-start .cat-nav--prev {
    display: none;
  }

  .home-cats .cat-swiper.at-end .cat-nav--next {
    display: none;
  }

  /* Hide arrows if swiper locks */
  .home-cats .cat-swiper.is-locked .cat-nav {
    display: none;
  }
}

/* Desktop hover */
@media (min-width: 960px) and (hover: hover) {
  .home-cats .cat-nav:hover {
    background: var(--c-red);
    color: var(--c-white);
  }
}

/* Category slider title – mobile fix */
@media (max-width: 768px) {
  .home-cats__title {
    font-size: var(--text-lg);
    line-height: var(--leading-tight);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
  }
}

/* ==========================================================================
   IMAGE + HEADING BANNER
   ========================================================================== */

.home-banner {
  padding: 22px 0 0;
}

.home-banner__wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
}

/* Height */
.home-banner__pic,
.home-banner__img {
  display: block;
  width: 100%;
  height: clamp(300px, 38vw, 480px);
}

.home-banner__img {
  object-fit: cover;
  object-position: center;
}

/* Heading overlay */
.home-banner__title {
  position: absolute;
  left: 6%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-white);
  font-size: clamp(22px, 3.2vw, 54px);
  line-height: 1;
  text-shadow: 0 2px var(--space-md) rgba(0, 0, 0, 0.35);
}

/* Mobile: center title */
@media (max-width: 767px) {
  .home-banner__wrap {
    border-radius: 0;
  }

  .home-banner__pic,
  .home-banner__img {
    height: 360px;
  }

  .home-banner__title {
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
    font-size: clamp(var(--text-xl), 6vw, 28px);
  }
}

/* ==========================================================================
   PRODUCTS SLIDER (COBRA) 
   ========================================================================== */

.home-prods {
  padding: var(--space-lg) 0 var(--space-lg);
}

.home-prods__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-sm);
  margin: 0 0 var(--space-sm);
}

.home-prods__title {
  font-family: var(--font-heading);
  font-size:16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.home-prods__all {
  text-decoration: none;
  font-weight: 700;
  opacity: 0.85;
  padding-right: 10px;
}

.home-prods__all:hover {
  opacity: 1;
}

.home-prods .js-prod-swiper {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  padding-right: 18vw;
  overflow: visible;

  /* PERFORMANCE FIXES */
  touch-action: pan-y !important;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Slide Cards */
.home-prods .js-prod-swiper .swiper-slide {
  width: 350px;
  flex: 0 0 auto;
  height: auto;
}

@media (max-width: 900px) {
  .home-prods .js-prod-swiper {
    padding-right: 8vw;
  }

  .home-prods .js-prod-swiper .swiper-slide {
    width: 320px;
  }
}

/* Card Visuals */
.home-prods__card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-prods__name {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-prods__media {
  position: relative;
  background: var(--c-bg-tertiary);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.home-prods__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.home-prods__badge {
  position: absolute;
  left: var(--space-lg);
  top: var(--space-lg);
  z-index: 2;
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--c-white);
  padding: var(--space-xxs) var(--space-lg);
  border-radius: var(--radius-sm);
}

/* Meta Info */
.home-prods__meta {
  padding: var(--space-sm) 2px 0;
  min-height: 100px;
}

.home-prods__price {
  font-weight: 800;
  font-family: var(--font-price);
}

.home-prods__price del {
  opacity: 0.55;
  margin-right: var(--space-xxs);
}

.home-prods__rating {
  margin-top: var(--space-xxs);
  font-size: var(--text-xs);
}

.home-prods__name {
  margin-top: var(--space-xxs);
  font-size: var(--text-base);
  line-height: 1.25;
}

/* Scrollbar Interaction */
.home-prods .home-prods__scrollbar {
  position: relative !important;
  height: 4px;
  margin-top: 40px;
  width: min(var(--wrap), calc(100vw - var(--space-3xl)));
  background: rgba(0, 0, 0, 0.05);
  opacity: 0;
  transition: opacity var(--transition-normal);
  margin-left: auto;
  margin-right: auto;
}

.home-prods.is-dragging .home-prods__scrollbar {
  opacity: 1;
}

.home-prods .home-prods__scrollbar .swiper-scrollbar-drag {
  height: 100%;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.60);
}

/* Desktop pagination spacing fix */
.home-prods__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
}

.home-prods__pagination .swiper-pagination-bullet {
  margin: 0;
}

@media (min-width: 901px) {
  .home-prods .home-prods__scrollbar {
    display: none;
  }
}

/* Pagination (Desktop Only) */
.home-prods__pagination {
  position: relative;
  margin-top: var(--space-sm);
  text-align: center;
}

.home-prods__pagination .swiper-pagination-bullet {
  opacity: 0.35;
}

.home-prods__pagination .swiper-pagination-bullet-active {
  opacity: 1;
}

@media (max-width: 900px) {
  .home-prods__pagination {
    display: none !important;
  }
}

/* Desktop Arrows */
@media (min-width: 901px) {
  .home-prods__nav {
    position: absolute;
    z-index: 50;
    top: 350px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.65);
    color: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
  }

  .home-prods__nav::before {
    content: "";
    width: var(--space-sm);
    height: var(--space-sm);
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .home-prods__nav--prev::before {
    transform: rotate(135deg);
    margin-left: var(--space-xxs);
  }

  .home-prods__nav--next::before {
    transform: rotate(-45deg);
    margin-right: var(--space-xxs);
  }

  .home-prods__nav--prev {
    left: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  }

  .home-prods__nav--next {
    right: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  }
}

@media (min-width: 901px) and (hover: hover) {
  .home-prods__nav:hover {
    background: var(--c-red);
    color: var(--c-white);
  }
}

@media (max-width: 900px) {
  .home-prods__nav {
    display: none !important;
  }
}



/* ==========================================================================
   HOME BRANDS GALLERY - 70/30 Split Layout
   ========================================================================== */

.home-brands {
  margin: 80px 0;
}

.home-brands__grid {
  display: grid;
  grid-template-columns: 70% 30%;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 600px;
}

/* First card - takes full left column (both rows) */
.brand-card:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* Second card - top right */
.brand-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

/* Third card - bottom right */
.brand-card:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

/* Brand Card */
.brand-card {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.brand-card__link {
  display: block;
  position: relative;
  text-decoration: none;
  overflow: hidden;
  height: 100%;
}

.brand-card__media {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
}

.brand-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Overlay with button - ALWAYS VISIBLE */
.brand-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
}

.brand-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-card:hover .brand-card__btn {
  background: #000;
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   RESPONSIVE - Tablet & Mobile
   ========================================================================== */

@media (max-width: 1024px) {
  .home-brands {
    margin: 60px 0;
  }

  .home-brands__grid {
    grid-template-columns: 60% 40%;
    height: 500px;
    gap: 6px;
  }

  .brand-card__btn {
    font-size: 14px;
    padding: 12px 24px;
  }
}

@media (max-width: 720px) {
  .home-brands {
    margin: 40px 0;
  }

  .home-brands__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 8px;
    height: auto;
  }

  /* Reset grid positioning for mobile */
  .brand-card:first-child {
    grid-column: 1;
    grid-row: auto;
  }

  .brand-card:nth-child(2) {
    grid-column: 1;
    grid-row: auto;
  }

  .brand-card:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }

  .brand-card__media {
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .brand-card__link {
    height: auto;
  }

  .brand-card__overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  }

  .brand-card__btn {
    font-size: 13px;
    padding: 10px 20px;
  }
}


/* ==========================================================================
   HOME FEATURES - Trust Section
   ========================================================================== */

.home-features {
  margin: 80px 0;
  background: #f5f5f5;
  padding: 60px 0;
}

.home-features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

/* Feature Card */
.feature-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.feature-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

.feature-card__icon svg {
  width: 25px;
  height: 25px;
}

.feature-card__title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #000;
  margin: 0;
  line-height: 1.3;
}

.feature-card__text {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  max-width: 280px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .home-features {
    padding: 50px 0;
    margin: 60px 0;
  }

  .home-features__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .home-features {
    padding: 40px 0;
    margin: 40px 0;
  }

  .home-features__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .feature-card__icon svg {
    width: 25px;
    height: 25px;
  }

  .feature-card__title {
    font-size: 14px;
  }

  .feature-card__text {
    font-size: 13px;
  }
}


/* ==========================================================================
   HOMEPAGE SLIDER - Shop Swatches
   ========================================================================== */

.home-prods .hema-shop-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
}

.home-prods .hema-shop-swatch-image {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--c-border-light);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  pointer-events: auto;
  z-index: 2;
}

.home-prods .hema-shop-swatch-image:hover {
  border-color: var(--c-black);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.home-prods .hema-shop-swatch-image.active {
  border-color: var(--c-black);
  box-shadow: 0 0 0 1px var(--c-black);
}

.home-prods .hema-shop-swatch-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prevent swatches from being draggable by Swiper */
.home-prods .hema-shop-swatches {
  pointer-events: auto;
}

.home-prods .hema-shop-swatch {
  pointer-events: auto;
}

/* Mobile adjustments */
@media (max-width: 720px) {
  .home-prods .hema-shop-swatch-image {
    width: 48px;
    height: 48px;
  }
}