/**
 * Ficha de producto — usa variables de raiz.css (:root).
 */

.product-page {
  background: #fdfcfa;
}

.page-hero--product {
  padding: 0.85rem 0 0.25rem;
  background: #fdfcfa;
}

.page-hero--product .breadcrumbs {
  margin-bottom: 0;
}

.breadcrumbs__sep {
  margin: 0 0.35rem;
  color: #b8b8b8;
  user-select: none;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  padding: 1.25rem 0 2.75rem;
  align-items: start;
}

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

.product-detail__gallery {
  position: sticky;
  top: 0.75rem;
}

@media (max-width: 900px) {
  .product-detail__gallery {
    position: static;
  }
}

.product-detail__main {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(42, 58, 46, 0.06);
}

.product-detail__hero-img {
  width: 100%;
  aspect-ratio: 1 / 0.92;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.product-detail__badge-gluten {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  width: clamp(4.25rem, 12vw, 5.35rem);
  height: auto;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(42, 58, 46, 0.12));
}

.product-detail__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(42, 58, 46, 0.12);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: #5a5a5a;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.product-detail__nav:hover {
  background: #fff;
  color: var(--green);
  box-shadow: 0 4px 16px rgba(42, 58, 46, 0.18);
}

.product-detail__nav:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.product-detail__nav--prev {
  left: 0.55rem;
}

.product-detail__nav--next {
  right: 0.55rem;
}

.product-detail__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.product-detail__thumb {
  border: 2px solid #e5e3df;
  padding: 0;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.82;
  transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-detail__thumb:hover {
  opacity: 1;
}

.product-detail__thumb.is-active {
  opacity: 1;
  border-color: var(--pink);
  box-shadow: 0 0 0 1px rgba(229, 152, 155, 0.35);
}

.product-detail__thumbs img {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: cover;
  display: block;
}

.product-detail__info {
  padding: clamp(0.15rem, 1vw, 0.5rem) 0 0 clamp(0.25rem, 2vw, 1rem);
  background: transparent;
}

.product-detail__name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #3d5244;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.product-detail__subtitle {
  color: #7a7a7a;
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.45;
}

.product-detail__price {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 3.2vw, 1.72rem);
  color: var(--pink);
  font-weight: 700;
  margin: 0 0 1.1rem;
  letter-spacing: 0.03em;
}

.product-detail__description {
  color: #737373;
  margin: 0 0 1.65rem;
  line-height: 1.72;
  font-size: 0.96rem;
  font-weight: 400;
  max-width: 34rem;
}

.product-detail__features {
  list-style: none;
  padding: 1.15rem 0.35rem;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.65);
}

.product-detail__feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  flex: 1;
  padding: 0 0.85rem;
  position: relative;
  min-width: 0;
}

.product-detail__feat:not(:first-child) {
  border-left: 1px solid #e3e3e3;
}

@media (max-width: 520px) {
  .product-detail__features {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    gap: 0;
    padding: 1rem 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .product-detail__feat {
    flex: 0 0 auto;
    min-width: 6.5rem;
  }
}

.product-detail__feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: transparent;
}

.product-detail__feat-icon img {
  width: 3.35rem;
  height: 3.35rem;
  object-fit: contain;
  display: block;
}

.product-detail__feat-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #4d5c52;
  max-width: 6.5rem;
  line-height: 1.3;
}

.stock-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 1.15rem;
}

.stock-line--ok {
  color: #3d5244;
}

.stock-line--out {
  color: #a94442;
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stock-line--ok .stock-dot {
  background: #4a7c59;
}

.stock-line--out .stock-dot {
  background: #c85c59;
}

.stock-detail {
  margin: -0.35rem 0 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #4d5c52;
}

.stock-detail strong {
  font-weight: 700;
  color: #3d5244;
}

.stock-detail--muted {
  color: #888;
  font-size: 0.84rem;
}

/* Banner de confianza: solo columna de compra (mismo ancho máximo que botones) */
.product-detail__info .product-detail__trust-banner-wrap {
  width: 100%;
  max-width: 26rem;
  margin-top: 0;
}

.product-detail__trust-banner-img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  border-radius: 14px;
  box-shadow: 0 4px 22px rgba(42, 58, 46, 0.06);
}

.product-promo-banner {
  padding: 0.25rem 0 2.75rem;
}

.product-promo-banner__figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(42, 58, 46, 0.08);
  border: 1px solid rgba(58, 90, 64, 0.08);
}

.product-promo-banner__media {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.product-detail__cart-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0;
  max-width: 26rem;
}

.product-detail__buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
}

.product-detail__buy-row .product-detail__qty {
  flex: 0 0 auto;
}

.product-detail__buy-row .product-detail__btn-cart {
  flex: 1 1 min(11rem, 100%);
  border-radius: var(--radius-sm);
  padding: 0.72rem 1.1rem;
  font-weight: 600;
  font-size: 0.93rem;
  gap: 0.45rem;
  border-width: 1px;
  box-shadow: none;
}

