/* ============================================================
   Hugon Veneer — Product
   ONLY product-page-specific styles.
   Shared components (species-card, application-card, section__,
   link-arrow, etc.) live in components.css — do NOT duplicate here.
   All variable names aligned to base.css :root definitions
   ============================================================ */

/* -----------------------------------------------
   Container with sidebar (product listing layout)
   ----------------------------------------------- */
.container--with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-10);
  align-items: start;
}
@media (max-width: 1023px) {
  .container--with-sidebar { grid-template-columns: 1fr; gap: var(--space-6); }
}

.content-main { min-width: 0; }

/* -----------------------------------------------
   Product listing grid
   ----------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 1023px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .product-grid { grid-template-columns: 1fr; } }

/* Product card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--t-base) var(--t-ease),
    box-shadow var(--t-base) var(--t-ease),
    border-color var(--t-base) var(--t-ease);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}

.product-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.product-card__image--placeholder {
  background:
    linear-gradient(135deg, #D6C5A8 0%, #C9B896 30%, #B89668 60%, #8A6240 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card__image--placeholder::after {
  content: "";
  width: 40%; height: 40%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}

.product-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.product-card__title {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  color: var(--color-primary);
  line-height: var(--lh-snug);
  margin: 0;
}

.product-card__chinese {
  display: block;
  font-size: 0.65em;
  color: var(--color-secondary);
  font-weight: var(--fw-regular);
  margin-top: var(--space-1);
}

.product-card__text {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  line-height: var(--lh-base);
  flex: 1;
}

/* -----------------------------------------------
   Product detail hero
   ----------------------------------------------- */
.product-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-10);
  align-items: start;
}
@media (max-width: 1023px) {
  .product-hero { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* Product hero gallery */
.product-hero__gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-3);
  min-height: 540px;
}
.product-hero__gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  cursor: zoom-in;
}
.product-hero__gallery-item:first-child { grid-row: 1 / span 2; }
@media (max-width: 640px) {
  .product-hero__gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }
  .product-hero__gallery-item:first-child { grid-row: auto; aspect-ratio: 4/3; }
  .product-hero__gallery-item { aspect-ratio: 4/3; }
}

/* Product info sidebar */
.product-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

.product-info__category {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-secondary);
  font-weight: var(--fw-semibold);
}

.product-info__title {
  font-family: var(--font-serif);
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  color: var(--color-primary);
  margin: 0;
}

.product-info__chinese {
  display: block;
  font-size: 0.65em;
  color: var(--color-secondary);
  font-weight: var(--fw-regular);
  margin-top: var(--space-1);
}

.product-info__lede {
  font-size: var(--fs-md);
  color: var(--color-text-soft);
  line-height: var(--lh-base);
  max-width: 50ch;
}

.product-info__divider {
  height: 1px;
  background: var(--color-border);
}

.product-info__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.product-info__meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-info__meta-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-info__meta-value {
  font-size: var(--fs-base);
  color: var(--color-primary);
  font-weight: var(--fw-medium);
}

.product-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

/* -----------------------------------------------
   Specification table
   ----------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.spec-table caption {
  text-align: left;
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  color: var(--color-primary);
  padding: var(--space-3) 0;
  caption-side: top;
}

.spec-table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
  font-weight: var(--fw-semibold);
}

.spec-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--t-fast) var(--t-ease);
}
.spec-table tbody tr:last-child { border-bottom: 0; }
.spec-table tbody tr:nth-child(even) { background: var(--color-bg-alt); }
.spec-table tbody tr:hover { background: rgba(212, 167, 106, 0.08); }

.spec-table td {
  padding: var(--space-3) var(--space-4);
  vertical-align: top;
  color: var(--color-text-soft);
}
.spec-table td:first-child {
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  width: 35%;
  min-width: 140px;
}

/* -----------------------------------------------
   Status badges
   ----------------------------------------------- */
.status-active,
.status-archived,
.status-sold {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  line-height: 1.3;
}

.status-active {
  color: var(--color-success);
  background: rgba(74, 107, 58, 0.12);
  border-color: rgba(74, 107, 58, 0.25);
}

.status-archived {
  color: var(--color-muted);
  background: var(--color-bg-alt);
  border-color: var(--color-border);
}

.status-sold {
  color: var(--color-error);
  background: rgba(139, 46, 46, 0.10);
  border-color: rgba(139, 46, 46, 0.25);
}

/* -----------------------------------------------
   Sidebar / filter panel (product listing)
   ----------------------------------------------- */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

.filter-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.filter-panel__title {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: var(--fw-semibold);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
  font-family: var(--font-sans);
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.filter-group {
  border: 0; padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-group legend {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  padding: 0;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
  cursor: pointer;
  padding: var(--space-1) 0;
}

.filter-group input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* -----------------------------------------------
   CTA banner (product detail bottom section)
   ----------------------------------------------- */
.cta-banner {
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-secondary);
  padding: var(--space-8);
  border-radius: var(--radius-md);
}

.cta-banner__title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.cta-banner__text {
  font-size: var(--fs-base);
  color: var(--color-text-soft);
  line-height: var(--lh-base);
  margin-bottom: var(--space-5);
  max-width: 60ch;
}

.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* -----------------------------------------------
   Badge (coming soon, etc.)
   ----------------------------------------------- */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.badge--soon {
  color: var(--color-warning);
  background: rgba(184, 134, 43, 0.12);
  border-color: rgba(184, 134, 43, 0.30);
}

/* -----------------------------------------------
   Section body text (product detail pages)
   ----------------------------------------------- */
.section__body {
  max-width: var(--container-text);
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
  color: var(--color-text-soft);
}
.section__body p + p { margin-top: var(--space-4); }

/* -----------------------------------------------
   Contact sidebar (contact page)
   ----------------------------------------------- */
.sidebar--contact {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.sidebar__title {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.contact-block { margin-bottom: var(--space-6); }
.contact-block:last-child { margin-bottom: 0; }

.contact-block__title {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: var(--fw-semibold);
  font-family: var(--font-sans);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.contact-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: var(--space-2);
}

.contact-list li {
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
  margin: 0;
}

.contact-list a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--t-fast) var(--t-ease);
}
.contact-list a:hover { color: var(--color-secondary-dark); }

/* Spacing after product hero */
.product-hero + .section { padding-top: var(--space-12); }
