/* ─── Shop home improvements (3-column hero layout) ─── */

/* Scrollable category sidebar — grows with hero, scrolls when many */
.ax-cat-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  max-height: 380px;
}

.ax-cat-list--scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ax-brand) transparent;
}

.ax-cat-list--scroll::-webkit-scrollbar {
  width: 5px;
}

.ax-cat-list--scroll::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.35);
  border-radius: 999px;
}

/* Hero slider — product / shop banner / default background */
.ax-hero-slider {
  isolation: isolate;
}

.ax-slide {
  display: block;
  padding: 0;
}

.ax-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #4c1d95;
  background-image: var(--slide-bg, url('../img/hero-default.svg'));
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 7s ease-out;
}

.ax-slide.active .ax-slide-bg {
  transform: scale(1.04);
}

.ax-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(30, 27, 75, 0.82) 0%, rgba(76, 29, 149, 0.55) 50%, rgba(124, 58, 237, 0.35) 100%);
  pointer-events: none;
}

.ax-slide-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 380px;
  padding: 2rem 2.5rem;
}

.ax-slide-copy .ax-slide-badge {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.ax-slide .ax-slide-copy h2 {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.ax-slide .ax-slide-copy p {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.ax-slide-visual img {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.ax-slide-placeholder {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}

.ax-slide.has-bg .ax-slide-placeholder {
  color: #fff;
}

.ax-slider-dots button {
  background: rgba(255, 255, 255, 0.45);
}

.ax-slider-dots button.active {
  background: #fff;
}

/* ─── Shop by Categories — featured rail ─── */
.ax-categories-section {
  position: relative;
  max-width: var(--ax-max);
  margin: 0 auto 2rem;
  padding: 1.35rem 1rem 1.15rem;
}

.ax-categories-section::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(10, 36, 114, 0.07) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(230, 57, 70, 0.06) 0%, transparent 52%),
    linear-gradient(165deg, #fff 0%, #f8f9fc 48%, var(--ax-purple-soft, #eef2ff) 100%);
  border: 1px solid rgba(10, 36, 114, 0.06);
  box-shadow: 0 8px 40px rgba(10, 36, 114, 0.06);
  z-index: 0;
}

.ax-categories-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ax-categories-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--commerce-coral, #E63946);
  margin-bottom: 0.5rem;
}

.ax-categories-eyebrow::before {
  content: '';
  width: 1.25rem;
  height: 2px;
  background: linear-gradient(90deg, var(--commerce-coral, #E63946), transparent);
  border-radius: 2px;
}

.ax-categories-head h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--commerce-navy, #0A2472);
  line-height: 1.15;
}

.ax-categories-sub {
  margin: 0;
  max-width: 36rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ax-muted, #64748b);
}

.ax-categories-head__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.ax-categories-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--commerce-navy, #0A2472);
  text-decoration: none;
  border: 1.5px solid rgba(10, 36, 114, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.ax-categories-all:hover {
  border-color: var(--commerce-navy, #0A2472);
  background: #fff;
  transform: translateY(-1px);
}

.ax-categories-all i {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.ax-categories-all:hover i {
  transform: translateX(3px);
}

.ax-cat-scroll-nav {
  display: flex;
  gap: 0.35rem;
}

.ax-cat-scroll-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(10, 36, 114, 0.12);
  border-radius: 50%;
  background: #fff;
  color: var(--commerce-navy, #0A2472);
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.ax-cat-scroll-btn:hover {
  background: var(--commerce-navy, #0A2472);
  border-color: var(--commerce-navy, #0A2472);
  color: #fff;
}

.ax-cat-scroll-btn:active {
  transform: scale(0.94);
}

.ax-cat-rail-wrap {
  position: relative;
  z-index: 1;
}

.ax-cat-rail-wrap::before,
.ax-cat-rail-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0.5rem;
  width: 2.5rem;
  z-index: 2;
  pointer-events: none;
}

.ax-cat-rail-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(248, 249, 252, 0.95) 0%, transparent 100%);
}

.ax-cat-rail-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(245, 243, 255, 0.95) 0%, transparent 100%);
}

.ax-cat-grid-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0 -0.25rem;
  padding: 0.2rem 0.25rem 0.45rem;
}

.ax-cat-grid-scroll::-webkit-scrollbar {
  display: none;
}

.ax-cat-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  width: max-content;
  min-width: 100%;
  padding: 0 0.15rem;
}

.ax-cat-card {
  flex: 0 0 132px;
  width: 132px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(10, 36, 114, 0.08);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(10, 36, 114, 0.06);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s, border-color 0.28s;
}

.ax-cat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(10, 36, 114, 0.18);
  box-shadow: 0 8px 24px rgba(10, 36, 114, 0.12);
}

.ax-cat-card__visual {
  position: relative;
  height: 76px;
  overflow: hidden;
  background: var(--cat-bg, linear-gradient(145deg, #0A2472 0%, #1e4a9e 100%));
}

.ax-cat-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ax-cat-card:hover .ax-cat-card__visual img {
  transform: scale(1.08);
}

.ax-cat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 1.45rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ax-cat-card__visual--all {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--commerce-navy, #0A2472) 0%, #12358a 55%, var(--commerce-coral, #E63946) 100%);
  font-size: 1.5rem;
  color: #fff;
}

.ax-cat-card--all {
  border-color: rgba(10, 36, 114, 0.14);
}

/* Rotating accent gradients for categories without images */
.ax-cat-card[data-cat-accent="0"] .ax-cat-card__visual:not(:has(img)) {
  --cat-bg: linear-gradient(145deg, #0A2472 0%, #2a4f9e 100%);
}

.ax-cat-card[data-cat-accent="1"] .ax-cat-card__visual:not(:has(img)) {
  --cat-bg: linear-gradient(145deg, #E63946 0%, #c72535 100%);
}

.ax-cat-card[data-cat-accent="2"] .ax-cat-card__visual:not(:has(img)) {
  --cat-bg: linear-gradient(145deg, #0a2472 0%, #061840 100%);
}

.ax-cat-card[data-cat-accent="3"] .ax-cat-card__visual:not(:has(img)) {
  --cat-bg: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
}

.ax-cat-card[data-cat-accent="4"] .ax-cat-card__visual:not(:has(img)) {
  --cat-bg: linear-gradient(145deg, #d97706 0%, #b45309 100%);
}

.ax-cat-card[data-cat-accent="5"] .ax-cat-card__visual:not(:has(img)) {
  --cat-bg: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
}

.ax-cat-card__body {
  padding: 0.5rem 0.55rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.ax-cat-card__body h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--commerce-navy, #0A2472);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ax-cat-card__body p {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ax-muted, #64748b);
}

.ax-cat-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.3rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--commerce-coral, #E63946);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}

.ax-cat-card__cta i {
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.ax-cat-card:hover .ax-cat-card__cta {
  opacity: 1;
  transform: translateY(0);
}

.ax-cat-card:hover .ax-cat-card__cta i {
  transform: translateX(3px);
}

/* Legacy category scroll (hero sidebar) */
.ax-cat-grid.ax-cat-grid--scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  width: max-content;
  min-width: 100%;
}

.ax-cat-grid--scroll .ax-cat-tile {
  flex: 0 0 130px;
  width: 130px;
}

@media (max-width: 900px) {
  .ax-cat-sidebar {
    display: flex;
    max-height: none;
    min-height: auto;
  }

  .ax-cat-list--scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }

  .ax-cat-list--scroll::-webkit-scrollbar {
    display: none;
  }

  .ax-cat-list--scroll a {
    flex: 0 0 auto;
    white-space: nowrap;
    border-radius: 999px;
    margin: 0 0.25rem;
    padding: 0.5rem 0.85rem;
    background: var(--ax-purple-soft);
    font-size: 0.8rem;
  }

  .ax-slide-inner {
    grid-template-columns: 1fr;
    min-height: 300px;
    padding: 1.5rem;
    text-align: center;
  }

  .ax-slide-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .ax-slide-visual {
    display: none;
  }

  .ax-categories-section {
    padding: 1.1rem 0.85rem 1rem;
  }

  .ax-categories-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ax-categories-head__actions {
    width: 100%;
    justify-content: space-between;
  }

  .ax-cat-scroll-nav {
    display: none;
  }

  .ax-cat-rail-wrap::before,
  .ax-cat-rail-wrap::after {
    width: 1.25rem;
  }

  .ax-cat-card {
    flex: 0 0 118px;
    width: 118px;
  }

  .ax-cat-card__visual {
    height: 68px;
  }

  .ax-cat-card__cta {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .ax-cat-grid--scroll .ax-cat-tile {
    flex: 0 0 110px;
    width: 110px;
  }

  .ax-cat-card {
    flex: 0 0 108px;
    width: 108px;
  }

  .ax-categories-all {
    font-size: 0.78rem;
    padding: 0.5rem 0.85rem;
  }
}
