/**
 * Collection / category listing pages
 */

.page-collection {
  --home-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --home-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --home-primary: #589fdc;
  --home-primary-deep: #3a7db5;
  --home-primary-glow: rgba(88, 159, 220, 0.22);
  --home-secondary: #d6534e;
  --home-ink: #0f1c2e;
  --home-muted: #5f6d82;
  --home-cream: #fafbfd;
  --home-white: #ffffff;
  --home-line: rgba(15, 28, 46, 0.08);
  --home-radius: 1.125rem;
  --home-shadow: 0 20px 50px rgba(15, 28, 46, 0.1);
}

body.page-collection,
body.page-collection .collection {
  font-family: var(--home-body);
  color: var(--home-ink);
  background: var(--home-cream);
}

body.page-collection .site-header {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: var(--home-line);
}

body.page-collection .site-nav__link,
body.page-collection .site-nav__trigger,
body.page-collection .site-nav__cta,
body.page-collection .site-nav__submenu-link,
body.page-collection .site-header__cta,
body.page-collection .site-header__account,
body.page-collection .site-header__cart {
  font-family: var(--home-body);
}

.page-collection .site-main {
  padding-bottom: 2rem;
}

/* ── Layout ──────────────────────────────────────────────── */
.collection {
  padding: 1.5rem 0 3rem;
}

.collection__breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--home-muted);
}

.collection__breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--home-line);
}

.collection__breadcrumb a {
  color: var(--home-muted);
  text-decoration: none;
}

.collection__breadcrumb a:hover {
  color: var(--home-primary-deep);
}

.collection__hero {
  margin-bottom: 1.5rem;
}

.collection__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--home-secondary);
}

.collection__title {
  margin: 0;
  font-family: var(--home-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.collection__intro {
  margin: 0.85rem 0 0;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--home-muted);
}

.collection__cats {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.collection__cats::-webkit-scrollbar {
  display: none;
}

.collection__cat {
  flex-shrink: 0;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: var(--home-white);
  color: var(--home-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.collection__cat:hover,
.collection__cat.is-active {
  border-color: rgba(88, 159, 220, 0.35);
  background: rgba(88, 159, 220, 0.1);
  color: var(--home-primary-deep);
}

.collection__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.collection__empty {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--home-line);
  border-radius: var(--home-radius);
  background: var(--home-white);
}

.collection__empty h2 {
  margin: 0 0 0.5rem;
  font-family: var(--home-display);
  font-size: 1.5rem;
}

.collection__empty p {
  margin: 0 0 1.25rem;
  color: var(--home-muted);
}

.collection__seo {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--home-line);
}

.collection__seo-inner {
  width: 100%;
  max-width: none;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--home-muted);
}

.collection__seo-inner h2 {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--home-display);
  font-size: 1.25rem;
  color: var(--home-ink);
}

.collection__seo-inner h2:first-child {
  margin-top: 0;
}

.collection__seo-inner p {
  margin: 0 0 1rem;
}

.collection__seo-inner a {
  color: var(--home-primary-deep);
}

.collection__seo-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--home-line);
}

.collection__help {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  background: linear-gradient(135deg, rgba(88, 159, 220, 0.08), rgba(255, 255, 255, 0.9));
}

.collection__help-title {
  margin: 0 0 0.5rem;
  font-family: var(--home-display);
  font-size: 1.35rem;
  line-height: 1.25;
}

.collection__help-text {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.6;
}

.collection__help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.collection__trust {
  margin-top: 1.5rem;
}

.collection__trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.collection__trust-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  background: var(--home-white);
}

.collection__trust-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--home-primary-deep);
  background: rgba(88, 159, 220, 0.12);
}

.collection__trust-label {
  margin: 0 0 0.2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--home-ink);
}

.collection__trust-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--home-muted);
}

.collection__confidence {
  margin-top: 2.5rem;
}

.collection__confidence-panel {
  position: relative;
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 1.5rem;
  border-radius: var(--home-radius);
  background: linear-gradient(135deg, #152536 0%, #1e3348 52%, #243f58 100%);
  color: #fff;
  box-shadow: 0 24px 56px rgba(15, 28, 46, 0.16);
  overflow: hidden;
  text-align: center;
}

.collection__confidence-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 100% 40%,
    rgba(214, 83, 78, 0.2),
    transparent 68%
  );
  pointer-events: none;
}

.collection__confidence-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--home-secondary), rgba(232, 146, 143, 0.55));
}

.collection__confidence-mark,
.collection__confidence-body,
.collection__confidence-actions {
  position: relative;
  z-index: 1;
}

