/* =============================================================================
   CATEGORY HERO — full-bleed banner for standard (non-DYO) category pages
   ============================================================================= */

.store-cat-hero {
  position: relative;
  min-height: 50svh;
  max-height: 70svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-black);
  /* Full-bleed: escape any Astra content wrapper */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* When no thumbnail is set — slim text-only header instead */
.store-cat-hero--no-image {
  min-height: 0;
  background: var(--color-off-white);
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--color-sand);
}

.store-cat-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.store-cat-hero__overlay {
  position: absolute;
  inset: 0;
  /* Stronger gradient at bottom so text reads over any image */
  background: linear-gradient(to top, rgba(26, 26, 26, 0.70) 0%, rgba(26, 26, 26, 0.15) 55%, transparent 100%);
  z-index: 1;
}

.store-cat-hero__content {
  position: relative;
  z-index: 2;
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  width: 100%;
}

.store-cat-hero__title {
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  color: var(--color-white);
  margin: 0 0 var(--space-3);
}

.store-cat-hero--no-image .store-cat-hero__title {
  color: var(--color-black);
}

.store-cat-hero__desc {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
  margin: 0;
  line-height: var(--leading-body);
}

.store-cat-hero--no-image .store-cat-hero__desc {
  color: var(--color-gray);
}

@media (min-width: 768px) {
  .store-cat-hero {
    min-height: 55svh;
    max-height: 65svh;
  }
}

/* Breadcrumb colours flip to white on image backgrounds */
.store-cat-hero:not(.store-cat-hero--no-image) .store-breadcrumb,
.store-cat-hero:not(.store-cat-hero--no-image) .store-breadcrumb a,
.store-cat-hero:not(.store-cat-hero--no-image) .store-breadcrumb span {
  color: rgba(255, 255, 255, 0.75);
}

.store-cat-hero:not(.store-cat-hero--no-image) .store-breadcrumb a:hover {
  color: var(--color-white);
}

/* =============================================================================
   SUBCATEGORY IMAGE TILES — shown when subcats have thumbnails
   ============================================================================= */

.store-subcat-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: var(--space-8);
  margin-bottom: var(--space-6);
}

@media (min-width: 480px) {
  .store-subcat-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .store-subcat-tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .store-subcat-tiles {
    /* Up to 5 columns when many subcategories exist */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.store-subcat-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.store-subcat-tile__image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-cream);
}

.store-subcat-tile__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-default);
}

@media (prefers-reduced-motion: no-preference) {
  .store-subcat-tile:hover .store-subcat-tile__image {
    transform: scale(1.05);
  }
}

.store-subcat-tile__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-sand);
}

.store-subcat-tile__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.60) 0%, transparent 55%);
  transition: background var(--duration-normal) var(--ease-default);
}

@media (prefers-reduced-motion: no-preference) {
  .store-subcat-tile:hover .store-subcat-tile__overlay {
    background: linear-gradient(to top, rgba(26, 26, 26, 0.72) 0%, transparent 55%);
  }
}

.store-subcat-tile__name {
  position: absolute;
  bottom: var(--space-3);
  left: 0;
  right: 0;
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-white);
  text-align: center;
  padding: 0 var(--space-2);
  z-index: 1;
  line-height: var(--leading-tight);
}

/* =============================================================================
   PRODUCT GRID — SHOP ARCHIVE
   ============================================================================= */

.store-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.75rem, 2vw, 2rem);
  list-style: none;
  padding: 0;
  margin: 0;
  padding-bottom: var(--space-6);
}

@media (min-width: 1024px) {
  .store-product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =============================================================================
   PRODUCT CARD
   ============================================================================= */

.store-product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.store-product-card__image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-cream);
  margin-bottom: var(--space-2);
}

.store-product-card__image,
.store-product-card__image--hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-product-card__image--hover {
  opacity: 0;
}

