/* Product Detail Page */

.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--gray-500);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.breadcrumb-pdp-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breadcrumb-back {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--gray-800);
  border-radius: 50%;
}

.breadcrumb-back:hover {
  background: var(--gray-100);
  color: var(--purple);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--gray-500);
}

.breadcrumb-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.breadcrumb a:hover { color: var(--purple); }

.pdp {
  padding: 24px 0 48px;
}

.pdp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.pdp-info {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Gallery */
.pdp-gallery {
  position: sticky;
  top: 90px;
}

.pdp-carousel {
  position: relative;
  background: var(--white);
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

.pdp-carousel-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.pdp-img-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pdp-img-badge-coupon {
  background: var(--purple);
  color: var(--white);
}

.pdp-img-badge-electro {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: var(--white);
}

.pdp-img-badge-mod {
  position: absolute;
  right: 12px;
  bottom: 48px;
  z-index: 3;
  background: var(--green);
  color: var(--white);
  max-width: 140px;
  text-align: center;
}

.pdp-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}

.pdp-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--gray-200);
  cursor: pointer;
}

.pdp-carousel-dot.is-active {
  background: var(--gray-500);
}

.pdp-carousel-viewport {
  position: relative;
  min-height: 380px;
  overflow: hidden;
}

.pdp-carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 56px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}

.pdp-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

.pdp-carousel-slide img {
  max-height: 320px;
  max-width: 100%;
  object-fit: contain;
}

.pdp-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  background: var(--white);
  color: var(--purple);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: background .2s, border-color .2s;
}

.pdp-carousel-btn:hover {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

.pdp-carousel-btn svg {
  width: 20px;
  height: 20px;
}

.pdp-carousel-btn.prev { left: 12px; }
.pdp-carousel-btn.next { right: 12px; }

.pdp-carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  background: rgba(255,255,255,.9);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
}

.pdp-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pdp-thumbs::-webkit-scrollbar {
  height: 4px;
}

.pdp-thumbs::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 4px;
}

.pdp-thumb {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  background: var(--white);
  transition: border-color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-thumb:hover,
.pdp-thumb.active {
  border-color: var(--purple);
}

.pdp-thumb img {
  max-height: 100%;
  object-fit: contain;
}

/* Info */
.pdp-brand {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #0099cc;
  letter-spacing: 0.01em;
}

.pdp-info h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--gray-800);
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}

.pdp-seller {
  font-size: 14px;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.pdp-seller a,
.pdp-link {
  color: #0066cc;
  font-weight: 600;
  text-decoration: none;
}

.pdp-seller a:hover,
.pdp-link:hover {
  text-decoration: underline;
}

.pdp-logistics {
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 0;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pdp-logistics-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  color: var(--gray-800);
}

.pdp-logistics-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.pdp-logistics-row svg {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  flex-shrink: 0;
  display: block;
  color: #0066cc;
}

.pdp-logistics-row > div {
  flex: 1;
  min-width: 0;
}

.pdp-logistics-row p {
  margin: 0 0 6px;
}

.pdp-gallery-empty {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
}

.pdp-prices .price-current.price-free,
.pdp-mobile-price .price-current.price-free {
  color: var(--green);
}

.pdp-logistics-row strong {
  font-weight: 700;
}

.pdp-logistics-row .pdp-zip {
  margin-top: 8px;
  margin-bottom: 0;
}

.pdp-prices {
  margin-bottom: 16px;
}

.pdp-prices .price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.pdp-prices .price-current {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.1;
}

.page-pdp .pdp-prices .price-free {
  color: var(--gray-800);
}

.pdp-prices .price-original {
  font-size: 15px;
  color: var(--gray-500);
  text-decoration: line-through;
  display: block;
  margin-bottom: 4px;
}

.pdp-prices .price-discount {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--pink);
  color: var(--white);
}

.pdp-prices .price-national {
  font-size: 13px;
  margin-top: 4px;
  display: block;
  line-height: 1.4;
  max-width: 100%;
  overflow-wrap: break-word;
}

.pdp-cuotas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 20px;
}

.pdp-cuotas-badge {
  background: var(--purple);
  color: var(--white);
  font-weight: 800;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 15px;
}

/* Shipping */
.pdp-shipping {
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.pdp-shipping h3 {
  display: none;
}

.pdp-zip {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.pdp-zip input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: var(--white);
}

.pdp-zip input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(68,0,153,.1);
}

.pdp-zip button {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-800);
  border-radius: 4px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}

.pdp-zip button:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.pdp-zip-msg {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
  margin-top: 4px;
}

.pdp-zip-location {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--gray-800);
}

.pdp-shipping-rates {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdp-shipping-rates li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 10px 12px;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.35;
}

.pdp-rate-name {
  font-weight: 600;
  color: var(--gray-800);
  grid-column: 1;
  grid-row: 1;
}

.pdp-rate-eta {
  font-size: 12px;
  color: var(--gray-500);
  grid-column: 1;
  grid-row: 2;
}

.pdp-rate-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 15px;
  color: var(--purple);
  white-space: nowrap;
}

.pdp-zip-link {
  color: var(--purple);
  text-decoration: underline;
  font-weight: 500;
  font-size: 13px;
}

.pdp-zip-warn {
  margin: 0 0 6px;
  color: #b45309;
  font-weight: 500;
}

.pdp-zip-warn-sub {
  margin: 0;
  font-size: 13px;
  color: var(--gray-500);
}

.pdp-zip-msg.is-success .pdp-zip-location {
  color: var(--green);
  font-weight: 600;
}

.pdp-zip-msg.is-loading {
  color: var(--gray-500);
  font-weight: 400;
}

.pdp-zip-msg.is-warn {
  color: #b45309;
}

