/* ============================================================
   MERIDA PARK — CATALOG components (category index, category,
   series, product-detail). Builds on styles.css + pages.css.
   ============================================================ */

/* ---------------- CATEGORY / SERIES CARD GRID ---------------- */
.catgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.sergrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.ccard {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.ccard:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 60px -32px rgba(13,26,31,0.25);
  border-color: var(--ink-3);
}
.ccard__visual {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-2);
  position: relative;
}
.ccard__visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.ccard:hover .ccard__visual img { transform: scale(1.05); }
.ccard__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.ccard__title {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
}
.sercard .ccard__title { font-size: 16px; }
.ccard__foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ccard__arrow {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bone);
  transition: transform 0.2s ease;
}
.ccard:hover .ccard__arrow { transform: translate(2px, -2px); }
.ccard__arrow svg { width: 11px; height: 11px; }

/* ---------------- PRODUCT GRID ---------------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}
.pcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -30px rgba(13,26,31,0.28);
  border-color: var(--ink-3);
}
.pcard__visual {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  position: relative;
}
.pcard__visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.pcard:hover .pcard__visual img { transform: scale(1.05); }
.pcard__body {
  padding: 14px 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.pcard__code {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pcard__tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- PRODUCT DETAIL (PDP) ---------------- */
.pdp {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 56px;
  align-items: start;
  padding: 48px 0 8px;
}
.pdp-gallery { position: sticky; top: 100px; }
.pdp-main {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1 / 1;
}
.pdp-main img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.pdp-thumb {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s ease;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb.is-active { border-color: var(--terracotta); border-width: 2px; }

.pdp-info { padding-top: 6px; }
.pdp-info__cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-2);
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pdp-info__cat a { color: var(--muted); }
.pdp-info__cat a:hover { color: var(--ink); }
.pdp-title {
  font-weight: 600;
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0 0 18px;
}
.pdp-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 52ch;
}
.pdp-specs {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 26px;
}
.pdp-specs .spec__row { display: grid; grid-template-columns: 0.8fr 1.2fr; border-top: 1px solid var(--line-soft); }
.pdp-specs .spec__row:first-child { border-top: none; }
.pdp-specs .spec__k, .pdp-specs .spec__v { padding: 12px 18px; }
.pdp-specs .spec__k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); background: var(--bone);
  display: flex; align-items: center;
}
.pdp-specs .spec__v { font-size: 14.5px; color: var(--ink-2); font-weight: 500; }
.pdp-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------- SECTION HEADING for related ---------------- */
.cat-secline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.cat-secline h2 { font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 0; }
.cat-secline span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1080px) {
  .catgrid { grid-template-columns: repeat(2, 1fr); }
  .sergrid { grid-template-columns: repeat(3, 1fr); }
  .pgrid { grid-template-columns: repeat(3, 1fr); }
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .pdp-gallery { position: static; }
}
@media (max-width: 760px) {
  .catgrid { grid-template-columns: 1fr; }
  .sergrid { grid-template-columns: 1fr 1fr; }
  .pgrid { grid-template-columns: 1fr 1fr; }
  .pdp-thumbs { grid-template-columns: repeat(5, 1fr); }
  .pdp-title { font-size: 30px; }
}

/* ---------------- PRODUCT DETAIL — extended specs + gains ---------------- */
.spectable {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
  border-top: 1px solid var(--line);
}
.spectable .srow {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
}
.spectable .sk {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 15px 0;
}
.spectable .sv { font-size: 14.5px; color: var(--ink-2); font-weight: 500; padding: 15px 0; }

.gains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.gain {
  background: var(--paper);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gain__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bone);
  color: var(--moss-2);
}
.gain__icon::after { content: ""; position: absolute; }
.gain__icon svg { width: 22px; height: 22px; }
.gain__title { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; margin: 0; line-height: 1.2; }
.gain__desc { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0; }

@media (max-width: 1080px) {
  .spectable { grid-template-columns: 1fr; gap: 0; }
  .gains { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .gains { grid-template-columns: 1fr; }
}
