/* Splendor - Pagina de producto */
body.product-page {
  --pdp-tap-target: 44px;
}

.product-detail {
  padding: 3rem 0 6rem;
  background:
    radial-gradient(circle at top right, rgba(201, 169, 110, 0.07), transparent 30%),
    linear-gradient(180deg, #fcfbf9 0%, #f6f3ef 100%);
}

.product-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 3.25rem;
  align-items: start;
}

/* Galeria */
.product-gallery {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  align-self: start;
}

body.product-page .product-gallery {
  min-width: 0;
}

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.thumb {
  background: #eae8e4;
  border: 1px solid transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: .85rem;
  box-shadow: 0 10px 24px rgba(20,18,15,.06);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
  transition: opacity .2s, transform .3s ease;
}

.thumb.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.14), 0 12px 28px rgba(20,18,15,.08);
}

.thumb:hover img {
  opacity: .84;
  transform: scale(1.03);
}

.gallery-main {
  position: relative;
  background:
    linear-gradient(180deg, rgba(232, 227, 220, 0.96), rgba(226, 219, 210, 0.92));
  padding-top: 120%;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 20px 48px rgba(20,18,15,.09);
}

#gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s;
}

.gallery-zoom {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.9);
  border: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.11);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Info */
.product-info {
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(201, 169, 110, 0.14);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 18px 44px rgba(20,18,15,.06);
}

.product-info__cat {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-secondary);
  display: block;
  margin-bottom: .75rem;
}

.product-info__name {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.85rem);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.product-info__price-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.product-info__price {
  font-size: 1.75rem;
  color: var(--color-text);
}

.product-info__old-price {
  font-size: 1.05rem;
  color: var(--color-text-light);
  text-decoration: line-through;
}

.product-info__badge {
  background: #c0392b;
  color: white;
  font-size: .7rem;
  padding: .2rem .6rem;
  letter-spacing: .05em;
  border-radius: 999px;
}

.product-info__sku {
  font-size: .82rem;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
}

.product-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.35rem;
  margin: .75rem 0 1rem;
  font-size: .85rem;
  color: var(--color-text-light);
}

.product-info__meta strong {
  color: var(--color-text);
  font-weight: 500;
  margin-right: .3rem;
}

.prod-meta__item {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

/* Options */
.product-options {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.option-group__label {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: .6rem;
  color: var(--color-text-light);
}

.option-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.opt-btn {
  padding: .55rem 1rem;
  border: 1px solid rgba(201, 169, 110, 0.2);
  background: white;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  border-radius: .8rem;
}

.opt-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
  box-shadow: 0 10px 22px rgba(201, 169, 110, 0.2);
}

.opt-btn:hover:not(.active) {
  border-color: var(--color-primary);
}

.variant-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .5rem;
}

.variant-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .78rem 1rem;
  border: 1px solid rgba(201, 169, 110, 0.18);
  background: white;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  border-radius: .9rem;
  box-shadow: 0 8px 20px rgba(20,18,15,.05);
}

.variant-btn:hover {
  border-color: var(--color-secondary);
  transform: translateY(-1px);
}

.variant-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: white;
  box-shadow: 0 12px 26px rgba(201, 169, 110, 0.22);
}

