/* Ficha de producto — producto.php */

body.alt-layout.page-product-single .product-breadcrumb-spacer {
  min-height: 1.35rem;
  margin-bottom: 18px;
}

body.alt-layout.page-product-single .main-content {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-bottom: 40px;
}

body.alt-layout.page-product-single .product-single {
  margin-bottom: 0;
}

/* Panel compra: título, precio, carrito */
body.alt-layout.page-product-single .product-purchase-panel {
  padding: clamp(1.25rem, 2.5vw, 1.65rem);
  margin-bottom: 1.35rem;
  background: linear-gradient(165deg, #fff 0%, #faf8f5 100%);
  border: 1px solid #ebe6e0;
  border-radius: 18px;
  box-shadow: 0 6px 28px rgba(17, 17, 17, 0.05);
}

body.alt-layout.page-product-single .product-single-brand {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a6b48;
}

body.alt-layout.page-product-single .product-single-brand a {
  color: inherit;
  text-decoration: none;
}

body.alt-layout.page-product-single .product-single-brand a:hover {
  text-decoration: underline;
}

body.alt-layout.page-product-single .product-single-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #111;
}

body.alt-layout.page-product-single .product-single-desc {
  margin: 0 0 1rem;
  padding: 0.1rem 0 0.1rem 0.85rem;
  border-left: 2px solid #d4bc7a;
  font-size: 0.96rem;
  line-height: 1.7;
  color: #4a4338;
}

body.alt-layout.page-product-single .product-single-price-wrap {
  padding: 0.9rem 0 1.1rem;
  margin-bottom: 1.1rem;
  border-top: 1px solid #ebe6e0;
  border-bottom: 1px solid #ebe6e0;
}

body.alt-layout.page-product-single .product-single-price {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  color: #111;
  gap: 0.35rem 0.75rem;
}

body.alt-layout.page-product-single .product-single-price .price-current {
  color: #111;
}

body.alt-layout.page-product-single .product-single-price .price-old {
  font-size: 0.95rem;
  font-weight: 500;
  color: #9a9a9a;
}

body.alt-layout.page-product-single .product-decant-size {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

body.alt-layout.page-product-single .product-decant-size-label {
  display: block;
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a8f84;
}

body.alt-layout.page-product-single .product-decant-size-options {
  display: inline-flex;
  align-items: stretch;
  width: 100%;
  max-width: 340px;
  padding: 4px;
  border: 1px solid #e0d8ce;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.04);
  gap: 4px;
}

body.alt-layout.page-product-single .product-decant-size-option {
  flex: 1 1 0;
  position: relative;
  margin: 0;
  padding: 0;
  min-width: 0;
  cursor: pointer;
}

body.alt-layout.page-product-single .product-decant-size-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

body.alt-layout.page-product-single .product-decant-size-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #6f6760;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

body.alt-layout.page-product-single .product-decant-size-option:hover .product-decant-size-text {
  color: #111;
}

body.alt-layout.page-product-single .product-decant-size-option input:checked + .product-decant-size-text {
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(17, 17, 17, 0.18);
}

body.alt-layout.page-product-single .product-decant-size-option input:focus-visible + .product-decant-size-text {
  outline: 2px solid #9a6b48;
  outline-offset: 2px;
}

body.alt-layout.page-product-single .product-single-cart {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.alt-layout.page-product-single .product-single-cart--has-decant {
  flex-direction: column;
  gap: 1rem;
}

body.alt-layout.page-product-single .product-single-cart-size-row {
  width: 100%;
}

body.alt-layout.page-product-single .product-single-cart-actions-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

body.alt-layout.page-product-single .product-qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e0d8ce;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.04);
}

body.alt-layout.page-product-single .qty-btn {
  width: 44px;
  height: 50px;
  border: none;
  background: transparent;
  color: #555;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

body.alt-layout.page-product-single .qty-btn:hover {
  background: #f5f0ea;
  color: #111;
}

body.alt-layout.page-product-single .product-qty-input {
  width: 50px;
  height: 50px;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  background: transparent;
  appearance: textfield;
  -moz-appearance: textfield;
}

body.alt-layout.page-product-single .product-qty-input::-webkit-outer-spin-button,
body.alt-layout.page-product-single .product-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.alt-layout.page-product-single .product-add-btn {
  flex: 1 1 180px;
  min-height: 50px;
  padding: 0 1.5rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 16px rgba(17, 17, 17, 0.16);
}

body.alt-layout.page-product-single .product-add-btn:hover {
  background: linear-gradient(135deg, #222 0%, #111 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.2);
}

body.alt-layout.page-product-single .fg-spec {
  margin-top: 0;
  padding: 1.35rem 1.25rem 0.45rem;
  background: #141414;
  color: #f7f1e6;
  border-radius: 4px;
}

body.alt-layout.page-product-single .fg-spec-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #d4bc7a;
}

body.alt-layout.page-product-single .fg-spec h2 {
  margin: 0 0 1rem;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #f7f1e6;
}

body.alt-layout.page-product-single .fg-spec-list {
  margin: 0;
}

body.alt-layout.page-product-single .fg-spec-item {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(212, 188, 122, 0.28);
}

body.alt-layout.page-product-single .fg-spec-item dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4bc7a;
}

body.alt-layout.page-product-single .fg-spec-item dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #f7f1e6;
}

body.alt-layout.page-product-single .fg-story {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 1.75rem 1.5rem;
  background: #fffdf8;
  border: 1px solid #e4d7bc;
}

body.alt-layout.page-product-single .fg-story-label p {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #b8956c;
}

body.alt-layout.page-product-single .fg-story-label h2 {
  margin: 0;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #141414;
}

body.alt-layout.page-product-single .fg-story-body {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.85;
  color: #3d362c;
}

@media (max-width: 768px) {
  body.alt-layout.page-product-single .main-content {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: 32px;
  }

  body.alt-layout.page-product-single .product-single-cart {
    flex-direction: column;
    align-items: stretch;
  }

  body.alt-layout.page-product-single .product-single-cart-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.alt-layout.page-product-single .product-decant-size-options {
    max-width: none;
  }

  body.alt-layout.page-product-single .product-qty-wrap {
    align-self: center;
  }

  body.alt-layout.page-product-single .product-add-btn {
    width: 100%;
    flex: 1 1 auto;
  }

  body.alt-layout.page-product-single .fg-spec-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  body.alt-layout.page-product-single .fg-story {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1rem;
  }

  body.alt-layout.page-product-single .product-gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.alt-layout.page-product-single .product-main-image-wrap {
    min-height: 0;
    aspect-ratio: 1 / 1;
    max-height: min(72vw, 420px);
  }

  body.alt-layout.page-product-single .product-thumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  body.alt-layout.page-product-single .product-thumb-btn {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    scroll-snap-align: start;
  }
}
