/* ==========================================================================
   Apparel Catalog page — extends style.css / base.css tokens
   ========================================================================== */

/* ---- Hero ---- */
.catalog-hero {
  padding-top: clamp(7rem, 14vw, 9.5rem);
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}
.catalog-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  transition: color var(--transition-interactive), gap var(--transition-interactive);
}
.catalog-back-link:hover {
  color: var(--color-primary);
  gap: var(--space-3);
}
.catalog-hero .badge-soon {
  margin-bottom: var(--space-5);
}
.catalog-hero .section-label {
  margin-bottom: var(--space-5);
}
.catalog-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--color-text);
  max-width: 18ch;
  margin-bottom: var(--space-6);
}
.catalog-title em {
  font-style: normal;
  color: var(--color-primary);
}
.catalog-desc {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 58ch;
  margin-bottom: var(--space-8);
}
.catalog-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ---- Gallery ---- */
.catalog-gallery {
  padding-top: 0;
}

/* ---- Category quick-nav ---- */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-bottom: clamp(var(--space-8), 4vw, var(--space-12));
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
  border-bottom: 1px solid var(--color-divider);
}
.category-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full, 999px);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color var(--transition-interactive), border-color var(--transition-interactive), background var(--transition-interactive);
  white-space: nowrap;
}
.category-pill:hover,
.category-pill:focus-visible {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-surface-hover, var(--color-surface));
}

/* ---- Product category groups ---- */
.product-category {
  padding-bottom: clamp(var(--space-14), 6vw, var(--space-20));
  scroll-margin-top: 6.5rem;
}
.product-category-head {
  margin-bottom: clamp(var(--space-6), 3vw, var(--space-8));
}
.product-category-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}
.product-category-head p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 60ch;
}

/* ---- Sub-collection dividers within a combined product category (e.g. Hats) ---- */
.hats-subgroup-head {
  margin: clamp(var(--space-8), 4vw, var(--space-10)) 0 var(--space-4);
  padding-top: clamp(var(--space-6), 3vw, var(--space-8));
  border-top: 1px solid var(--color-border);
}
.product-category .hats-subgroup-head:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.hats-subgroup-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  line-height: 1.2;
}
.hats-subgroup-head p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 60ch;
}

/* ---- Product grid & cards ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.product-grid--wide {
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 640px) {
  .product-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .product-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}
.product-grid--wide .product-card-media {
  aspect-ratio: 2.57 / 1;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.product-card-media {
  position: relative;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  background: #000;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  flex: 1;
}
.product-card-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.25;
}
.product-card-body p {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
  margin-bottom: var(--space-2);
  flex: 1;
  overflow-wrap: break-word;
  word-break: break-word;
}
.product-card-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-primary);
  margin: 0;
}
.product-order-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: auto;
  transition: gap var(--transition-interactive);
}
.product-order-link:hover {
  gap: var(--space-2);
}
.product-order-link svg {
  flex-shrink: 0;
}

/* ---- Ready-to-ship badge: item already carries the Oberlin logo ---- */
.product-card-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(10, 8, 6, 0.72);
  backdrop-filter: blur(4px);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Buy Now (instant checkout) + Add to Cart (customize) actions ---- */
.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: auto;
}
.product-card-actions .product-order-link {
  margin-top: 0;
  justify-content: center;
}
.shop-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #16130c;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  transition:
    background var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive),
    opacity var(--transition-interactive);
}
.shop-add-btn:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}
.shop-add-btn:active {
  transform: translateY(0);
}
.shop-add-btn:disabled,
.shop-add-btn.is-loading {
  opacity: 0.65;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.shop-add-btn.is-added {
  background: var(--color-success, #2f8f4e);
  border-color: var(--color-success, #2f8f4e);
  color: #fff;
}
.shop-add-btn svg {
  flex-shrink: 0;
}

/* ---- Product option selector (e.g. engraving style) ---- */
.product-option {
  margin: var(--space-1) 0 var(--space-2);
}
.product-option-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}
.product-option-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  appearance: auto;
  cursor: pointer;
  transition: border-color var(--transition-interactive);
}
.product-option-select:focus {
  outline: none;
  border-color: var(--color-primary);
}
.product-option-select:hover {
  border-color: var(--color-primary);
}
.product-option-hint {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  line-height: 1.35;
  margin: var(--space-1) 0 0;
}

/* ---- CTA ---- */
.catalog-cta {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}
.catalog-cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.catalog-cta-inner .section-label {
  justify-content: center;
}
.catalog-cta-inner .section-label::before {
  display: none;
}
.catalog-cta-inner .section-title {
  max-width: 26ch;
  margin-bottom: var(--space-4);
}
.catalog-cta-inner p {
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}
.catalog-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}