.variant-btn__sku {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.variant-btn.active .variant-btn__sku {
  opacity: 0.75;
}

.variant-btn__size {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Add to cart */
.product-add {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid rgba(201, 169, 110, 0.18);
  border-radius: .85rem;
  overflow: hidden;
  background: white;
  box-shadow: 0 8px 18px rgba(20,18,15,.05);
}

.qty-btn {
  width: 42px;
  height: 48px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.qty-btn:hover {
  background: rgba(201, 169, 110, 0.12);
}

.qty-input {
  width: 54px;
  height: 48px;
  text-align: center;
  font-size: .95rem;
  border: none;
  background: none;
  font-family: inherit;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-add__btn {
  flex: 1;
  min-width: 220px;
  justify-content: center;
}

.product-add__wa {
  flex: 0 0 auto;
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.product-add__wa:hover {
  background: #1fb554;
  border-color: #1fb554;
  color: white;
}

body.product-page .product-add__wa--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(201, 169, 110, 0.2);
  box-shadow: none;
}

body.product-page .product-add__wa--secondary:hover {
  background: rgba(37, 211, 102, 0.08);
  color: #128c4a;
  border-color: rgba(37, 211, 102, 0.35);
}

.btn-wishlist {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(201, 169, 110, 0.18);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all .2s;
  padding: 0;
  border-radius: .85rem;
  box-shadow: 0 8px 18px rgba(20,18,15,.05);
}

.btn-wishlist:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.btn-wishlist.is-active {
  background: #e74c3c;
  border-color: #e74c3c;
  color: white;
}

.btn-wishlist.is-active svg {
  fill: white;
}

.cart-feedback {
  margin: .75rem 0 1.25rem;
  padding: .8rem 1rem;
  background: #eef8f1;
  border-left: 3px solid #27ae60;
  font-size: .9rem;
  color: #1f6a3e;
  border-radius: .8rem;
}

.product-info__stock {
  font-size: .85rem;
  color: #27ae60;
  margin-bottom: 1.5rem;
}

/* Shipping info */
.shipping-info {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.15rem 1.2rem;
  background: #f9f8f6;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(201, 169, 110, 0.12);
}

.shipping-info__row {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
  color: var(--color-text-light);
}

/* Tabs */
.product-tabs {
  margin-top: 1rem;
  border: 1px solid rgba(201, 169, 110, 0.14);
  border-radius: 1rem;
  overflow: hidden;
  background: white;
}

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(201, 169, 110, 0.14);
  background: rgba(250,249,247,.9);
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.15rem;
  font-size: .85rem;
  letter-spacing: .05em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  border-bottom: 2px solid transparent;
  transition: all .2s;
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: rgba(201, 169, 110, 0.06);
}

.tab-panel {
  display: none;
  padding: 1.35rem 1.25rem 1.45rem;
  color: var(--color-text-light);
  line-height: 1.9;
  font-size: .95rem;
}

.tab-panel.active {
  display: block;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.specs-table td {
  padding: .7rem 0;
  border-bottom: 1px solid var(--color-border);
}

.specs-table td:first-child {
  color: var(--color-text-light);
  width: 45%;
}

/* Related */
.related-section {
  background:
    linear-gradient(180deg, #f5f3f0 0%, #efebe6 100%);
}

.related-section .section-header {
  text-align: center;
  margin-bottom: 1rem;
}

.related-section .section-title {
  max-width: 14ch;
  margin: 0 auto;
}

.carousel-outer {
  position: relative;
  padding: 0 clamp(1rem, 4vw, 4rem);
  margin-top: 2rem;
}

.related-swiper {
  overflow: visible;
}

.related-swiper .swiper-slide {
  height: auto;
}

.related-swiper .product-card {
  height: 100%;
}

body.product-page .related-swiper .product-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(201, 169, 110, 0.14);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(20, 18, 15, 0.07);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

body.product-page .related-swiper .product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 110, 0.26);
  box-shadow: 0 18px 40px rgba(20, 18, 15, 0.1);
}

body.product-page .related-swiper .product-card__img-wrap {
  position: relative;
  overflow: hidden;
  padding-top: 122%;
  background:
    linear-gradient(180deg, rgba(232, 227, 220, 0.96), rgba(226, 219, 210, 0.92));
}

body.product-page .related-swiper .product-card__img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

body.product-page .related-swiper .product-card:hover .product-card__img-wrap img {
  transform: scale(1.04);
}

body.product-page .related-swiper .product-card__badge {
  position: absolute;
  top: .85rem;
  left: .85rem;
  z-index: 2;
  background: rgba(201, 169, 110, 0.92);
  color: #1f1a12;
  font-size: .67rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

body.product-page .related-swiper .product-card__actions {
  position: absolute;
  right: .85rem;
  bottom: .85rem;
  z-index: 2;
  display: flex;
  gap: .5rem;
  opacity: 1;
  transform: none;
}

body.product-page .related-swiper .btn-icon {
  width: var(--pdp-tap-target);
  height: var(--pdp-tap-target);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
  transition: transform .2s ease, background .2s ease, color .2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.product-page .related-swiper .btn-icon:hover {
  transform: translateY(-1px);
  background: var(--color-primary);
  color: white;
}

body.product-page .related-swiper .btn-icon--wa {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

body.product-page .related-swiper .btn-icon--wa:hover {
  background: #1fb554;
  border-color: #1fb554;
}

body.product-page .related-swiper .product-card__info {
  display: flex;
  flex-direction: column;
  gap: .42rem;
  padding: 1rem 1rem 1.1rem;
}

body.product-page .related-swiper .product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

body.product-page .related-swiper .product-card__cat {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

body.product-page .related-swiper .product-card__name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.24;
  margin: 0;
  color: var(--color-text);
}

body.product-page .related-swiper .product-card__price {
  font-size: .95rem;
  color: var(--color-text);
}

.swiper-button-prev,
.swiper-button-next {
  width: 46px;
  height: 46px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  color: #1a1a1a;
  transition: all 0.25s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: #1a1a1a;
  color: #c9a96e;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 14px;
  font-weight: 700;
}

.swiper-pagination-bullet {
  background: #d4cfc8;
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: #c9a96e;
  width: 24px;
  border-radius: 4px;
}

.swiper-pagination.related-pagination {
  position: relative;
  margin-top: 1.5rem;
}

.related-section {
  padding-bottom: 5rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .product-detail__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .product-gallery {
    position: static;
  }
}

@media (max-width: 768px) {
  .product-detail {
    padding: 2rem 0 5rem;
  }

  body.product-page .product-detail {
    padding: 2rem 0 4.5rem;
  }

  body.product-page .product-detail__grid {
    gap: 1.5rem;
  }

  .product-gallery {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: .85rem;
  }

  body.product-page .product-gallery {
    gap: .75rem;
  }

  body.product-page .gallery-main {
    padding-top: 0;
    aspect-ratio: 4 / 5;
    min-height: 0;
  }

  body.product-page #gallery-img {
    object-fit: contain;
  }

  body.product-page .gallery-zoom {
    top: .75rem;
    right: .75rem;
  }

  .thumb img {
    width: 68px;
    height: 68px;
  }

  .product-info {
    padding: 1.15rem;
  }

  body.product-page .product-info {
    padding: 1rem;
  }

  .product-info__name {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .product-info__price {
    font-size: 1.4rem;
  }

  .product-info__meta {
    flex-direction: column;
    gap: .4rem;
  }

  .gallery-main img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
  }

  body.product-page .product-add {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: .65rem;
  }

  body.product-page .qty-selector,
  body.product-page .product-add__btn,
  body.product-page .product-add__quote,
  body.product-page .product-add__wa {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  body.product-page .btn-wishlist,
  body.product-page .btn-compare {
    width: 100%;
    min-width: 0;
    height: 50px;
  }

  body.product-page .shipping-info {
    padding: 1rem;
  }

  .variant-btn {
    padding: 0.68rem .9rem;
  }

  .variant-btn__size {
    font-size: .78rem;
  }

  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.product-page .tabs-nav {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 1rem;
  }

  .tab-btn {
    white-space: nowrap;
    font-size: .78rem;
    min-width: 140px;
  }

  body.product-page .tab-btn {
    min-width: 134px;
    padding: .95rem 1rem;
    scroll-snap-align: start;
  }

  .specs-table {
    font-size: .82rem;
  }

  .specs-table td {
    padding: .6rem .75rem;
  }

  body.product-page .carousel-outer {
    padding: 0 1rem;
    margin-top: 1.5rem;
  }

  body.product-page .related-swiper .product-card__info {
    padding: .95rem 1rem 1rem !important;
  }

  body.product-page .related-swiper .product-card__name {
    font-size: .97rem !important;
  }

  body.product-page .related-swiper .product-card__price {
    font-size: .9rem !important;
  }

  body.product-page .swiper-button-prev,
  body.product-page .swiper-button-next {
    display: none;
  }

  body.product-page .swiper-pagination.related-pagination {
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .product-gallery {
    grid-template-columns: 1fr;
  }

  body.product-page .product-detail {
    padding: 1.5rem 0 4rem;
  }

  body.product-page .product-gallery {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  body.product-page .gallery-main {
    order: 1;
    aspect-ratio: 1 / 1.08;
  }

  .gallery-thumbs {
    flex-direction: row;
    overflow-x: auto;
    gap: .5rem;
    padding-bottom: .5rem;
  }

  body.product-page .gallery-thumbs {
    order: 2;
    gap: .55rem;
    padding-bottom: .25rem;
    scroll-snap-type: x proximity;
  }

  body.product-page .thumb {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .thumb img {
    width: 60px;
    height: 60px;
  }

  body.product-page .thumb img {
    width: 64px;
    height: 64px;
  }

  body.product-page .product-info__name {
    font-size: 1.5rem;
  }

  body.product-page .product-info__price {
    font-size: 1.32rem;
  }

  .product-add__btn {
    font-size: .85rem;
    padding: 1rem;
  }

  .product-add {
    gap: .6rem;
  }

  .product-add__btn,
  .product-add__wa {
    width: 100%;
  }

  body.product-page .related-swiper .product-card__actions {
    right: .7rem;
    bottom: .7rem;
  }
}