@media (max-width: 480px) {
  .product-detail__buy-row {
    flex-direction: column;
  }

  .product-detail__buy-row .product-detail__qty {
    width: 100%;
    justify-content: center;
  }

  .product-detail__buy-row .product-detail__btn-cart {
    width: 100%;
    justify-content: center;
  }
}

.product-detail__buy-now {
  margin-top: 0 !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.72rem 1.25rem !important;
  font-weight: 600 !important;
  font-size: 0.93rem !important;
  border-width: 1px !important;
}

.product-detail__no-cart {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

.qty.qty--product,
.product-detail__qty.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(229, 152, 155, 0.65);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
  box-shadow: none;
}

.qty.qty--product button,
.product-detail__qty button {
  width: 2.35rem;
  border: 0;
  background: var(--white);
  cursor: pointer;
  font-size: 1.05rem;
  color: #555;
  transition: background 0.15s ease;
}

.qty.qty--product button:hover,
.product-detail__qty button:hover {
  background: rgba(249, 234, 234, 0.85);
}

.qty.qty--product input,
.product-detail__qty input {
  width: 2.5rem;
  text-align: center;
  border: 0;
  border-inline: 1px solid rgba(229, 152, 155, 0.28);
  font: inherit;
  font-weight: 600;
  color: #444;
  background: var(--white);
  -moz-appearance: textfield;
}

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

/* Paneles Descripción / Ingredientes / Conservación */
.product-panels {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0;
  margin-bottom: 2.5rem;
  background: #ecebe6;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e0ddd6;
  box-shadow: var(--shadow);
}

@media (max-width: 700px) {
  .product-panels {
    grid-template-columns: 1fr;
    border-radius: var(--radius-sm);
  }
}

.product-panels__tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.85rem 0;
  background: #e8e6e1;
  border-right: 1px solid #dcd8cf;
}

@media (max-width: 700px) {
  .product-panels__tabs {
    flex-direction: row;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0.5rem;
    gap: 0.35rem;
    border-right: 0;
    border-bottom: 1px solid #dcd8cf;
    -webkit-overflow-scrolling: touch;
  }
}

.product-panels__tabs button {
  position: relative;
  text-align: left;
  padding: 0.65rem 1rem 0.65rem 1.15rem;
  border: 0;
  background: transparent;
  border-radius: 0;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  color: #666;
  transition: color 0.15s ease, background 0.15s ease;
}

@media (max-width: 700px) {
  .product-panels__tabs button {
    flex: 1 0 auto;
    white-space: nowrap;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    text-align: center;
  }

  .product-panels__tabs button.is-active {
    background: rgba(255, 255, 255, 0.85);
  }
}

.product-panels__tabs button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.15s ease;
}

@media (max-width: 700px) {
  .product-panels__tabs button::before {
    display: none;
  }
}

.product-panels__tabs button:hover {
  color: var(--green);
}

.product-panels__tabs button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.35);
}

.product-panels__tabs button.is-active::before {
  background: var(--pink);
}

.product-panels__content {
  background: var(--white);
  padding: 1.35rem 1.5rem;
  min-height: 8rem;
}

@media (max-width: 700px) {
  .product-panels__content {
    padding: 1.1rem 1rem;
    min-height: 0;
  }
}

.ac-panel {
  position: relative;
  padding-right: 1.5rem;
}

@media (max-width: 700px) {
  .ac-panel {
    padding-right: 1.75rem;
  }
}

.ac-panel::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0.35rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #c5c5c5;
  border-bottom: 2px solid #c5c5c5;
  transform: rotate(45deg);
  opacity: 0.55;
  pointer-events: none;
}

.ac-panel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.96rem;
}

.ac-panel[hidden] {
  display: none;
}

/* ----- También te puede gustar (título con ícono principal + líneas) ----- */
.product-related {
  --related-accent: #7a8d84;
}

.product-related__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 1.65rem;
  color: var(--related-accent);
}

.product-related__title-side {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 0;
  min-width: 0;
}

.product-related__title-side--left {
  justify-content: flex-end;
}

.product-related__title-side--right {
  justify-content: flex-start;
}

.product-related__title-line {
  flex: 1 1 auto;
  min-width: 1.25rem;
  height: 1px;
  background: currentColor;
  opacity: 0.88;
}

.product-related__title-icon {
  flex-shrink: 0;
  width: clamp(1.6rem, 3.6vw, 2rem);
  height: clamp(1.6rem, 3.6vw, 2rem);
  object-fit: contain;
  display: block;
  /* Aproxima el logo al mismo tono salvia que el título */
  filter: brightness(0) saturate(100%) invert(58%) sepia(9%) saturate(380%) hue-rotate(104deg) brightness(94%) contrast(88%);
}

.product-related__title-text {
  flex-shrink: 0;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--related-accent);
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 420px) {
  .product-related__title-row {
    gap: 0.45rem;
  }

  .product-related__title-line {
    min-width: 0.65rem;
  }

  .product-related__title-icon {
    width: 1.45rem;
    height: 1.45rem;
  }
}

