/* Product detail layout — scoped to #details */

#details {
  --pd-accent: #002fa7;
  --pd-primary: #4066b8;
  --pd-border: #e6ebf4;
  --pd-text: #4a4f5a;
  --pd-title: #1a335c;
  --pd-soft: #f5f7fb;
  text-transform: none;
}

#details,
#details * {
  text-transform: none;
}

#details .details-page {
  padding-top: 24px;
  padding-bottom: 56px;
}

#details .tdt-crumb {
  background: #fff;
}

#details .details-header {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 36px 44px;
  align-items: start;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(64, 102, 184, 0.04), transparent 42%),
    #fff;
  box-shadow: 0 10px 30px rgba(32, 54, 110, 0.05);
}

#details .details-gallery {
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 3;
  overflow: visible;
}

#details .pd-zoom-stage {
  position: relative;
  width: 100%;
}

#details .pd-zoom-stage.is-zooming {
  cursor: none;
}

#details .pd-zoom-lens {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  pointer-events: none;
  border: 2px solid var(--pd-primary);
  border-radius: 2px;
  background: rgba(64, 102, 184, 0.16);
  box-shadow: inset 0 0 0 1px #fff;
}

#details .pd-zoom-pane {
  position: absolute;
  left: calc(100% + 16px);
  top: 0;
  z-index: 24;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  box-sizing: border-box;
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  background-color: #fff;
  background-repeat: no-repeat;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  pointer-events: none;
}

#details .pd-zoom-lens[hidden],
#details .pd-zoom-pane[hidden] {
  display: none !important;
}

#details .details-summary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 4px;
  position: sticky;
  top: 16px;
}

#details .summary-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#details .summary-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--pd-border);
  border-radius: 999px;
  background: #fff;
  color: var(--pd-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#details .summary-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--pd-soft);
}

#details .product-name {
  margin: 0;
  color: var(--pd-title);
  font-size: clamp(1.35rem, 1.15rem + 0.75vw, 1.9rem);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

#details .summary-excerpt {
  margin: 0;
  color: var(--pd-text);
  font-size: 14px;
  line-height: 1.75;
  max-width: 52em;
}

#details .summary-sku {
  margin: 0;
  color: #6b7788;
  font-size: 14px;
  line-height: 1.5;
}

#details .summary-specs__item dd a {
  color: var(--pd-primary);
  text-decoration: none;
}

#details .summary-specs__item dd a:hover {
  color: var(--pd-accent);
  text-decoration: underline;
}

#details .summary-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

#details .summary-specs__item {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--pd-soft));
}

#details .summary-specs__item dt {
  margin: 0 0 6px;
  color: #8090a5;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

#details .summary-specs__item dd {
  margin: 0;
  color: var(--pd-title);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

#details .summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  padding-top: 4px;
}

#details .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#details .action-btn--primary {
  border: 0;
  background: linear-gradient(135deg, var(--pd-primary), var(--pd-accent));
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 47, 167, 0.18);
}

#details .action-btn--primary:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 47, 167, 0.24);
}

#details .action-btn--ghost {
  border: 1px solid #c7d7f5;
  background: #fff;
  color: var(--pd-primary);
}

#details .action-btn--ghost:hover {
  border-color: var(--pd-primary);
  background: rgba(64, 102, 184, 0.06);
  color: var(--pd-accent);
}

/* Gallery */
#details .details-gallery .mySwiper2 {
  margin-bottom: 12px;
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%) 0 7px / 14px 14px,
    #fff;
  overflow: hidden;
}

#details .details-gallery .mySwiper2 .swiper-slide {
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

#details .details-gallery .mySwiper2 .swiper-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  background: #fff;
}

#details .details-gallery .mySwiper2 .swiper-button-next,
#details .details-gallery .mySwiper2 .swiper-button-prev {
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
}

