/* Product details page (.pdp). Palette matches the rest of the site. */
.pdp {
  --pdp-blue: #2563eb;
  --pdp-blue-dark: #1d4ed8;
  --pdp-ink: #0f172a;
  --pdp-text: #334155;
  --pdp-muted: #64748b;
  --pdp-line: #e2e8f0;
  --pdp-soft: #f8fafc;
  --pdp-green: #15803d;
  background: #f8fafc;
  padding: 20px 0 64px;
  color: var(--pdp-text);
}

.pdp *, .pdp *::before, .pdp *::after { box-sizing: border-box; }

/* Breadcrumb */
.pdp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--pdp-muted);
  margin-bottom: 20px;
}
.pdp-breadcrumb a { color: var(--pdp-muted); }
.pdp-breadcrumb a:hover { color: var(--pdp-blue); }
.pdp-breadcrumb .current { color: var(--pdp-ink); font-weight: 500; }

/* Hero */
.pdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  background: #fff;
  border: 1px solid var(--pdp-line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pdp-image-frame {
  position: sticky;
  top: calc(var(--pdp-header-h, 88px) + 16px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--pdp-line);
  border-radius: 12px;
  padding: 28px;
  overflow: hidden;
}
.pdp-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.pdp-image-frame:hover .pdp-image { transform: scale(1.04); }

.pdp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pdp-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--pdp-soft);
  border: 1px solid var(--pdp-line);
  color: var(--pdp-text);
}
a.pdp-tag:hover { border-color: var(--pdp-blue); color: var(--pdp-blue); }
.pdp-tag-brand { background: #eff6ff; border-color: #bfdbfe; color: var(--pdp-blue-dark); }
.pdp-tag-stock { background: #f0fdf4; border-color: #bbf7d0; color: var(--pdp-green); }

.pdp-title {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--pdp-ink);
  margin: 0 0 14px;
}

.pdp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--pdp-line);
  font-size: 0.9rem;
}
.pdp-meta div { display: flex; gap: 6px; }
.pdp-meta dt { color: var(--pdp-muted); }
.pdp-meta dd { margin: 0; font-weight: 600; color: var(--pdp-ink); }

.pdp-lead { font-size: 1.05rem; line-height: 1.65; margin: 0 0 18px; color: var(--pdp-text); }

