/* Collections — Flavour Atelier storefront (aligned to DESIGN.md) */

.collection-storefront {
  --cream: #FCEDBB;
  --red: #FF000A;
  --red-deep: #CC0008;
  --text-dark: #1A1A1A;
  --text-muted: #5A4A28;
  background: var(--cream);
  color: var(--text-dark);
}

.collection-storefront ::selection {
  background: rgba(255, 0, 10, 0.18);
  color: var(--text-dark);
}

.collection-storefront .collections-page {
  width: min(100% - 2.5rem, 1400px);
  margin: 0 auto;
  padding: 1.5rem 0 4.5rem;
}

/* ── Hero: photography + editorial copy ── */
.collection-storefront .collection-hero-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  margin: 0 0 2.25rem;
}

.collection-storefront .collection-hero-row.is-switching {
  animation: collection-panel-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.collection-storefront .collection-hero-frame {
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  background: #fff8e6;
}

.collection-storefront .collection-hero {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center 48%;
  border-radius: 0;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.collection-storefront .collection-hero-frame:hover .collection-hero {
  transform: scale(1.03);
}

.collection-storefront .collection-intro {
  padding-right: 0.5rem;
  max-width: 28rem;
}

.collection-storefront .collection-title {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.collection-storefront .collection-intro > p:not(.collection-set-meta) {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 36ch;
}

.collection-storefront .collection-intro > .collection-set-meta {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.9;
  color: var(--red);
  margin-top: 1.35rem;
  max-width: none;
}

.collection-storefront .collection-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  padding: 1rem 2.4rem;
  border: none;
  border-radius: 999px;
  background: var(--text-dark);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.collection-storefront .collection-cta:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.collection-storefront .collection-cta:active {
  transform: translateY(0) scale(0.98);
}

/* ── Collection tabs ── */
.collection-storefront .collection-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: 0 0 2.5rem;
}

.collection-storefront .collection-tab {
  min-width: 9.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid rgba(255, 0, 10, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--red);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease,
    box-shadow 0.22s ease, transform 0.18s ease;
}

.collection-storefront .collection-tab:hover {
  background: rgba(255, 0, 10, 0.06);
}

.collection-storefront .collection-tab:active {
  transform: scale(0.98);
}

.collection-storefront .collection-tab.is-active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 8px 22px rgba(255, 0, 10, 0.18);
}

.collection-storefront :focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ── Flavour grid ── */
.collection-storefront .flavour-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

.collection-storefront .flavour-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.collection-storefront .flavour-card[hidden] {
  display: none;
}

.collection-storefront .flavour-card.is-entering {
  animation: flavour-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.collection-storefront .flavour-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 52%;
  display: block;
  border-radius: 1rem;
  background: #fff8e6;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s ease;
}

.collection-storefront .flavour-card:hover img {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(255, 0, 10, 0.1);
}

.collection-storefront .flavour-card-body {
  padding: 1rem 0.15rem 0.25rem;
}

.collection-storefront .flavour-card h2 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  min-height: 0;
  margin-bottom: 0.35rem;
}

.collection-storefront .flavour-card-body p {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  min-height: 0;
}

/* ── Ingredients details ── */
.collection-storefront .collection-details {
  margin-top: 3.5rem;
  background: var(--white, #fff);
  border-radius: 1.15rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  font-family: var(--font-sans);
  color: var(--text-dark);
}

.collection-storefront .collection-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.75rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-deep);
  border-radius: 1.15rem;
}

.collection-storefront .collection-details summary::-webkit-details-marker {
  display: none;
}

.collection-storefront .collection-details summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.2rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.collection-storefront .collection-details[open] summary {
  border-radius: 1.15rem 1.15rem 0 0;
}

.collection-storefront .collection-details[open] summary::after {
  transform: translateY(0.12rem) rotate(225deg);
}

.collection-storefront .collection-details summary:hover {
  color: var(--text-dark);
}

.collection-storefront .collection-details summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -6px;
}

.collection-storefront .collection-details-body {
  padding: 0.25rem 1.75rem 1.75rem;
}

.collection-storefront .collection-details-copy {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) minmax(0, 62ch);
  gap: 0.85rem 2.5rem;
  align-items: start;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 0, 10, 0.14);
}

.collection-storefront .collection-details h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text-dark);
}

.collection-storefront .collection-ingredients {
  margin: 0;
  max-width: 62ch;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
}

.collection-storefront .collection-allergens {
  grid-column: 2;
  margin: 0.35rem 0 0;
  max-width: 62ch;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-dark);
}

.collection-storefront .collection-manufacturer {
  margin: 1.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.collection-storefront .floating-contact {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.collection-storefront [data-collection-panel][hidden] {
  display: none;
}

@keyframes collection-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes flavour-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .collection-storefront .collection-hero-row.is-switching,
  .collection-storefront .flavour-card.is-entering {
    animation: none;
  }

  .collection-storefront .collection-hero,
  .collection-storefront .flavour-card img,
  .collection-storefront .collection-cta,
  .collection-storefront .collection-tab,
  .collection-storefront .collection-details summary::after {
    transition: none;
  }

  .collection-storefront .collection-hero-frame:hover .collection-hero,
  .collection-storefront .flavour-card:hover img,
  .collection-storefront .collection-cta:hover {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .collection-storefront .flavour-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (max-width: 900px) {
  .collection-storefront .collection-hero-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .collection-storefront .collection-intro > p:not(.collection-set-meta) {
    font-size: 0.95rem;
  }
}

@media (max-width: 700px) {
  .collection-storefront .collections-page {
    width: min(100% - 2rem, 1400px);
    padding: 0.75rem 0 3.5rem;
  }

  .collection-storefront .collection-hero-row {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    margin: 0 0 1.75rem;
  }

  .collection-storefront .collection-intro {
    padding: 0 0.25rem;
    max-width: none;
    text-align: center;
  }

  .collection-storefront .collection-intro > p:not(.collection-set-meta) {
    margin-inline: auto;
  }

  .collection-storefront .collection-title {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .collection-storefront .collection-cta {
    width: 100%;
    max-width: 20rem;
  }

  .collection-storefront .collection-tabs {
    gap: 0.5rem;
    margin-bottom: 1.75rem;
  }

  .collection-storefront .collection-details {
    margin-top: 2.25rem;
  }

  .collection-storefront .collection-details summary,
  .collection-storefront .collection-details-body {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .collection-storefront .collection-details-copy {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .collection-storefront .collection-allergens {
    grid-column: 1;
    margin-top: 0.45rem;
  }

  .collection-storefront .collection-tab {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.65rem 1rem;
    font-size: 0.68rem;
  }

  .collection-storefront .flavour-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .collection-storefront .flavour-card h2 {
    font-size: 0.88rem;
  }

  .collection-storefront .flavour-card-body p {
    font-size: 0.78rem;
  }

  .collection-storefront .flavour-card:hover img {
    transform: none;
  }
}