.pdp-zip-msg.is-error {
  color: #c62828;
  font-weight: 500;
}

.pdp-zip-msg a {
  color: var(--purple);
  text-decoration: underline;
  font-weight: 500;
}

/* Actions */
.pdp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-buy {
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  text-align: center;
  display: block;
  width: 100%;
  font-family: inherit;
}

.btn-buy:hover { background: var(--purple-dark); }

.btn-cart {
  background: #ece6f5;
  color: var(--purple);
  border: none;
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  width: 100%;
  font-family: inherit;
}

.btn-cart:hover {
  background: #e2d9f0;
}

.price-free {
  color: var(--gray-800);
}

.pdp-stock-alert {
  display: none;
}

.pdp-promo-note {
  display: none;
}

.pdp-mobile-stock {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #e65100;
}

.pdp-mobile-price .price-free {
  font-size: 20px;
}

.pdp-sku {
  font-size: 12px;
  color: var(--gray-500);
}

/* Tabs / Specs */
.pdp-details {
  margin-top: 40px;
  border-top: 1px solid var(--gray-200);
  padding-top: 32px;
}

.pdp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
}

.pdp-tab {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}

.pdp-tab.active,
.pdp-tab:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.pdp-panel { display: none; }
.pdp-panel.active { display: block; }

.pdp-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.pdp-related .section-header {
  margin-bottom: 20px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.spec-group h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.spec-group dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13px;
}

.spec-group dt {
  color: var(--gray-500);
  font-weight: 500;
}

.spec-group dd {
  font-weight: 600;
  color: var(--gray-800);
}

.pdp-description h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--gray-800);
}

.pdp-description p {
  font-size: 14px;
  color: var(--gray-800);
  margin-bottom: 16px;
  line-height: 1.6;
}

.pdp-description ul {
  list-style: disc;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
}

/* Sticky mobile bar */
.pdp-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 12px 16px;
  z-index: 200;
  box-shadow: 0 -4px 12px rgba(0,0,0,.1);
}

.pdp-mobile-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.pdp-mobile-price {
  flex: 1;
}

.pdp-mobile-price .price-current {
  font-size: 20px;
  font-weight: 700;
}

.pdp-mobile-bar .btn-buy {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

@media (min-width: 901px) {
  .pdp-carousel {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 12px;
  }
}

@media (max-width: 900px) {
  .page-pdp .top-bar {
    display: none;
  }

  .page-pdp .nav {
    display: none;
  }

  .page-pdp .logo-wordmark {
    display: none;
  }

  .page-pdp .header-actions > a:first-child {
    display: none;
  }

  .page-pdp .breadcrumb-back {
    display: inline-flex;
  }

  .page-pdp .breadcrumb ol {
    flex: 1;
    min-width: 0;
  }

  .page-pdp .header .container,
  .page-pdp .location-bar .container,
  .page-pdp .nav .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-pdp .pdp {
    padding-top: 0;
  }

  .page-pdp .breadcrumb {
    padding: 8px 0;
    font-size: 12px;
  }

  .page-pdp .breadcrumb ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .page-pdp .breadcrumb ol::-webkit-scrollbar {
    display: none;
  }

  .page-pdp .breadcrumb li {
    flex-shrink: 0;
  }

  .page-pdp .breadcrumb li:first-child {
    display: none;
  }

  .page-pdp .breadcrumb-current {
    max-width: none;
  }

  .page-pdp .pdp .container {
    padding-left: 0;
    padding-right: 0;
  }

  .pdp-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .pdp-info {
    padding: 16px;
  }

  .pdp-info,
  .pdp-info > * {
    max-width: 100%;
  }

  .pdp-gallery { position: static; }

  .pdp-thumbs { display: none; }

  .pdp-carousel-counter { display: none; }

  .pdp-carousel-btn { display: none; }

  .pdp-carousel-viewport { min-height: 280px; }

  .pdp-carousel-slide { padding: 24px 16px 12px; }

  .pdp-carousel-slide img { max-height: 240px; }

  .specs-grid { grid-template-columns: 1fr; }

  .pdp-actions { display: none; }

  .pdp-mobile-bar { display: block; }

  body.page-pdp { padding-bottom: 76px; }

  .pdp-details,
  .pdp-related {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .page-pdp .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-pdp .nav a {
    padding: 10px 12px;
    font-size: 12px;
  }

  .pdp-info h1 { font-size: 17px; line-height: 1.4; }
  .pdp-prices .price-current { font-size: 26px; }
  .pdp-prices .price-discount { font-size: 12px; }
  .pdp-stock-alert {
    font-size: 11px;
    padding: 5px 10px;
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }
  .pdp-promo-note { font-size: 12px; padding: 10px 12px; line-height: 1.55; }
  .pdp-shipping { padding: 12px; }
  .pdp-zip-msg { font-size: 13px; }
  .pdp-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pdp-tab { white-space: nowrap; padding: 10px 14px; font-size: 13px; }
  .pdp-carousel-slide { padding: 12px 36px; }
  .pdp-carousel-viewport { min-height: 200px; }
  .pdp-zip { flex-direction: column; }
  .pdp-zip input,
  .pdp-zip button { width: 100%; }
  .pdp-thumb { width: 64px; height: 64px; min-width: 64px; }

  .pdp-mobile-bar {
    padding: 10px 12px;
  }

  .pdp-mobile-bar-inner {
    gap: 10px;
    min-width: 0;
  }

  .pdp-mobile-price {
    min-width: 0;
    flex: 0 1 auto;
  }

  .pdp-mobile-bar .btn-buy {
    flex: 1 1 50%;
    min-width: 0;
    padding: 11px 10px;
    font-size: 13px;
  }
}
