/* =============================================
   PRODUCT DETAIL — Redesign
   ============================================= */

/* ---------- Loader ---------- */
.pd-loader {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 40vh; gap: 18px; color: #6b7280;
}
.pd-spinner {
  width: 40px; height: 40px; border: 4px solid #e5e7eb;
  border-top-color: #0056b3; border-radius: 50%;
  animation: pd-spin .8s linear infinite;
}
@keyframes pd-spin { to { transform: rotate(360deg); } }

/* ---------- Breadcrumb ---------- */
.pd-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; padding: 18px 0 6px; font-size: 13px; color: #6b7280;
}
.pd-breadcrumb a { color: #0056b3; text-decoration: none; }
.pd-breadcrumb a:hover { text-decoration: underline; }
.pd-breadcrumb .sep { color: #c7c7c7; margin: 0 2px; }
.pd-breadcrumb .cur { color: #374151; font-weight: 500; }

/* ---------- Layout (two columns) ---------- */
.pd-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  padding: 20px 0 50px; align-items: start;
}

/* ---------- Gallery ---------- */
.pd-gallery { position: relative; }
.pd-img-wrap {
  position: relative; overflow: hidden; border-radius: 16px;
  background: #f8f9fa; border: 1px solid #f0f0f0;
}
.pd-img-wrap img {
  width: 100%; display: block; transition: transform .35s ease;
  transform-origin: center center;
}
.pd-img-wrap:hover img { transform: scale(1.4); cursor: crosshair; }

.pd-badge {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: #fff;
  pointer-events: none; animation: pd-badge-in .4s ease;
}
@keyframes pd-badge-in { from { opacity:0; transform:scale(.8) } }
.badge-promo  { background: #e63946; }
.badge-new    { background: #2a9d8f; }
.badge-best   { background: #1b2a4e; }
.badge-stock  { background: #e76f51; }
.badge-soldes { background: #f4a261; }

.pd-thumbs { display: flex; gap: 10px; margin-top: 14px; }
.pd-thumbs img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer; transition: .25s;
}
.pd-thumbs img.active { border-color: #0056b3; transform: scale(1.06); }
.pd-thumbs img:hover  { border-color: #93c5fd; }

/* ---------- Info panel ---------- */
.pd-info { position: sticky; top: 24px; }

.pd-brand {
  display: inline-block; background: #eef2ff; color: #0056b3;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  padding: 5px 12px; border-radius: 50px; margin-bottom: 10px;
}
.pd-title {
  font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #111827;
  line-height: 1.25; margin-bottom: 12px;
}
.pd-desc {
  color: #6b7280; font-size: 15px; line-height: 1.8;
  border-right: 3px solid #0056b3; padding-right: 14px;
  margin-bottom: 24px;
}
.pd-desc:empty { display: none; }

.pd-ref {
  font-size: 12px; color: #9ca3af; margin-bottom: 20px;
}

/* ---------- CTA ---------- */
.pd-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff; text-decoration: none; border-radius: 14px;
  padding: 16px 24px; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(37,211,102,.25); transition: .3s;
}
.pd-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,211,102,.35); }

/* ---------- Trust row ---------- */
.pd-trust {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid #f3f4f6;
}
.pd-trust-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; text-align: center; font-size: 12px; color: #6b7280; line-height: 1.4;
}
.pd-trust-item i { font-size: 22px; color: #0056b3; }

/* ---------- Category line ---------- */
.pd-cat-line {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: #9ca3af; margin-bottom: 16px;
}
.pd-cat-line i { color: #25D366; margin-right: 4px; }
.pd-cat-line span { color: #374151; font-weight: 500; }

/* ---------- Related products ---------- */
.pd-related { padding: 30px 0 60px; }
.pd-related h2 {
  font-size: 20px; font-weight: 700; color: #111827; margin-bottom: 18px;
}
.pd-related-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr));
  gap: 16px;
}
.pd-rel-card {
  background: #fff; border-radius: 14px; border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0,0,0,.04); overflow: hidden; text-align: center;
  transition: transform .25s, box-shadow .25s; text-decoration: none; color: inherit;
}
.pd-rel-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,.08); }
.pd-rel-card .img-wrap { position: relative; padding: 12px; background: #fafafa; }
.pd-rel-card img {
  width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 8px;
}
.pd-rel-card .badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 3px 8px; border-radius: 14px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; color: #fff; pointer-events: none;
}
.pd-rel-card .pd-rel-info { padding: 10px 12px 14px; }
.pd-rel-card .pd-rel-name {
  font-size: 13px; font-weight: 600; color: #374151;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35; min-height: 36px;
}
.pd-rel-card .pd-rel-marque { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* ---------- Empty / Error ---------- */
.pd-msg {
  text-align: center; padding: 80px 20px; color: #6b7280; font-size: 16px;
}
.pd-msg i { display: block; font-size: 48px; color: #d1d5db; margin-bottom: 16px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .pd-layout { grid-template-columns: 1fr; gap: 24px; padding: 16px 0 40px; }
  .pd-img-wrap:hover img { transform: scale(1.15); cursor: zoom-in; }
  .pd-thumbs img { width: 56px; height: 56px; }
  .pd-trust { grid-template-columns: 1fr; gap: 10px; }
  .pd-trust-item { flex-direction: row; gap: 10px; text-align: left; }
  .pd-related-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
}

@media (max-width: 480px) {
  .pd-title { font-size: 20px; }
  .pd-cta { font-size: 14px; padding: 14px 16px; }
  .pd-related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