#details .details-gallery .mySwiper2 .swiper-button-next::after,
#details .details-gallery .mySwiper2 .swiper-button-prev::after {
  font-size: 14px;
  font-weight: 700;
}

#details .mySwiper > .swiper-wrapper .swiper-slide {
  border: 1px solid var(--pd-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  opacity: 0.72;
  transition: border-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

#details .mySwiper > .swiper-wrapper .swiper-slide .image-box {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
}

#details .mySwiper > .swiper-wrapper .swiper-slide .image-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

#details .mySwiper > .swiper-wrapper .swiper-slide.swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--pd-primary);
  box-shadow: 0 0 0 1px var(--pd-primary);
}

#details .gallery-empty {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d5deea;
  border-radius: 14px;
  color: #8a97a8;
  background: var(--pd-soft);
  font-size: 14px;
}

/* Description body */
#details .details-body,
#details .content-box.details-body {
  width: 100%;
  max-width: none;
  margin: 28px 0 0;
  padding: 28px 32px 32px;
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  background: #fff;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(32, 54, 110, 0.04);
}

#details .details-body__title {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--pd-accent);
  font-size: 20px;
  font-weight: 750;
  color: var(--pd-title);
  line-height: 1.35;
}

#details .article-body {
  color: var(--pd-text);
  font-size: 15px;
  line-height: 1.8;
}

#details .article-body .article-block {
  margin: 0 0 22px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--pd-border);
}

#details .article-body .article-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

#details .article-body .article-heading,
#details .article-body h1,
#details .article-body h2,
#details .article-body h3,
#details .article-body h4 {
  margin: 0 0 10px;
  padding: 0;
  border-left: 0;
  color: var(--pd-title);
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

#details .article-body h1 { font-size: 17px; }
#details .article-body h2,
#details .article-body .article-heading { font-size: 16px; }
#details .article-body h3 { font-size: 15px; }
#details .article-body h4 { font-size: 15px; }

#details .details-body p,
#details .content-box.details-body p,
#details .article-body p {
  margin: 0 0 0.85em;
  padding: 0;
  line-height: 1.8;
  font-size: 15px;
  color: var(--pd-text);
  text-align: left;
}

#details .article-body > *:last-child {
  margin-bottom: 0;
}

#details .details-body strong,
#details .content-box.details-body strong {
  color: var(--pd-title);
  font-weight: 700;
}

#details .article-body .article-points {
  list-style: none;
  margin: 8px 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#details .article-body .article-points li {
  position: relative;
  margin: 0;
  padding: 14px 16px 14px 40px;
  background: linear-gradient(180deg, #f7f9fc, #ffffff);
  border: 1px solid var(--pd-border);
  border-radius: 10px;
  color: var(--pd-text);
  line-height: 1.6;
  text-align: left;
}

#details .article-body .article-points li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 1.15em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pd-primary);
}

#details .article-body .article-specs {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

#details .article-body .article-specs li {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 12px 20px;
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--pd-border);
  text-align: left;
  align-items: start;
}

#details .article-body .article-specs li:last-child { border-bottom: 0; }
#details .article-body .article-specs li:nth-child(even) { background: #f8faff; }
#details .article-body .article-specs .k { color: #6b7280; font-weight: 600; font-size: 14px; }
#details .article-body .article-specs .v { color: var(--pd-title); font-size: 15px; word-break: break-word; }

#details .article-body .article-table-wrap {
  width: 100%;
  margin: 12px 0 22px;
  overflow-x: auto;
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  background: #fff;
}

#details .details-body table,
#details .content-box.details-body table,
#details .article-body table {
  width: 100% !important;
  min-width: 0;
  margin: 0;
  border-collapse: collapse;
  border: 0;
  font-size: 14px;
}

#details .details-body td,
#details .details-body th,
#details .content-box.details-body td,
#details .content-box.details-body th,
#details .article-body td,
#details .article-body th {
  border: 1px solid var(--pd-border) !important;
  padding: 0.6rem 0.85rem !important;
  text-align: left !important;
  vertical-align: middle !important;
}

