/* ==========================================================================
   Product detail page (pd-*)
   Loaded from catalog/controller/product/product.php via $this->document->addStyle()
   ========================================================================== */
.pd-page {
  background: #f3f3f3;
}

.pd {
  --pd-accent: #ff0040;
  --pd-accent-dark: #d90036;
  --pd-green: #0f9f55;
  --pd-text: #1f2328;
  --pd-muted: #8b9096;
  --pd-line: #ececec;
  color: var(--pd-text);
  font-size: 13px;
}

.pd button,
.pd a {
  -webkit-tap-highlight-color: transparent;
}

.pd svg {
  flex: none;
}

.pd-card {
  background: #fff;
  border-radius: 10px;
}

.pd-card--reviews,
.pd-card--related,
.product_customer_media.pd-card {
  margin-top: 8px;
  padding: 24px;
}

.pd-card--reviews .customer_review_wrapper {
  margin-top: 0;
}

.pd-card--related > :first-child {
  margin-top: 0;
}

/* ---------- Layout ---------- */
.pd-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.pd-gallery {
  position: sticky;
  top: 110px;
  padding: 16px 18px;
}

.pd-gallery_inner {
  display: flex;
  align-items: stretch;
  gap: 14px;
  height: 400px;
}

.pd-thumbs {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 46px;
  min-height: 0;
}

.pd-thumbs_swiper {
  flex: 1;
  width: 46px;
  min-height: 0;
  margin: 0;
}

.pd-thumbs_swiper .swiper-slide {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pd-thumbs_swiper .swiper-slide:hover {
  border-color: #c9c9c9;
}

.pd-thumbs_swiper .swiper-slide.swiper-slide-thumb-active,
.pd-thumbs_swiper .swiper-slide:focus-visible {
  border-color: var(--pd-accent);
  outline: 0;
}

.pd-thumbs_swiper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-thumbs_nav {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #444;
  cursor: pointer;
}

.pd-thumbs_nav svg {
  width: 16px;
  height: 16px;
}

.pd-thumbs_nav:hover {
  color: var(--pd-accent);
}

.pd-main_swiper {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.pd-main_swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  cursor: zoom-in;
}

.pd-main_swiper img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- Info card ---------- */
.pd-info {
  overflow: hidden;
}

.pd-block {
  padding: 16px;
  border-bottom: 1px solid var(--pd-line);
}

.pd-info > :last-child,
.pd-info > .pd-bundle {
  border-bottom: 0;
}

.pd-form {
  margin: 0;
}

.pd-brand {
  display: inline-block;
  color: #2a9cb4;
  font-size: 11px;
  text-decoration: none;
}

.pd-brand:hover {
  text-decoration: underline;
}

.pd-title {
  margin: 4px 0 0;
  color: #1c1f23;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.pd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pd-badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: #e8f7ee;
  color: var(--pd-green);
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
}

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 12px;
}

.pd-meta_left,
.pd-meta_right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pd-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid #e3e5e8;
  border-radius: 12px;
  color: #2b2f33;
  font-size: 11px;
  text-decoration: none;
}

.pd-pill svg {
  width: 13px;
  height: 13px;
}

a.pd-pill:hover {
  border-color: #c4c8cc;
}

.pd-availability {
  font-size: 11px;
  font-weight: 500;
}

.pd-availability.is-in {
  color: var(--pd-green);
}

.pd-availability.is-out {
  color: var(--pd-accent);
}

.pd-sku {
  color: var(--pd-muted);
  font-size: 11px;
}

/* ---------- Variantlar ---------- */
.pd-options {
  display: grid;
  gap: 12px;
}

.pd-option_label {
  margin-bottom: 6px;
  color: var(--pd-muted);
  font-size: 11px;
}