/* Hover crossfade — desktop only, respects reduced motion */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .store-product-card:hover .store-product-card__image--hover {
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  .store-product-card:hover .store-product-card__image--primary {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

/* Wishlist heart — circular dark-bg icon, top-right of card image */
.store-product-card__wishlist {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50% !important; /* override global button { border-radius: 0 !important } Astra reset */
  background: rgba(26, 26, 26, 0.6);
  border: none !important; /* override Astra parent theme border on <button> */
  box-shadow: none !important; /* override Astra parent theme box-shadow on <button> */
  cursor: pointer;
  padding: 0;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background var(--duration-fast) var(--ease-default);
}

/* Hover — scoped to pointer devices; prevents sticky tap-hover on touch screens */
@media (hover: hover) {
  .store-product-card__wishlist:hover {
    background: var(--color-gold);
    color: var(--color-white) !important; /* override Astra button:hover color */
  }
}

/* Active press — gold bg applies on both touch and pointer */
.store-product-card__wishlist:active {
  background: var(--color-gold);
}

/* Unwishlisted press — white filled heart previews the about-to-be-wishlisted state */
.store-product-card__wishlist:not(.is-active):active svg path {
  fill: currentColor;
  stroke: currentColor;
}

/* Keyboard focus ring only */
.store-product-card__wishlist:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  opacity: 1;
}

/* Suppress pointer-click focus styling — btn.blur() in JS handles this instantly,
   but this rule is a safety net for any edge case where focus lingers */
.store-product-card__wishlist:focus:not(:focus-visible) {
  background: rgba(26, 26, 26, 0.6) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Badge positioning on card */
.store-product-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
}

/* Card text info */
.store-product-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: var(--space-2);
}

.store-product-card__name {
  font-family: var(--font-serif);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: var(--weight-light);
  color: var(--color-black);
  line-height: var(--leading-tight);
  margin: 0;
}

.store-product-card__variant {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-light);
  color: var(--color-gray);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-product-card__price {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  font-weight: var(--weight-medium);
  color: var(--color-black);
  margin: 0;
}

.store-product-card__price-from {
  font-weight: var(--weight-light);
  color: var(--color-gray);
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store-product-card__price del {
  color: var(--color-light-gray);
  font-weight: var(--weight-regular);
  margin-right: var(--space-2);
}

.store-product-card__price ins {
  text-decoration: none;
  color: var(--color-error);
}

/* =============================================================================
   BREADCRUMB
   ============================================================================= */

.store-breadcrumb {
  padding: var(--space-4) 0 var(--space-3);
}

.store-breadcrumb .woocommerce-breadcrumb {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
  letter-spacing: var(--tracking-wide);
}

.store-breadcrumb .woocommerce-breadcrumb a {
  color: var(--color-gray);
  text-decoration: none;
  transition: color 0.2s ease;
}

.store-breadcrumb .woocommerce-breadcrumb a:hover {
  color: var(--color-gold);
}

.store-breadcrumb .woocommerce-breadcrumb a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Separator between breadcrumb items */
.store-breadcrumb .woocommerce-breadcrumb span[aria-hidden] {
  color: var(--color-light-gray);
  margin: 0 var(--space-2);
}

/* =============================================================================
   FILTER BAR — SHOP ARCHIVE
   ============================================================================= */

.store-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-7);
  border-bottom: 1px solid var(--color-sand);
  /* Hide scrollbar visually but keep functionality */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.store-filter-bar::-webkit-scrollbar {
  display: none;
}

.store-filter-bar__btn {
  flex-shrink: 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-gray);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  transition: color var(--duration-fast) var(--ease-default);
  border-bottom: 2px solid transparent;
}

.store-filter-bar__btn.is-active,
.store-filter-bar__btn:hover {
  color: var(--color-black);
  border-bottom-color: var(--color-gold);
}

.store-filter-bar__btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Sort/results strip */
.store-archive-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.store-archive-count {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-gray);
}

/* =============================================================================
   SHOP — DESIGN YOUR OWN: HERO BANNER
   Used on both the DYO parent page and each DYO subcategory page.
============================================================================= */

.store-dyo-hero {
  position: relative;
  min-height: clamp(240px, 35vw, 480px);
  display: flex;
  align-items: flex-end;
  background-color: var(--color-charcoal);
  background-image: var(--dyo-hero-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Scrim — ensures text is always legible regardless of image content */
.store-dyo-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 26, 0.72) 0%,
    rgba(26, 26, 26, 0.18) 60%,
    transparent 100%
  );
  pointer-events: none;
}

