/* 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: 28px;
  padding-bottom: 56px;
}

#details .details-header {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  gap: 40px 48px;
  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;
}

#details .details-summary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 4px;
}

#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-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;
  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 .details-body p,
#details .content-box.details-body p {
  margin: 0 0 0.85em;
  padding: 0;
  line-height: 1.75;
  font-size: 14px;
  color: #333;
}

#details .details-body p:last-child,
#details .content-box.details-body p:last-child {
  margin-bottom: 0;
}

#details .details-body strong,
#details .content-box.details-body strong {
  color: #204c96;
  font-weight: 700;
}

#details .details-body table,
#details .content-box.details-body table {
  width: 100% !important;
  margin: 1rem 0 1.25rem;
  border-collapse: collapse;
  border: 1px solid var(--pd-border);
  font-size: 13px;
}

#details .details-body td,
#details .details-body th,
#details .content-box.details-body td,
#details .content-box.details-body th {
  border: 1px solid var(--pd-border) !important;
  padding: 0.55rem 0.65rem !important;
  text-align: center !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 .details-body img,
#details .content-box.details-body img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1100px) {
  #details .summary-specs {
    grid-template-columns: 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 .summary-specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #details .details-body,
  #details .content-box.details-body {
    margin-top: 20px;
    padding: 22px 18px;
  }
}

@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 .summary-excerpt {
    font-size: 13px;
  }

  #details .details-body,
  #details .content-box.details-body {
    margin-top: 14px;
    padding: 16px 14px;
    border-radius: 12px;
  }

  #details .details-body__title {
    font-size: 17px;
    margin-bottom: 12px;
  }

  #details .details-body table,
  #details .content-box.details-body table {
    font-size: 12px;
  }

  #details .details-body td,
  #details .details-body th,
  #details .content-box.details-body td,
  #details .content-box.details-body th {
    padding: 0.4rem 0.45rem !important;
  }
}