#details .details-body td p,
#details .details-body th p,
#details .content-box.details-body td p,
#details .content-box.details-body th p {
  margin: 0 !important;
}

#details .article-body .article-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: min(100%, 720px);
  margin: 20px auto 24px;
  padding: 14px;
  background: #f7f9fc;
  border: 1px solid var(--pd-border);
  border-radius: 12px;
}

#details .details-body img,
#details .content-box.details-body img,
#details .article-body img,
#details .article-body .article-image {
  display: block;
  width: auto !important;
  max-width: min(100%, 720px) !important;
  max-height: min(52vh, 480px) !important;
  height: auto !important;
  margin: 16px auto;
  border-radius: 8px;
  object-fit: contain !important;
}

#details .article-body .article-figure img { margin: 0 auto; }

/* Related products */
#details .details-related {
  margin-top: 28px;
  padding: 24px 28px 28px;
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 54, 110, 0.04);
}

#details .details-related__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

#details .details-related__title {
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid var(--pd-accent);
  font-size: 20px;
  font-weight: 750;
  color: var(--pd-title);
  line-height: 1.35;
}

#details .details-related__more {
  color: var(--pd-primary);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

#details .details-related__more:hover {
  color: var(--pd-accent);
  text-decoration: underline;
}

#details .details-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

#details .details-related__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#details .details-related__card:hover {
  border-color: #4066b8;
  box-shadow: 0 10px 24px rgba(64, 102, 184, 0.12);
  transform: translateY(-2px);
}

#details .details-related__thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f7f9fc;
  overflow: hidden;
}

#details .details-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

#details .details-related__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  padding: 10px 12px 14px;
  color: #2b3348;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

#details .details-related__card:hover .details-related__name { color: var(--pd-primary); }

@media (max-width: 1100px) {
  #details .summary-specs { grid-template-columns: 1fr; }
  #details .details-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  #details .details-header {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }
  #details .details-gallery { max-width: 480px; margin: 0 auto; }
  #details .pd-zoom-pane,
  #details .pd-zoom-lens { display: none !important; }
  #details .details-summary { position: static; }
  #details .summary-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #details .details-body,
  #details .content-box.details-body { margin-top: 20px; padding: 22px 18px; }
  #details .article-body .article-points { grid-template-columns: 1fr; }
  #details .details-related { margin-top: 20px; padding: 20px 16px; }
  #details .details-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  #details .details-page { padding-top: 12px; padding-bottom: 36px; }
  #details .details-header { padding: 14px; border-radius: 12px; gap: 18px; }
  #details .details-gallery { max-width: none; }
  #details .details-gallery .mySwiper2 .swiper-slide img { padding: 10px; }
  #details .details-gallery .mySwiper2 .swiper-button-next,
  #details .details-gallery .mySwiper2 .swiper-button-prev {
    width: 32px;
    height: 32px;
    margin-top: -16px;
  }
  #details .summary-specs { grid-template-columns: 1fr; gap: 8px; }
  #details .summary-specs__item { padding: 12px 14px; }
  #details .summary-actions { flex-direction: column; align-items: stretch; }
  #details .action-btn { width: 100%; min-height: 44px; }
  #details .product-name { font-size: 1.28rem; }
  #details .details-body,
  #details .content-box.details-body {
    margin-top: 14px;
    padding: 16px 14px;
    border-radius: 12px;
  }
  #details .details-body__title,
  #details .details-related__title { font-size: 17px; margin-bottom: 12px; }
  #details .article-body .article-specs li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 14px;
  }
  #details .article-body table,
  #details .details-body table { font-size: 12px; }
  #details .details-related { padding: 16px 12px 18px; border-radius: 12px; }
  #details .details-related__card:hover { transform: none; }
}
