/* ===================================
   11 - Detalle de producto
   Ficha editorial: galeria a la izquierda, datos a la derecha.
   Depende de 13-editorial.css (tokens, .sec, .btn-editorial) y de
   08-cards.css (.pcard, .pcard__flag para la marca de oferta).
   Solo necesario en pages/producto-detalle.html
   =================================== */

/* ===== Ruta de navegacion ===== */
.crumbs {
    padding: clamp(6.5rem, 13vh, 8rem) 0 1.1rem;
    background: var(--ivory);
    border-bottom: 1px solid var(--hairline);
    font-size: 0.78rem;
    color: var(--ink-mute);
}

.crumbs .sec__inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.crumbs a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.25s ease;
}

.crumbs a:hover {
    color: var(--gold-text);
}

.crumbs span[aria-hidden] {
    color: rgba(26, 23, 18, 0.28);
}

.crumbs #breadcrumb-product {
    color: var(--ink);
}

/* ===== Estructura de la ficha ===== */
.pdp-section {
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
}

.pdp {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
}

@media (min-width: 900px) {
    .pdp {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.pdp__sticky {
    position: sticky;
    top: 6.5rem;
}

/* ===== Galeria ===== */
.pdp-media {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-radius: 3px;
    background: var(--ivory-deep);
}

.pdp-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-media__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4rem;
    color: rgba(26, 23, 18, 0.16);
}

.pdp-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.pdp-thumb {
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-radius: 2px;
    background: var(--ivory-deep);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-thumb.is-active,
.pdp-thumb:hover {
    border-color: var(--color-gold);
}

/* ===== Datos del producto ===== */
.pdp__brand {
    margin: 0 0 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-text);
}

.pdp__name {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.06;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.pdp__family {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--ink-mute);
}

/* Precio: sin pegatina roja. El descuento se dice con palabras. */
.pdp__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
}

.pdp__price del {
    order: 1;
    font-size: 1rem;
    color: var(--ink-mute);
}

.pdp__price span {
    order: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    color: var(--ink);
}

.pdp__price small {
    order: 2;
    width: 100%;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--gold-text);
}

.pdp__stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.9rem 0 0;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

.pdp__stock::before {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--color-gold-dark);
}

.pdp__stock.is-out {
    color: var(--ink-mute);
}

.pdp__stock.is-out::before {
    background: rgba(26, 23, 18, 0.28);
}

.pdp__desc {
    margin: 1.75rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

/* ===== Ficha de datos ===== */
.pdp-specs {
    margin: 1.75rem 0 0;
    padding: 0;
}

.pdp-specs > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--hairline);
}

.pdp-specs > div:last-child {
    border-bottom: 1px solid var(--hairline);
}

.pdp-specs dt {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.pdp-specs dd {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink);
}

/* ===== Compra ===== */
.pdp__buy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 0;
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    overflow: hidden;
}

.qty button {
    width: 2.6rem;
    height: 3rem;
    border: 0;
    background: none;
    font-size: 1rem;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.25s ease;
}

.qty button:hover {
    background: var(--ivory);
}

.qty input {
    width: 2.6rem;
    height: 3rem;
    border: 0;
    background: none;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.pdp__buy .btn-editorial {
    flex: 1 1 14rem;
    justify-content: center;
    min-height: 3rem;
    padding-inline: 1.4rem;
    white-space: nowrap;
}

/* Variante clara: el verde de WhatsApp se queda solo en el icono */
.btn-editorial--ghost {
    border-color: var(--hairline);
    background: transparent;
    color: var(--ink);
}

.btn-editorial--ghost:hover {
    background: var(--ivory);
    border-color: var(--color-gold);
    color: var(--ink);
}

.btn-editorial--ghost .fa-whatsapp {
    font-size: 1rem;
    color: #25D366;
}

.btn-editorial[disabled] {
    background: var(--ivory-deep);
    border-color: var(--hairline);
    color: var(--ink-mute);
    cursor: not-allowed;
}

.btn-editorial[disabled]:hover {
    transform: none;
}

/* ===== Promesas ===== */
.pdp-promises {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
    margin: 2.25rem 0 0;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--hairline);
    list-style: none;
}

.pdp-promises li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.pdp-promises i {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    color: var(--color-gold-dark);
}

.pdp-promises strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}

.pdp-promises span {
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--ink-mute);
}

/* ===== Pestanas ===== */
.pdp-tabs {
    border: 1px solid var(--hairline);
    border-radius: 3px;
    background: var(--color-white);
    overflow: hidden;
}

.pdp-tabs__bar {
    display: flex;
    border-bottom: 1px solid var(--hairline);
}

.pdp-tabs__bar .tab-btn {
    flex: 1;
    padding: 1.1rem 1.5rem;
    border: 0;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mute);
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease;
}

.pdp-tabs__bar .tab-btn:hover {
    color: var(--ink);
    background: var(--ivory);
}

.pdp-tabs__bar .tab-btn.active {
    color: var(--ink);
    background: var(--color-white);
}

.pdp-tabs__panel {
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

#tab-description-text {
    margin: 0;
    max-width: 60rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--ink-soft);
}

#tab-info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 0 2.5rem;
}

#tab-info-content > * {
    padding: 0.75rem 0;
    border-top: 1px solid var(--hairline);
    font-size: 0.9rem;
    color: var(--ink-soft);
}

@media (max-width: 640px) {
    .pdp-promises {
        grid-template-columns: 1fr;
    }

    .pdp__buy .btn-editorial {
        flex: 1 1 100%;
    }
}
