/* product-detail.css — Product detail page */

.pd-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  padding: 56px 0 80px;
  align-items: start;
}

/* GALLERY */
.pd-gallery {}
.pd-main-img {
  aspect-ratio: 4/3;
  background: var(--off);
  border: 1px solid var(--light);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-main-ph {
  font-family: var(--font);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.pd-thumbs {
  display: flex;
  gap: 8px;
}
.pd-thumb {
  width: 72px; height: 72px;
  border: 1px solid var(--light);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t);
  flex-shrink: 0;
}
.pd-thumb.active { border-color: var(--ink); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* INFO PANEL */
.pd-info { position: sticky; top: 80px; }

.pd-category {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.pd-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.pd-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }

.pd-desc {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--dark);
  line-height: 1.9;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--light);
}

/* SPEC TABLE */
.pd-spec-title {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.pd-spec-table { width: 100%; margin-bottom: 28px; }
.pd-spec-table tr { border-bottom: 1px solid var(--light); }
.pd-spec-table tr:last-child { border-bottom: none; }
.pd-spec-table td {
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 300;
  vertical-align: top;
}
.pd-spec-table td:first-child {
  width: 40%;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  padding-right: 12px;
}
.pd-spec-table td:last-child { color: var(--ink); font-weight: 400; }

/* CTA */
.pd-cta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pd-cta .btn-primary { justify-content: center; font-size: 15px; padding: 14px; }
.pd-cta .btn-ghost   { justify-content: center; }
.pd-note {
  font-family: var(--font);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* RELATED */
.pd-related { padding: 56px 0; border-top: 1px solid var(--light); background: var(--off); }
.pd-related-head { margin-bottom: 28px; }

/* FAQ */
.pd-faq { padding: 56px 0; border-top: 1px solid var(--light); }
.pd-faq-head { margin-bottom: 28px; }
.faq-item { border-bottom: 1px solid var(--light); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: color var(--t);
}
.faq-q:hover { color: var(--accent); }
.faq-icon { font-size: 18px; flex-shrink: 0; color: var(--muted); transition: transform 0.2s; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--ink); }
.faq-a {
  display: none;
  padding: 0 0 18px;
  font-size: 14px;
  font-weight: 300;
  color: var(--dark);
  line-height: 1.85;
}
.faq-item.open .faq-a { display: block; }

@media (max-width: 900px) {
  .pd-layout { grid-template-columns: 1fr; gap: 32px; }
  .pd-info { position: static; }
}

/* ── Template switcher bar ─────────────────────────── */
.pd-tpl-bar {
  background: var(--white);
  border-bottom: 1px solid var(--light);
  padding: 10px 0;
  position: sticky;
  top: 64px;
  z-index: 40;
}
.pd-tpl-bar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-tpl-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.pd-tpl-swatches {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.pd-tpl-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--light);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pd-tpl-swatch span {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: block;
}
.pd-tpl-swatch.active {
  border-color: var(--ink);
  transform: scale(1.15);
}
.pd-tpl-swatch:hover { transform: scale(1.12); }
.pd-tpl-name {
  font-family: var(--font);
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

/* ── Template content wrap ─────────────────────────── */
.pd-tpl-wrap {
  transition: background 0.3s ease;
  padding-bottom: 8px;
}

/* ── Gallery improvements ─────────────────────────── */
.pd-main-img {
  border: 2px solid var(--light);
  transition: border-color 0.25s;
  cursor: zoom-in;
}
.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.pd-thumb {
  aspect-ratio: 1;
  width: auto;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off);
  transition: border-color 0.18s;
}
.pd-thumb.active { border-color: var(--ink); }
.pd-thumb:hover  { border-color: var(--mid); }
.pd-thumb img    { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb-ph {
  font-family: var(--font);
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  padding: 4px;
  line-height: 1.4;
}
.pd-view-label {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
  text-align: center;
  transition: color 0.2s;
}

/* Responsive */
@media (max-width: 600px) {
  .pd-tpl-bar { top: 0; }
  .pd-tpl-name { display: none; }
  .pd-thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
}
