/* ==========================================================================
   Catalogue, product cards and the product detail page
   ========================================================================== */

/* -------------------------------------------------------- Breadcrumbs -- */

.breadcrumbs {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.breadcrumbs li { display: flex; align-items: center; gap: .45rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--teal-300); }
.breadcrumbs a { color: var(--teal-600); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

/* -------------------------------------------------------- Product grid -- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-card:hover {
  border-color: var(--teal-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-media {
  position: relative;
  display: block;
  background: var(--teal-50);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .card-img { transform: scale(1.04); }

.card-media .badge { position: absolute; top: .8rem; left: .8rem; }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.4rem 1.5rem 1.6rem;
}

.card-title { margin: 0 0 .3rem; font-size: 1.22rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--teal-600); }

.card-alt-name {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 .8rem;
  letter-spacing: .02em;
}

.card-summary {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--body);
  margin: 0 0 .9rem;
}

.card-meta {
  font-size: .76rem;
  color: var(--muted);
  letter-spacing: .03em;
  margin: 0 0 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line-soft);
}

.card-price { margin: 0 0 1.1rem; font-size: .95rem; }
.card-price .from { color: var(--muted); font-size: .78rem; margin-right: .3rem; }
.card-price strong { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 500; color: var(--teal-700); }

.card-body .btn { margin-top: auto; align-self: flex-start; }

/* ----------------------------------------------------- Catalogue page -- */

.catalog-body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3.5rem, 8vw, 6rem);
}

.catalog-group + .catalog-group {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.catalog-group h2 { margin-bottom: .5rem; }
.group-lead { color: var(--muted); max-width: 62ch; margin-bottom: 2rem; }

/* ---------------------------------------------------- Product detail -- */

.product-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
}

.product-detail {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* Gallery */
.gallery { position: sticky; top: calc(var(--header-h) + 1.25rem); }

.gallery-main {
  background: var(--teal-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.gallery-hero { width: 100%; height: 100%; object-fit: contain; }

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .85rem;
}
.thumb {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--teal-50);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .16s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--teal-400); }
.thumb.active { border-color: var(--teal-500); box-shadow: 0 0 0 1px var(--teal-500); }

/* Buy panel */
.buy-panel h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: .35rem; }
.product-alt-name { font-size: .95rem; color: var(--muted); margin-bottom: 1.1rem; }
.product-summary { font-size: 1rem; line-height: 1.75; color: var(--body); }

.price-card {
  border: 1px solid var(--teal-200);
  border-left: 3px solid var(--teal-400);
  background: var(--teal-50);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
}
.price-label { font-size: .82rem; font-weight: 700; color: var(--teal-600); margin: 0 0 .35rem; letter-spacing: .02em; }
.price-main { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: var(--ink); margin: 0 0 .9rem; line-height: 1.1; }
.price-card dl { display: grid; gap: .3rem; margin: 0; padding-top: .85rem; border-top: 1px solid var(--teal-200); }
.price-card dl > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; }
.price-card dt { color: var(--muted); }
.price-card dd { margin: 0; font-weight: 700; color: var(--ink); }
.price-range { margin: .9rem 0 0; font-size: .78rem; color: var(--muted); }

.size-picker { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1.4rem; }
.size-option {
  min-width: 62px;
  padding: .7rem .5rem;
  border: 1px solid var(--teal-300);
  border-radius: var(--radius);
  background: #fff;
  color: var(--teal-600);
  font-family: var(--font-sans);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.size-option:hover { border-color: var(--teal-500); background: var(--teal-100); }
.size-option.active { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }

.buy-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.buy-actions .btn { flex: 1 1 auto; }

.shipping-note {
  margin: 1.3rem 0 0;
  padding: .95rem 1.1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .8rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Feature row */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: clamp(3rem, 7vw, 5rem) 0;
}
.feature-list article { background: #fff; padding: 2rem 1.75rem; }
.feature-list span { font-family: var(--font-serif); color: var(--gold); font-size: .95rem; }
.feature-list h3 { margin: .7rem 0 .5rem; font-size: 1.15rem; }
.feature-list p { font-size: .88rem; color: var(--muted); margin: 0; line-height: 1.7; }

/* Long-form columns */
.product-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
.product-columns .prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1.1rem; }
.product-columns .prose p { font-size: .96rem; line-height: 1.85; color: var(--body); }

/* Specifications */
.specifications {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.specifications h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1rem; }

.table-scroll { overflow-x: auto; margin-top: 1.4rem; }
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 460px;
}
.price-table caption { text-align: left; }
.price-table th, .price-table td {
  padding: .8rem .7rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.price-table thead th {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-600);
  border-bottom: 1px solid var(--teal-300);
}
.price-table tbody th { text-align: left; font-weight: 700; color: var(--ink); }
.price-table tbody td { color: var(--body); }
.price-table tbody tr:hover { background: var(--teal-50); }

.spec-figure { margin-top: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--teal-50); }
.spec-img { width: 100%; height: auto; }

.spec-list { margin: 0 0 1.8rem; }
.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.spec-list dt {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
}
.spec-list dd { margin: 0; font-size: .9rem; color: var(--ink); text-align: right; }

.authenticity-box {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
}
.authenticity-box h3 { margin: 0 0 .7rem; font-size: 1.1rem; }
.authenticity-box p { font-size: .88rem; line-height: 1.75; color: var(--body); margin-bottom: .8rem; }
.cert-ref { font-size: .8rem; color: var(--muted); margin: 0; }
.cert-ref strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }

/* Related */
.related { margin-top: clamp(3rem, 7vw, 5rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }

/* -------------------------------------------------------- Responsive -- */

@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .gallery-main { aspect-ratio: 4 / 3; }
  .feature-list { grid-template-columns: 1fr; }
  .product-columns { grid-template-columns: 1fr; }
  .specifications { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .thumb { width: 62px; height: 62px; }
  .buy-actions .btn { flex: 1 1 100%; }
  .spec-list > div { flex-direction: column; gap: .2rem; }
  .spec-list dd { text-align: left; }
}
