/* /apparel/apparel.css  (shared across hub + category pages ONLY)
   No hover transforms (no scale/translate) to prevent text wiggle.
   Cards have NO background/rounded corners/shadows — content sits directly on page.
   Swatches sit directly under the image and are FLAT. */
     /* PATCH NOTE (Dec 2025):
     Center-align the info under each product (swatches/title/price/button)
     while keeping the 4-per-row grid and the flat/luxe style. */

/* Breadcrumbs */
.crumbs { margin: 10px 0 12px; color: #6e7690; font-weight: 600; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 6px; }

/* Wide storefront canvas */
.apparel-container {
  width: 100%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

/* Two-column shell */
.apparel-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 12px;
}

/* Sidebar (categories) */
.apparel-sidebar { position: sticky; top: 16px; align-self: start; text-align: left; }
.facet-title { font-size: 1.05rem; font-weight: 800; color: #313849; margin: 4px 0 12px; }
.facet-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* Sidebar links — no underlines, no wiggle */
.facet-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid #e8ebf3;
  cursor: pointer; user-select: none; transition: box-shadow .15s, background .15s;
  text-decoration: none;
}
.facet-item:hover,
.facet-item:focus-within {
  box-shadow: 0 6px 16px rgba(50,60,80,.10);
  text-decoration: none;
}
.facet-item .label { font-weight: 700; color: #2b3348; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.facet-item .count { color: #8b94ad; font-weight: 800; font-size: .95rem; padding-left: 8px; justify-self: end; }
.facet-item.active {
  background: linear-gradient(
    90deg,
    var(--btn-accent-2, color-mix(in srgb, var(--header-bg, #0b3a33) 58%, #000000)) 0%,
    color-mix(in srgb, var(--header-bg, #0b3a33) 55%, #ffffff) 100%
  );
  border-color: transparent;
}
.facet-item.active .label { color: #ffffff; }
.facet-item.active .count { color: var(--btn-accent-ink, #0f1115); }

/* Header row (sort) */
.catalog-header { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-bottom: 14px; }
.catalog-header h2 { font-size: 1.25rem; letter-spacing: -.2px; margin: 0; }
.sort-wrap { display: inline-flex; align-items: center; gap: 8px; color: #6e7690; font-weight: 600; white-space: nowrap; }
.sort-select { font: inherit; border-radius: 8px; border: 1px solid #e0e4f2; padding: 6px 10px; background: #fff; cursor: pointer; }

/* Product grids */
:root {
  --cardW: 280px;
  --gap: 28px;
  --rowPad: 60px;
  --gridNudge: 0px;
}

.featured-grid, .items-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: calc(var(--gap) + var(--rowPad));
  justify-content: stretch;
  align-items: stretch;
  overflow: visible;
  position: relative;
  isolation: isolate;
  margin-top: 27px;
  left: var(--gridNudge);
  max-width: calc((var(--cardW) * 4) + (var(--gap) * 3));
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.featured-grid { margin-bottom: 26px; }

/* Product “card” — backgroundless & flat */
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;    /* no card panel */
  border-radius: 0;           /* no rounded rect */
  box-shadow: none;           /* no shadow */
  overflow: visible;
  transition: none;           /* no hover motion */
  z-index: 0;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.product-card:hover { box-shadow: none; z-index: 0; }

/* Media always square */
.product-media {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: transparent;    /* allow PNG transparency behind image */
  display: grid;
  place-items: center;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;    /* ensure no fill behind transparent PNGs */
}
.product-media .placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #e9ecf6 0 14px, #dfe5f5 14px 28px);
  color: #6c7790;
  font-weight: 700;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}

/* Title, price, button (flat on background) */
/* —— Luxe title: use the luxe display family from global styles */
.product-card a.title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; /* luxe */
  font-weight: 800;            /* bolder */
  font-size: 1.1rem;           /* slightly larger */
  line-height: 1.15;
  color: #2b3348;
  margin: 10px 0 4px;
  padding: 0 14px;
  text-decoration: none;       /* never underlined */
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.product-card a.title:hover { text-decoration: none; }

/* —— Golden pricing (light + dark use CSS vars from styles.css) */
.product-card .price,
.product-card .product-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--price-gold);
  margin: 0 0 6px; /* tightened from 12px */
  padding: 0 14px;
  text-align: center;
}

/* Meta block manages the spacing rhythm for price + button */
.product-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex-grow: 1;
  padding: 0 14px 14px; /* was 16px bottom */
  gap: 8px;             /* predictable gap between price and button */
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Buy button — match gold from /css/main.css */
.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, var(--btn-accent-1), var(--btn-accent-2));
  color: var(--btn-accent-ink);
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--btn-accent-border);

  height: 30px;
  padding: 0 18px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;

  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.18s ease, transform 0.14s ease, filter 0.18s ease;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;

  white-space: nowrap;
  margin: 0 auto;
  align-self: center;
}

.buy-button:hover,
.buy-button:focus {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  transform: translatey(-1px);
  filter: brightness(1.03);
}

/* Divider */
.section-label {
  margin: 28px 0 12px; font-weight: 800; color:#2b3348;
  border-top:1px solid #eceff7; padding-top:16px;
  display:flex; align-items:center; justify-content:space-between;
}

/* Responsive */
@media (max-width: 1250px){ :root { --cardW: 240px; } }
@media (max-width: 1100px){ .featured-grid, .items-grid { grid-template-columns: repeat(3, var(--cardW)); } }
@media (max-width: 900px){
  .apparel-shell { grid-template-columns: 1fr; }
  .apparel-sidebar { position: static; }
  .apparel-container { max-width: 1000px; }
}
@media (max-width: 740px){
  :root { --cardW: 220px; }
  .featured-grid, .items-grid { grid-template-columns: repeat(2, var(--cardW)); }
}
@media (max-width: 480px){
  :root { --cardW: 100%; }
  .featured-grid, .items-grid { grid-template-columns: 1fr; }
}

/* Dark mode tweaks (site bg = true black via /css/darkmode.css) */
body.dark .facet-title{color:#e4e7ff;}
body.dark .facet-item{background:#24253b;border-color:#2f314a;text-decoration:none;}
body.dark .facet-item .label{color:#e9ebff;}
body.dark .facet-item .count{color:#9aa3c7;}
body.dark .sort-wrap{color:#b8bad4;}
body.dark .sort-select{background:#24253b;color:#e9ebff;border-color:#2f314a;}
body.dark .section-label{color:#f4f6fb;border-top-color:#2f314a;}

/* Ensure catalog stays backgroundless on dark mode */
body.dark .product-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #f4f6fb;
}
body.dark .product-media { background: transparent !important; }
body.dark .product-media img { background: transparent !important; }
body.dark .product-card a.title{ color:#f4f6fb; }

/* —— Golden price in dark mode */
body.dark .product-card .price,
body.dark .product-card .product-price{ color: var(--price-gold-dark); }

body.dark .buy-button{
  background: linear-gradient(135deg, #c9b27a, #f3dfb1);
  color: #111111;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #e3cb92;

  height: 30px;
  padding: 0 18px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;

  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.18s ease, transform 0.14s ease, filter 0.18s ease;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;

  white-space: nowrap;
  margin: 0 auto;
  align-self: center;
}

body.dark .buy-button:hover,
body.dark .buy-button:focus{
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  transform: translatey(-1px);
  filter: brightness(1.03);
}

/* ===== Visual Center Nudge (debug helper) ===== */
:root { --centerNudge: 0px; }
.apparel-main { position: relative; left: var(--centerNudge); }
html.show-centerline body::before {
  content: ""; position: fixed; inset: 0; margin: 0 auto; width: 1px;
  background: rgba(255,0,0,.35); pointer-events: none; z-index: 99999;
}

/* --- Color Swatches (flat style under image) --- */
.color-swatches {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  padding: 0 14px;
}
.color-swatches .swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.25);
  background: currentColor;
  box-shadow: none;
  cursor: pointer;
  transition: none;
}
.color-swatches .swatch:hover { transform: none; }
