﻿/* ── Shared styles for all product detail pages ─────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-brand:    #003772;
  --c-brand-dk: #002558;
  --c-brand-lt: #eef3fa;
  --c-bg:       #f8f9fb;
  --c-surface:  #ffffff;
  --c-border:   #e2e8f0;
  --c-text:     #111827;
  --c-muted:    #6b7280;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --max-w: 1160px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--c-bg); color: var(--c-text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

.container { max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 100;
}
.nav {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 90px; gap: 1rem;
}
.nav-logo img { height: 55px; width: auto; }
.nav-back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .92rem; font-weight: 600; color: var(--c-brand);
  transition: opacity .15s;
}
.nav-back:hover { opacity: .7; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .83rem; color: var(--c-muted);
  padding-block: .9rem;
}
.breadcrumb a { color: var(--c-brand); transition: opacity .15s; }
.breadcrumb a:hover { opacity: .7; }
.breadcrumb span:last-child { color: var(--c-text); font-weight: 600; }

/* ── Product Detail Layout ──────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: 2.5rem clamp(3rem, 6vw, 5rem);
  align-items: start;
}

/* Gallery */
.pd-gallery { position: sticky; top: 84px; }

.pd-main-img {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  aspect-ratio: 1;
  margin-bottom: 1rem;
}
.pd-main-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: .75rem;
  transition: opacity .2s;
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
}

.thumb {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 2px solid var(--c-border);
  object-fit: cover;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s, border-color .15s;
  background: var(--c-surface);
}
.thumb:hover  { opacity: 1; border-color: var(--c-brand); }
.thumb.active { opacity: 1; border-color: var(--c-brand); }

/* Info panel */
.pd-tag {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-brand); border: 1.5px solid var(--c-brand);
  padding: .25em .75em; border-radius: 100px;
  margin-bottom: .9rem;
}

.pd-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -.03em;
  margin-bottom: .75rem;
}
.pd-title em { font-style: normal; color: var(--c-brand); }

.pd-price {
  font-size: 1.2rem; color: var(--c-muted);
  margin-bottom: 1.5rem;
}
.pd-price strong { color: var(--c-text); font-size: 1.6rem; }

.pd-desc { font-size: .97rem; color: var(--c-muted); margin-bottom: .85rem; line-height: 1.7; }

/* Specs table */
.pd-specs {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.5rem;
  font-size: .9rem;
}
.pd-specs tr { border-bottom: 1px solid var(--c-border); }
.pd-specs tr:last-child { border-bottom: none; }
.pd-specs th {
  text-align: left; padding: .6rem .5rem .6rem 0;
  font-weight: 700; color: var(--c-text); width: 38%;
  white-space: nowrap;
}
.pd-specs td { padding: .6rem 0; color: var(--c-muted); }

/* Options */
.pd-options { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 2rem; }

.pd-option-group h3 {
  font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--c-muted); margin-bottom: .5rem;
}

.pd-chips { display: flex; flex-wrap: wrap; gap: .4rem; }

.chip {
  display: inline-block;
  background: var(--c-brand-lt);
  color: var(--c-brand);
  font-size: .8rem; font-weight: 600;
  padding: .3em .75em;
  border-radius: 100px;
  border: 1px solid rgba(0,55,114,.15);
}

.chip.chip-more {
  background: transparent;
  color: var(--c-muted);
  border-color: var(--c-border);
  font-style: italic;
}

/* CTA buttons */
.pd-cta {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-bottom: 1rem;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8em 1.5em;
  background: var(--c-brand); color: #fff;
  border-radius: 100px; font-weight: 700; font-size: .95rem;
  border: none; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--c-brand-dk); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8em 1.5em;
  background: transparent; color: var(--c-text);
  border: 2px solid var(--c-border);
  border-radius: 100px; font-weight: 700; font-size: .95rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, transform .15s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--c-brand); color: var(--c-brand); transform: translateY(-1px); }

.pd-hint {
  font-size: .83rem; color: var(--c-muted);
  line-height: 1.55;
}

/* ── Related Products ───────────────────────────────────── */
.related {
  padding-block: 3rem clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--c-border);
}

.related h2 {
  font-size: 1.3rem; font-weight: 800;
  letter-spacing: -.02em; margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.related-card {
  display: flex; flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: var(--c-text);
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.related-card img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  background: #f3f4f6;
}

.related-card span {
  padding: .6rem .75rem;
  font-size: .82rem; font-weight: 600;
  color: var(--c-text);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--c-brand);
  color: rgba(255,255,255,.7);
  padding-block: 2rem;
}
.footer-bottom {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: .75rem;
}
.footer-bottom p { font-size: .82rem; }
.footer-legal { display: flex; gap: 1.5rem; list-style: none; }
.footer-legal a { font-size: .82rem; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-legal a:hover { color: #fff; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .pd-thumbs  { grid-template-columns: repeat(5, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .pd-thumbs    { grid-template-columns: repeat(5, 1fr); gap: .35rem; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-cta       { flex-direction: column; }
  .btn-primary, .btn-ghost { justify-content: center; }
}