.store-dyo-hero__inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* Breadcrumb inside hero — override default dark colour */
.store-dyo-hero__inner .store-breadcrumb,
.store-dyo-hero__inner .store-breadcrumb a,
.store-dyo-hero__inner .breadcrumb,
.store-dyo-hero__inner .breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.store-dyo-hero__inner .store-breadcrumb a:hover,
.store-dyo-hero__inner .breadcrumb a:hover {
  color: #fff;
}

.store-dyo-hero__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold-light);
  margin: 0 0 0.5rem;
}

.store-dyo-hero__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.store-dyo-hero__tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 52ch;
}

.store-dyo-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Ghost button on dark hero background — required override per design-system rules */
.store-dyo-hero__actions .store-btn-ghost {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
}

.store-dyo-hero__actions .store-btn-ghost:hover,
.store-dyo-hero__actions .store-btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

/* When no hero image is set — use a warm gradient fallback */
.store-dyo-hero:not([style]) {
  background: linear-gradient(135deg, var(--color-charcoal) 0%, #2e2520 100%);
}

/* =============================================================================
   SHOP — DESIGN YOUR OWN: SHOWCASE GRID (parent category page)
============================================================================= */

.store-dyo-showcase {
  padding: 0 0 clamp(2.5rem, 7vw, 5rem);
  background: var(--color-off-white);
}

.store-dyo-showcase__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .store-dyo-showcase__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .store-dyo-showcase__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.store-dyo-showcase__card {
  background: var(--color-white);
}

.store-dyo-showcase__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.store-dyo-showcase__link:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.store-dyo-showcase__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-cream);
}

.store-dyo-showcase__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.store-dyo-showcase__link:hover .store-dyo-showcase__image-wrap img {
  transform: scale(1.04);
}

.store-dyo-showcase__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-sand);
}

.store-dyo-showcase__body {
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
}

.store-dyo-showcase__name {
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 300;
  color: var(--color-black);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.store-dyo-showcase__tagline {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-gray);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.store-dyo-showcase__from {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-charcoal);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store-dyo-showcase__price {
  color: var(--color-gold);
  font-weight: 500;
}

/* =============================================================================
   SHOP — DESIGN YOUR OWN: HOW IT WORKS STRIP
============================================================================= */

.store-dyo-steps {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--color-sand);
}

/* Child page variant gets slightly less top padding (sits below hero) */
.store-dyo-steps--child {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* ── Accordion summary (visible on mobile, hidden at 768px+) ── */
.store-dyo-steps__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  margin: 0 0 1.25rem;
  cursor: pointer;
  list-style: none;
  -webkit-appearance: none;
  min-height: 44px; /* touch target */
}

/* Remove UA disclosure triangle in all browsers */
.store-dyo-steps__summary::-webkit-details-marker { display: none; }

/* Animated chevron */
.store-dyo-steps__summary::after {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.15em);
  transition: transform 0.2s ease;
}

.store-dyo-steps__details[open] .store-dyo-steps__summary::after {
  transform: rotate(-135deg) translateY(0.05em);
}

.store-dyo-steps__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  list-style: none;
  padding: 0;
  margin: 0;
}

.store-dyo-steps__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  /* JS forces open attribute at this breakpoint — summary can be hidden */
  .store-dyo-steps__summary {
    display: none;
  }

  .store-dyo-steps__list {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-dyo-steps__item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.store-dyo-steps__number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-gold);
  color: #fff;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.store-dyo-steps__body {
  flex: 1;
}

.store-dyo-steps__title {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: 0.3rem;
}

.store-dyo-steps__desc {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-gray);
  margin: 0;
  line-height: 1.6;
}


/* Infinite scroll sentinel + spinner */
.store-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-9);
}

.store-load-more-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 48px;
}

.store-load-more-sentinel::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-sand);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.store-load-more-sentinel.is-loading::after {
  opacity: 1;
  animation: store-spin 0.8s linear infinite;
}

@keyframes store-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .store-load-more-sentinel.is-loading::after {
    animation: none;
    opacity: 0.4;
  }
}