.collection__confidence-mark {
  position: relative;
  width: 5.25rem;
  height: 5.25rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.collection__confidence-mark-ring {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(214, 83, 78, 0.42);
  border-radius: 50%;
}

.collection__confidence-mark-value {
  font-family: var(--home-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.collection__confidence-mark-label {
  max-width: 4.5rem;
  margin-top: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.82);
}

.collection__confidence-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0a9a6;
}

.collection__confidence-title {
  margin: 0 0 0.75rem;
  font-family: var(--home-display);
  font-size: 1.5rem;
  line-height: 1.2;
}

.collection__confidence-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.collection__confidence-reviews {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.78);
}

.collection__confidence-reviews .stars {
  color: #f0b429;
  font-size: 0.875rem;
}

.collection__confidence-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.collection__confidence-policy {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.collection__confidence-policy:hover {
  color: #fff;
}

.collection__explore {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--home-line);
}

.collection__explore-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.collection__explore-all {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--home-primary-deep);
  text-decoration: none;
}

.collection__explore-all:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.collection__explore-title {
  margin: 0 0 0.35rem;
  font-family: var(--home-display);
  font-size: 1.35rem;
}

.collection__explore-desc {
  margin: 0;
  color: var(--home-muted);
}

.collection__explore-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.collection__explore-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  background: var(--home-white);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.collection__explore-card:hover {
  border-color: rgba(88, 159, 220, 0.35);
  box-shadow: var(--home-shadow);
  transform: translateY(-2px);
}

.collection__explore-media {
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  background: linear-gradient(160deg, #f0f7fc 0%, #fff 60%);
}

.collection__explore-media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.collection__explore-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.collection__explore-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--home-ink);
}

.collection__explore-summary {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--home-muted);
}

.collection__explore-link {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--home-primary-deep);
}

/* ── Buttons ─────────────────────────────────────────────── */
.page-collection .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.page-collection .btn--primary {
  background: linear-gradient(
    135deg,
    var(--home-primary),
    var(--home-primary-deep)
  );
  color: #fff;
  box-shadow: 0 8px 24px rgba(88, 159, 220, 0.28);
}

.page-collection .btn--ghost {
  background: var(--home-white);
  color: var(--home-ink);
  border: 1px solid var(--home-line);
  box-shadow: none;
}

.page-collection .btn--ghost:hover {
  border-color: rgba(88, 159, 220, 0.35);
  color: var(--home-primary-deep);
}

.page-collection .btn--confidence {
  background: #fff;
  color: var(--home-ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.page-collection .btn--confidence:hover {
  background: #f4f8fc;
}

/* ── Product cards (grid) ────────────────────────────────── */
.page-collection .product-card {
  display: flex;
  flex-direction: column;
  background: var(--home-white);
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.page-collection .product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--home-shadow);
}

.page-collection .product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: linear-gradient(160deg, #f0f7fc 0%, #fff 60%);
}

.page-collection .product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.85rem;
}

.page-collection .product-card__badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--home-secondary);
  border-radius: 999px;
}

.page-collection .product-card__badge--sale {
  background: var(--home-primary);
}

.page-collection .product-card__body {
  padding: 0.85rem 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.page-collection .product-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.page-collection .product-card__title a {
  color: inherit;
  text-decoration: none;
}

.page-collection .product-card__rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-collection .product-card__rating .stars {
  color: #f0b429;
  font-size: 0.75rem;
}

.page-collection .product-card__review-count {
  font-size: 0.6875rem;
  color: var(--home-muted);
}

.page-collection .product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.page-collection .product-card__price {
  font-size: 1rem;
  font-weight: 800;
}

.page-collection .product-card__price--sale {
  color: var(--home-secondary);
}

.page-collection .product-card__price-old {
  font-size: 0.75rem;
  color: var(--home-muted);
  text-decoration: line-through;
}

.page-collection .product-card__stock {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--home-secondary);
}

/* ── 404 ─────────────────────────────────────────────────── */
.page-error .error-page {
  padding: 4rem 0 5rem;
  text-align: center;
}

.page-error .error-page__code {
  margin: 0;
  font-size: 4rem;
  font-weight: 800;
  color: var(--home-primary, #589fdc);
}

.page-error .error-page__title {
  margin: 0.5rem 0;
  font-family: var(--home-display, Georgia, serif);
}

.page-error .error-page__text {
  margin: 0 0 1.5rem;
  color: var(--home-muted, #5f6d82);
}

@media (min-width: 640px) {
  .collection {
    padding-top: 2rem;
  }

  .collection__help {
    grid-template-columns: 1.2fr auto;
    align-items: center;
  }

  .collection__help-actions {
    justify-content: flex-end;
  }

  .collection__trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection__confidence-panel {
    grid-template-columns: auto 1fr auto;
    text-align: left;
  }

  .collection__confidence-mark {
    margin-inline: 0;
  }

  .collection__confidence-reviews {
    justify-content: flex-start;
  }

  .collection__confidence-actions {
    align-items: flex-end;
  }

  .collection__explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .page-collection .product-card__title {
    font-size: 0.875rem;
  }
}

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

  .collection__explore-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