.pd-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-variants.is-invalid {
  outline: 1px solid var(--pd-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.pd-variant {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.pd-variant input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pd-variant span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #f1f3f5;
  color: #30353a;
  font-size: 11px;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.pd-variant:hover span {
  background: #e9ecef;
}

.pd-variant input:checked + span {
  border-color: #1f2328;
  background: #fff;
}

.pd-variant input:focus-visible + span {
  outline: 2px solid var(--pd-accent);
  outline-offset: 2px;
}

.pd-field .form-control,
.pd-field .form-select {
  font-size: 12px;
}

.pd-upload {
  padding: 6px 12px;
  border: 1px solid #dcdfe3;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.pd .invalid-feedback {
  margin-top: 4px;
  color: var(--pd-accent);
  font-size: 11px;
}

.pd .form-text {
  color: var(--pd-accent);
  font-size: 11px;
}

/* ---------- Qiymət və düymələr ---------- */
.pd-discount {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--pd-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}

.pd-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 6px;
}

.pd-price_current {
  color: var(--pd-accent);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.pd-price_old {
  color: #9a9fa5;
  font-size: 16px;
  font-weight: 500;
}

.pd-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.pd-btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}

.pd-btn svg {
  width: 17px;
  height: 17px;
}

.pd-btn--primary {
  background: var(--pd-accent);
  color: #fff;
}

.pd-btn--primary:hover {
  background: var(--pd-accent-dark);
}

.pd-btn--outline {
  border-color: #2a2d31;
  color: #1f2328;
}

.pd-btn--outline:hover {
  background: #f5f6f7;
}

.pd-btn--green {
  flex: none;
  height: 28px;
  padding: 0 12px;
  background: #12a150;
  color: #fff;
  font-size: 11px;
}

.pd-btn--green:hover {
  background: #0e8843;
  color: #fff;
}

.pd-btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.pd-btn:focus-visible,
.pd-icon_btn:focus-visible {
  outline: 2px solid var(--pd-accent);
  outline-offset: 2px;
}

.pd-icon_btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d9dce0;
  border-radius: 8px;
  background: #fff;
  color: #30353a;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.pd-icon_btn svg {
  width: 18px;
  height: 18px;
}

.pd-icon_btn:hover {
  border-color: #b9bec4;
}

.pd-icon_btn.is-active {
  border-color: var(--pd-accent);
  color: var(--pd-accent);
}

.pd-icon_btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Trade-in ---------- */
.pd-tradein {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.pd-tradein_icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #12a150;
}

.pd-tradein_icon svg {
  width: 18px;
  height: 18px;
}

.pd-tradein_text {
  flex: 1;
  min-width: 0;
}

.pd-tradein_title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.pd-tag {
  padding: 0 5px;
  border-radius: 4px;
  background: #7c3aed;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 14px;
}

.pd-tradein_sub {
  margin-top: 2px;
  color: #6b7076;
  font-size: 10px;
  line-height: 1.35;
}

/* ---------- Hissəli alış ---------- */
.pd-block_title {
  margin: 0;
  color: #1c1f23;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.pd-block_sub {
  margin: 4px 0 0;
  color: var(--pd-muted);
  font-size: 10px;
}

.pd-calc_box {
  display: flex;
  align-items: stretch;
  margin-top: 12px;
  border: 1px solid #e3e5e8;
  border-radius: 8px;
}

.pd-calc_months {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-around;
  gap: 6px;
  min-width: 0;
  padding: 16px 12px 10px;
}

.pd-month {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: #5b6167;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.pd-month:hover {
  background: #e6e9ec;
}

.pd-month.is-active {
  background: #1f2124;
  color: #fff;
}

.pd-month em {
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  display: block;
  color: var(--pd-accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.pd-month:focus-visible {
  outline: 2px solid var(--pd-accent);
  outline-offset: 2px;
}

.pd-calc_total {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 84px;
  padding: 8px 14px;
  border-left: 1px solid #e3e5e8;
}

.pd-calc_total > span {
  color: #5b6167;
  font-size: 10px;
}

.pd-calc_total strong {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pd-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: #6b7076;
  font-size: 10px;
}

.pd-note svg {
  width: 12px;
  height: 12px;
}

/* ---------- Taksitlə al ---------- */
.pd-banks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pd-bank {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 10px;
  border: 1px solid #e3e5e8;
  border-radius: 8px;
}

button.pd-bank {
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

button.pd-bank:hover {
  border-color: #b9bec4;
}

button.pd-bank:focus-visible {
  outline: 2px solid var(--pd-accent);
  outline-offset: 2px;
}

.pd-bank_logo {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.pd-bank_logo svg {
  width: 20px;
  height: 20px;
}

.pd-bank_logo--red {
  background: #e4002b;
}

.pd-bank_logo--black {
  background: #000;
}

.pd-bank_text {
  display: grid;
  gap: 1px;
}

.pd-bank_text strong {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.pd-bank_text small {
  color: #6b7076;
  font-size: 10px;
  white-space: nowrap;
}

/* ---------- Birgə satılanlar ---------- */
.pd-bundle_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pd-bundle_nav {
  display: flex;
  gap: 8px;
}

.pd-bundle_nav button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7076;
  cursor: pointer;
}

.pd-bundle_nav button:hover {
  color: var(--pd-accent);
}

.pd-bundle_nav svg {
  width: 14px;
  height: 14px;
}

.pd-bundle_track {
  display: flex;
  margin-top: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pd-bundle_track::-webkit-scrollbar {
  display: none;
}

.pd-bundle_item {
  display: flex;
  flex: 0 0 33.3333%;
  gap: 10px;
  min-width: 0;
  padding: 4px 10px;
  border-right: 1px solid var(--pd-line);
  scroll-snap-align: start;
}

.pd-bundle_item:first-child {
  padding-left: 0;
}

.pd-bundle_item:last-child {
  border-right: 0;
}

.pd-bundle_img {
  display: block;
  flex: none;
  width: 56px;
  height: 56px;
}

.pd-bundle_img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-bundle_body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.pd-bundle_name {
  display: -webkit-box;
  overflow: hidden;
  color: #1f2328;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  word-break: break-word;
}

.pd-bundle_name:hover {
  color: var(--pd-accent);
}

.pd-bundle_bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.pd-bundle_prices {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.pd-bundle_prices s {
  color: #9a9fa5;
  font-size: 9px;
}

.pd-bundle_prices b {
  color: var(--pd-accent);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pd-bundle_cart {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #f1f3f5;
  color: #30353a;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pd-bundle_cart svg {
  width: 14px;
  height: 14px;
}

.pd-bundle_cart:hover {
  background: #e4e7ea;
}

.pd-bundle_cart.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Xüsusiyyətlər ---------- */
.pd-details {
  margin-top: 8px;
}

.pd-specs {
  padding: 20px 22px 24px;
}

.pd-specs_head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 6px;
}

.pd-specs_title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.pd-specs_report {
  color: #6b7076;
  font-size: 10px;
  text-decoration: none;
}

.pd-specs_report span {
  color: #2a9cb4;
}

.pd-specs_report:hover span {
  text-decoration: underline;
}

.pd-specs_list {
  margin: 0;
  column-count: 2;
  column-gap: 56px;
}

.pd-spec {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #eee;
  font-size: 11px;
  line-height: 1.4;
  break-inside: avoid;
}

.pd-spec[hidden] {
  display: none;
}

.pd-spec dt {
  margin: 0;
  color: #4a4f55;
  font-weight: 400;
}

.pd-spec dd {
  margin: 0;
  color: #1c1f23;
  font-weight: 500;
  text-align: right;
}

.pd-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: #30353a;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pd-more:hover {
  background: #e9ebee;
}

/* ---------- Məhsul təsviri ---------- */
.pd-description {
  padding: 28px 22px 32px;
  border-top: 1px solid var(--pd-line);
}

.pd-details > .pd-description:first-child {
  border-top: 0;
}

.pd-description_title {
  margin: 0 0 14px;
  color: #15181c;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.pd-description_body {
  color: #4f545a;
  font-size: 13px;
  line-height: 1.65;
}

.pd-description_body h1,
.pd-description_body h2,
.pd-description_body h3,
.pd-description_body h4 {
  margin: 22px 0 8px;
  color: #15181c;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.pd-description_body > :first-child {
  margin-top: 0;
}

.pd-description_body p {
  margin: 0 0 10px;
}

.pd-description_body ul,
.pd-description_body ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.pd-description_body ul {
  list-style: disc;
}

.pd-description_body ol {
  list-style: decimal;
}

.pd-description_body img {
  max-width: 100%;
  height: auto;
}

.pd-description_body table {
  max-width: 100%;
}

.pd-tags {
  margin: 18px 0 0;
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-tags a {
  color: #2a9cb4;
  text-decoration: none;
}

.pd-tags a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .pd-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-gallery {
    position: static;
  }
}

@media (max-width: 767px) {
  .pd-gallery {
    padding: 12px;
  }

  .pd-gallery_inner {
    flex-direction: column-reverse;
    height: auto;
    gap: 12px;
  }

  .pd-main_swiper {
    height: 320px;
  }

  .pd-thumbs {
    flex-direction: row;
    width: 100%;
  }

  .pd-thumbs_nav {
    display: none;
  }

  .pd-thumbs_swiper {
    flex: none;
    width: 100%;
    height: 48px;
  }

  .pd-specs_list {
    column-count: 1;
  }

  .pd-specs {
    padding: 16px 14px 20px;
  }

  .pd-description {
    padding: 20px 14px 24px;
  }

  .pd-description_title {
    font-size: 19px;
  }

  .pd-card--reviews,
  .pd-card--related,
  .product_customer_media.pd-card {
    padding: 14px;
  }

  .pd-bundle_item {
    flex-basis: 78%;
  }
}

@media (max-width: 480px) {
  .pd-block {
    padding: 14px 12px;
  }

  .pd-actions {
    flex-wrap: wrap;
  }

  .pd-actions .pd-btn {
    flex: 1 1 100%;
  }

  .pd-actions .pd-icon_btn {
    flex: 1 1 0;
    width: auto;
  }

  .pd-tradein {
    flex-wrap: wrap;
  }

  .pd-calc_total {
    min-width: 72px;
    padding: 8px;
  }

  .pd-bank {
    flex: 1 1 100%;
  }
}