.pdp-highlights {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pdp-highlights li {
  position: relative;
  padding-left: 28px;
  line-height: 1.5;
  font-size: 0.95rem;
}
.pdp-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--pdp-blue-dark);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.pdp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.pdp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.pdp-btn-primary { background: var(--pdp-blue); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25); }
.pdp-btn-primary:hover { background: var(--pdp-blue-dark); color: #fff; }
.pdp-btn-outline { background: #fff; color: var(--pdp-blue); border-color: var(--pdp-blue); }
.pdp-btn-outline:hover { background: #eff6ff; color: var(--pdp-blue-dark); }
.pdp-btn-ghost { background: var(--pdp-soft); color: var(--pdp-text); border-color: var(--pdp-line); }
.pdp-btn-ghost:hover { border-color: var(--pdp-blue); color: var(--pdp-blue); }
.pdp-btn-block { width: 100%; }

.pdp-assurance {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--pdp-line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}
.pdp-assurance li { display: flex; flex-direction: column; font-size: 0.85rem; }
.pdp-assurance strong { color: var(--pdp-ink); font-size: 0.9rem; }
.pdp-assurance span { color: var(--pdp-muted); }

/* Section nav */
.pdp-subnav {
  position: sticky;
  top: var(--pdp-header-h, 88px);
  z-index: 20;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 28px 0 24px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--pdp-line);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
.pdp-subnav a {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pdp-text);
  white-space: nowrap;
}
.pdp-subnav a:hover, .pdp-subnav a.active { background: #eff6ff; color: var(--pdp-blue); }

/* Body */
.pdp-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.pdp-section {
  background: #fff;
  border: 1px solid var(--pdp-line);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  scroll-margin-top: calc(var(--pdp-header-h, 88px) + 72px);
}
.pdp-section h2 {
  font-size: 1.35rem;
  color: var(--pdp-ink);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eff6ff;
}
.pdp-section p { line-height: 1.75; margin: 0 0 14px; }
.pdp-section p:last-child { margin-bottom: 0; }

.pdp-feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pdp-feature-grid li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--pdp-soft);
  border: 1px solid var(--pdp-line);
  border-radius: 10px;
  line-height: 1.5;
  font-size: 0.95rem;
}
.pdp-check {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pdp-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-specs { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.pdp-specs th, .pdp-specs td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--pdp-line); }
.pdp-specs th { width: 36%; font-weight: 600; color: var(--pdp-ink); background: var(--pdp-soft); }
.pdp-specs tr:last-child th, .pdp-specs tr:last-child td { border-bottom: 0; }
.pdp-specs { border: 1px solid var(--pdp-line); border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.pdp-note { font-size: 0.82rem; color: var(--pdp-muted); margin-top: 14px !important; }

/* Aside */
.pdp-aside { position: sticky; top: calc(var(--pdp-header-h, 88px) + 72px); display: grid; gap: 20px; }
.pdp-help-card, .pdp-links-card {
  background: #fff;
  border: 1px solid var(--pdp-line);
  border-radius: 14px;
  padding: 24px;
}
.pdp-help-card { background: linear-gradient(160deg, #1e293b, #0f172a); border: 0; color: #cbd5e1; }
.pdp-help-card h3 { color: #fff; font-size: 1.15rem; margin: 0 0 8px; }
.pdp-help-card p { font-size: 0.9rem; line-height: 1.6; margin: 0 0 18px; }
.pdp-help-card .pdp-btn { margin-bottom: 10px; }
.pdp-help-card .pdp-btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.pdp-help-card .pdp-btn-outline:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.pdp-contact-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.88rem; display: grid; gap: 6px; }
.pdp-contact-list a { color: #93c5fd; }
.pdp-links-card h3 { font-size: 1rem; color: var(--pdp-ink); margin: 0 0 12px; }
.pdp-links-card a { display: block; padding: 8px 0; font-size: 0.92rem; font-weight: 500; border-top: 1px solid var(--pdp-line); }
.pdp-links-card a:first-of-type { border-top: 0; }

/* Related */
.pdp-related { margin-top: 16px; }
.pdp-related h2 { font-size: 1.5rem; color: var(--pdp-ink); margin: 0 0 20px; }
.pdp-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pdp-related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--pdp-line);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.pdp-related-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1); border-color: #bfdbfe; color: inherit; }
.pdp-related-image { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 18px; background: #fff; border-bottom: 1px solid var(--pdp-line); }
.pdp-related-image img { width: 100%; height: 100%; object-fit: contain; }
.pdp-related-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pdp-related-brand { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pdp-blue); }
.pdp-related-info h3 { font-size: 0.98rem; line-height: 1.4; color: var(--pdp-ink); margin: 0; }
.pdp-related-link { margin-top: auto; font-size: 0.85rem; font-weight: 600; color: var(--pdp-blue); }

/* Responsive */
@media (max-width: 1024px) {
  .pdp-body { grid-template-columns: minmax(0, 1fr); }
  .pdp-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .pdp-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 24px; }
  .pdp-image-frame { position: static; max-width: 460px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .pdp { padding-top: 12px; }
  .pdp-section { padding: 20px 16px; }
  .pdp-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .pdp-assurance { grid-template-columns: minmax(0, 1fr); }
  .pdp-aside { grid-template-columns: minmax(0, 1fr); }
  .pdp-actions .pdp-btn { flex: 1 1 100%; }
  .pdp-specs th { width: 42%; }
  .pdp-specs th, .pdp-specs td { padding: 10px 12px; font-size: 0.9rem; }
  .pdp-related-grid { gap: 12px; }
}

.pdp-subnav { scrollbar-width: none; }
.pdp-subnav::-webkit-scrollbar { display: none; }
