/*
 * ibercook-products.css
 * Estilos de listado de productos y ficha de producto.
 * Depende de los tokens definidos en ibercook.css (--ib-*).
 */

/* ============================================================
   LISTADO DE PRODUCTOS — scaffold
   ============================================================ */
/* ── Listado y departamento: foto food full-page + textura ── */
/* ::after  — fotografía food (z-index:0)
   ::before — textura grain  (z-index:1, mix-blend-mode: multiply)
   > *      — contenido      (z-index:2) */
.prd-page {
    position: relative;
    background: var(--ib-off-white);
}

.prd-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/ib/textura-fondo.jpg');
    background-repeat: repeat;
    background-size: 512px 512px;
    opacity: 0.15;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

.prd-page > * { position: relative; z-index: 2; }

/* Páginas de marca (lockedBrand: /ibercook, /ibercook-natural) llevan
   main.bg-platos — el listado general de /productos no la lleva y
   conserva el fondo opaco de arriba. */
main.bg-platos .prd-page {
    background: var(--ib-off-white-t);
}

/* ── Ficha de producto: textura grain + fondo bg-platos del <main> ── */
/* La foto de producto aparece además, propia, en la banda hero via .prd-show__hero-bg */
.prd-show {
    position: relative;
    background: var(--ib-off-white-t);
}

.prd-show::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/ib/textura-fondo.jpg');
    background-repeat: repeat;
    background-size: 512px 512px;
    opacity: 0.15;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

.prd-show > * { position: relative; z-index: 1; }

.prd-page {
    max-width: var(--ib-mw);
    margin: 0 auto;
    padding-bottom: 5rem;
}

/* -- Hero central -- */
.prd-index-hero {
    text-align: center;
    padding: 3rem var(--ib-pad) 2rem;
}

.prd-index-hero__title {
    font-family: var(--ib-font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.05;
}

.prd-index-hero__eyebrow {
    font-family: var(--ib-font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ib-red);
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.prd-index-hero__description {
    font-family: var(--ib-font-body);
    font-size: 1.125rem;
    color: var(--ib-navy);
    margin: 1rem auto 0;
    max-width: 900px;
    line-height: 1.6;
}

/* Cabecera de /ibercook y /ibercook-natural, editable desde admin (campo
   catalogo_cabecera): primer párrafo = eyebrow, <h1> = título, resto de párrafos =
   descripción — sin clases, se distingue por posición dentro del bloque.
   Eyebrow y H1 cambian de color según la marca (rojo Ibercook / teal Ibercook
   Natural, nodo Figma 207:1315 vs 207:1775); la descripción es siempre navy. */
.prd-index-hero-heading p:first-child,
.prd-index-hero-heading h1 {
    color: var(--ib-red);
}
.prd-index-hero-heading.is-natural p:first-child,
.prd-index-hero-heading.is-natural h1 {
    color: var(--ib-teal);
}

.prd-index-hero-heading p:first-child {
    font-family: var(--ib-font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.prd-index-hero-heading h1 {
    font-family: var(--ib-font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.05;
}

.prd-index-hero-heading p:not(:first-child) {
    font-family: var(--ib-font-body);
    font-size: 1.125rem;
    color: var(--ib-navy);
    margin: 1rem auto 0;
    max-width: 900px;
    line-height: 1.6;
}

/* -- Breadcrumb (solo intranet) -- */
.prd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    color: var(--ib-gray);
    padding: 1.25rem var(--ib-pad) 0;
}
.prd-breadcrumb a {
    color: var(--ib-gray);
    text-decoration: none;
    transition: color 0.15s;
}
.prd-breadcrumb a:hover { color: var(--ib-navy); }
.prd-breadcrumb__sep { color: var(--ib-light-gray); }

/* ============================================================
   ÁREA DE FILTROS — buscador + chips centrados
   ============================================================ */
.prd-filters {
    padding: 0 var(--ib-pad) 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Buscador — pill centrada (estilo Figma: borde gris, icono izq, 414px) */
.prd-search {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 414px;
    background: var(--ib-off-white);
    border: 1.5px solid var(--ib-gray);
    border-radius: 32px;
    padding: 0.25rem 0.375rem 0.25rem 1rem;
    overflow: hidden;
}

.prd-search__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 0.5rem;
    color: var(--ib-red);
}

.prd-search__input {
    flex: 1;
    height: 38px;
    padding: 0 0.5rem;
    border: none;
    background: transparent;
    font-family: var(--ib-font-body);
    font-size: 1rem;
    color: var(--ib-navy);
    min-width: 0;
}
.prd-search__input::placeholder { color: var(--ib-gray); }
.prd-search__input:focus { outline: none; }

.prd-search__btn {
    height: 36px;
    padding: 0 1rem;
    border-radius: 24px;
    background: var(--ib-navy);
    color: var(--ib-off-white);
    border: none;
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.prd-search__btn:hover { opacity: 0.88; }

/* Chips de filtro — centrados */
.prd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
}

/* Chip individual */
.prd-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 40px;
    font-family: var(--ib-font-body);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: 1.5px solid;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.prd-chip--default {
    background: var(--ib-off-white);
    border-color: #cccccc;
    color: var(--ib-gray);
}
.prd-chip--default:hover {
    border-color: var(--ib-navy);
    color: var(--ib-navy);
}

.prd-chip--active {
    background: var(--ib-navy);
    border-color: var(--ib-navy);
    color: var(--ib-off-white);
}

/* Dropdown filtro activo (ej: "Soluciones: Tapeo") */
.prd-filter-active {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    height: 48px;
    padding: 0 1rem 0 1.5rem;
    border-radius: 16px;
    background: var(--ib-off-white);
    border: 1.5px solid var(--ib-navy);
    font-family: var(--ib-font-body);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ib-navy);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.prd-filter-active:hover { background: var(--ib-light-gray); }
.prd-filter-active svg { flex-shrink: 0; }

/* ============================================================
   SECCIONES DE PRODUCTO — agrupadas por categoría
   ============================================================ */
.prd-sections {
    padding: 0 var(--ib-pad);
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.prd-section__header {
    margin-bottom: 1.5rem;
}

.prd-section__eyebrow {
    font-family: var(--ib-font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ib-red);
    margin: 0 0 0.25rem;
    line-height: 1;
}

.prd-section__title {
    font-family: var(--ib-font-heading);
    font-size: clamp(1.875rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 0 0.5rem;
    line-height: 1.05;
}

.prd-section__description {
    font-family: var(--ib-font-body);
    font-size: 1.125rem;
    color: var(--ib-navy);
    line-height: 1.55;
    margin: 0 0 0.5rem;
    max-width: 600px;
}

.prd-section__count {
    font-family: var(--ib-font-body);
    font-size: 1rem;
    color: var(--ib-blue);
    margin: 0 0 1.25rem;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.prd-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4375rem;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.prd-card {
    background: var(--ib-off-white);
    border: 1px solid #cccccc;
    border-radius: var(--ib-radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.18s, box-shadow 0.18s;
}

.prd-card:hover {
    border-color: var(--ib-navy);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 52, 86, 0.1);
}

/* Imagen */
.prd-card__image {
    display: flex;
    width: 100%;
    height: 267px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--ib-light-gray);
    align-items: center;
    justify-content: center;
}

.prd-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.prd-card:hover .prd-card__image img { transform: scale(1.03); }

.prd-card__image--empty { color: #cccccc; }

/* Cuerpo */
.prd-card__body {
    padding: 48px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.prd-card__category {
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ib-red);
    line-height: 1;
    margin: 0;
}

.prd-card__name {
    font-family: var(--ib-font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ib-navy);
    line-height: 1.2;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.prd-card__name a {
    color: inherit;
    text-decoration: none;
}

/* Badge "Novedad" */
.prd-card__novedad {
    position: absolute;
    top: 31px;
    left: 23px;
    z-index: 1;
    background: var(--ib-red);
    border-radius: var(--ib-radius-pill);
    padding: 2px 16px 4px;
    font-family: var(--ib-font-body);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ib-off-white);
    line-height: 1;
    white-space: nowrap;
}

/* Badge de marca (círculo top-right). Imagen placeholder (círculo de color +
   nombre) hasta que el cliente envíe el logo real — ver .vscode/figma.md */
.prd-card__brand-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
}
.prd-card__brand-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   FEATURED CARD
   ============================================================ */
.prd-featured {
    background: var(--ib-off-white);
    border-radius: var(--ib-radius);
    display: flex;
    align-items: center;
    gap: 26px;
    overflow: hidden;
    border: 1px solid transparent;
    margin-bottom: 1.5rem;
    min-height: 344px;
    transition: border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.prd-featured:hover { border-color: var(--ib-navy); }

.prd-featured__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    padding: 2rem 0 2rem 2rem;
}

.prd-featured__tag {
    display: inline-flex;
    align-items: center;
    background: var(--ib-light-gray);
    border-radius: var(--ib-radius-pill);
    padding: 0.4rem 1rem;
    font-family: var(--ib-font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ib-navy);
    align-self: flex-start;
    line-height: 1;
}

.prd-featured__brand {
    font-family: var(--ib-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0;
    line-height: 1.05;
}

.prd-featured__image {
    flex-shrink: 0;
    width: min(414px, 40%);
    height: 344px;
    overflow: hidden;
}

.prd-featured__image img {
    width: 100%;
    height: 117%;
    object-fit: cover;
    margin-top: -8.5%;
    display: block;
}

/* Acordeones */
.prd-accordion {
    border: 1px solid var(--ib-light-gray);
    border-radius: var(--ib-radius);
    overflow: hidden;
    margin-top: 1rem;
}

.prd-accordion > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    background: var(--ib-off-white);
    cursor: pointer;
    list-style: none;
    font-family: var(--ib-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ib-navy);
    transition: background 0.15s;
}

.prd-accordion > summary:hover { background: var(--ib-light-gray); }
.prd-accordion > summary::-webkit-details-marker { display: none; }

.prd-accordion > summary::after {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%231E3456' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.2s;
}

.prd-accordion[open] > summary::after { transform: rotate(180deg); }

.prd-accordion__body {
    padding: 1.5rem;
    background: #ffffff;
    border-top: 1px solid var(--ib-light-gray);
    display: grid;
    gap: 1rem;
}

/* Descarga */
.prd-download {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--ib-light-gray);
    border-radius: var(--ib-radius-sm);
    background: var(--ib-off-white);
    max-width: 620px;
}

.prd-download__title {
    font-family: var(--ib-font-body);
    font-size: 0.9375rem;
    color: var(--ib-navy);
    font-weight: 500;
    margin: 0;
}

.prd-download__actions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.prd-download__actions .ib-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Ficha técnica: componente específico, sin exponer el título interno del
   registro ni el nombre físico del archivo. */
.prd-technical-download {
    width: 100%;
    max-width: 820px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #cccccc;
    border-radius: var(--ib-radius);
    background: var(--ib-off-white);
}

.prd-technical-download__icon {
    width: 64px;
    color: #c9cdd3;
    line-height: 0;
}

.prd-technical-download__icon svg {
    display: block;
    width: 100%;
    height: auto;
}

.prd-technical-download__title {
    margin: 0;
    font-family: var(--ib-font-heading);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 500;
    color: var(--ib-navy);
}

.prd-technical-download__button svg {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .prd-technical-download {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 1rem;
        padding: 1.125rem;
    }

    .prd-technical-download__icon { width: 52px; }

    .prd-technical-download__button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.prd-extra-resources {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.prd-download--resource {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.prd-download__cover {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: var(--ib-radius-sm);
    margin-bottom: 0.25rem;
}

.prd-download__embed {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--ib-radius-sm);
}

.prd-download__embed iframe,
.prd-download__embed video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Alérgenos — nodo Figma 666:7907: botón +/- circular en vez de la flecha genérica
   del resto de acordeones (limitado a esta sección vía .prd-accordion--allergens
   para no tocar Nutrición/Ficha técnica), y una card redondeada por grupo
   ("Contiene:"/"Puede contener:") con los iconos en columna (icono + etiqueta
   debajo, centrado) en vez de la fila icono+texto que había antes. */
.prd-accordion--allergens > summary::after {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--ib-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}
.prd-accordion--allergens[open] > summary::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    transform: none;
}

.prd-allergen-group {
    background: var(--ib-off-white);
    border: 1px solid #ccc;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.prd-allergen-group__title {
    margin: 0 0 0.75rem;
    font-family: var(--ib-font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ib-navy);
}

.prd-allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.prd-allergen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    width: 90px;
}

.prd-allergen img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.prd-allergen__name {
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ib-navy);
    text-align: center;
}

/* Modo de cocinado — plantilla CKEditor "product-cooking" (icono + texto en
   columnas, nodo Figma "Modo de cocinado"). */
.prd-cooking-content {
    line-height: 1.75;
    color: var(--ib-blue);
}

/* El HTML legacy trae iconos con tamaños intrínsecos muy dispares y, en
   ocasiones, dimensiones inline. Se conserva su proporción y se limita su
   tamaño visual al usado por el antiguo detalle de producto. */
.prd-cooking-content img {
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 220px);
    max-height: 180px;
    object-fit: contain;
}

.prd-cooking-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 5rem);
}
.prd-cooking-step {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}
.prd-cooking-step__icon {
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 180px) !important;
    max-height: 150px !important;
    object-fit: contain;
}
.prd-cooking-step__text {
    margin: 0;
    font-family: var(--ib-font-body);
    font-size: 0.9375rem;
    color: var(--ib-blue);
    line-height: 1.6;
}
.prd-cooking-step__copy {
    font-family: var(--ib-font-body);
    font-size: 0.9375rem;
    color: var(--ib-blue);
    line-height: 1.6;
}
.prd-cooking-step__copy > :first-child { margin-top: 0; }
.prd-cooking-step__copy > :last-child { margin-bottom: 0; }

@media (max-width: 900px) {
    .prd-cooking-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .prd-cooking-steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }
}

/* Nutrición — tabla a todo el ancho, franja superior navy en vez del borde
   gris genérico del resto de acordeones (nodo Figma 92:1563). */
.prd-show .prd-accordion--nutrition .prd-accordion__body {
    border-top: 2px solid var(--ib-navy);
    padding-top: 0;
}

.prd-nutrition {
    display: grid;
    gap: 0;
}

.prd-nutrition__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    font-family: var(--ib-font-body);
    font-size: 0.9375rem;
    color: var(--ib-navy);
}
.prd-nutrition__row:nth-child(odd) { background: var(--ib-light-gray); }
.prd-nutrition__row strong { color: var(--ib-navy); font-weight: 500; }

/* Logística */
.prd-logistics { overflow-x: auto; }

.prd-logistics table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ib-font-body);
    font-size: 0.9375rem;
    min-width: 720px;
}

.prd-logistics th {
    text-align: left;
    padding: 0.75rem 1rem 0.75rem 0;
    color: var(--ib-gray);
    font-weight: 500;
    border-bottom: 1px solid var(--ib-light-gray);
    white-space: nowrap;
}

.prd-logistics td {
    padding: 0.75rem 1.5rem 0.75rem 0;
    color: var(--ib-navy);
    font-weight: 600;
    border-bottom: 1px solid var(--ib-light-gray);
}

.prd-logistics__product-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--ib-navy);
    color: var(--ib-off-white);
    font-family: var(--ib-font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--ib-radius-sm) var(--ib-radius-sm) 0 0;
    margin-bottom: -1px;
}

/* Relacionados */
.prd-related { margin-top: 3.5rem; }

.prd-related__title {
    font-family: var(--ib-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 0 2rem;
}

.prd-related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4375rem;
}

/* ============================================================
   FICHA DE PRODUCTO — diseño Figma 92:1563
   ============================================================ */

.prd-show {
    background: var(--ib-off-white-t);
    padding-bottom: 5rem;
}

/* ── Hero banda completa ─────────────────────────── */
.prd-show__hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
}

/* Textura de fondo fija (no depende del producto) — cubre toda la banda */
.prd-show__hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--ib-off-white) url('/images/ib/textura-fondo.jpg') repeat;
    background-size: 480px;
    opacity: 0.45;
    mix-blend-mode: multiply;
}

/* Imaxe do produto nunha columna propia. A ampliación queda limitada a 900 px,
   moi por baixo do antigo fondo a pantalla completa, e nunca invade o texto. */
.prd-show__hero-image {
    position: relative;
    z-index: 2;
    pointer-events: none;
    min-width: 0;
    min-height: 560px;
    padding: clamp(2.5rem, 4vw, 4.5rem) clamp(2rem, 3vw, 3.5rem);
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}
.prd-show__hero-image img {
    width: 100%;
    height: auto;
    max-width: 900px;
    max-height: none;
    object-fit: contain;
    object-position: top center;
    display: block;
}

/* Reixa estable: a imaxe e os textos non comparten espazo nin se solapan. */
.prd-show__hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(520px, 2fr);
    max-width: 1600px;
    margin: 0 auto;
    min-height: 560px;
}

.prd-show__gallery {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.prd-show__thumb {
    position: relative;
    width: 118px;
    height: 118px;
    padding: 0;
    border-radius: var(--ib-radius);
    overflow: hidden;
    border: 1px solid var(--ib-blue);
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.prd-show__thumb:hover { border-color: var(--ib-navy); border-width: 2px; }
.prd-show__thumb img,
.prd-show__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* Triángulo de "reproducir" sobre las miniaturas de vídeo */
.prd-show__thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prd-show__thumb-play::before {
    content: '';
    width: 0;
    height: 0;
    margin-left: 3px;
    border-style: solid;
    border-width: 9px 0 9px 15px;
    border-color: transparent transparent transparent var(--ib-off-white);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

/* ── Lightbox de galería (<dialog> nativo) ───────────── */
.prd-lightbox {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 92vw;
    max-height: 92vh;
    overscroll-behavior: contain;
}
.prd-lightbox::backdrop {
    background: rgba(30, 52, 86, 0.92);
}
.prd-lightbox__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92vw;
    height: 88vh;
}
.prd-lightbox__stage img,
.prd-lightbox__stage video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--ib-radius-sm);
}
.prd-lightbox__close,
.prd-lightbox__nav {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 245, 245, 0.15);
    color: var(--ib-off-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
}
.prd-lightbox__close:hover,
.prd-lightbox__nav:hover { background: rgba(245, 245, 245, 0.3); }
.prd-lightbox__close {
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
    line-height: 1;
}
.prd-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    font-size: 2rem;
    line-height: 1;
}
.prd-lightbox__nav--prev { left: 1.5rem; }
.prd-lightbox__nav--next { right: 1.5rem; }
.prd-lightbox__counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: var(--ib-off-white);
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    opacity: 0.85;
}

@media (max-width: 600px) {
    .prd-lightbox__nav { width: 44px; height: 44px; font-size: 1.5rem; }
    .prd-lightbox__nav--prev { left: 0.5rem; }
    .prd-lightbox__nav--next { right: 0.5rem; }
}

/* Panel de texto opaco e independente: evita perda de contraste e calquera
   interferencia visual da fotografía. */
.prd-show__info-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    min-width: 0;
    padding: 3rem clamp(2rem, 3vw, 3.5rem);
    box-sizing: border-box;
    background: rgba(245, 245, 245, 0.94);
}

.prd-show__hero-inner > .prd-show__info-col:only-child {
    grid-column: 1 / -1;
    width: min(760px, 100%);
    margin-left: auto;
}

.prd-show__breadcrumb {
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    color: var(--ib-navy);
    margin: 0;
    opacity: 0.75;
}
.prd-show__breadcrumb a {
    color: inherit;
    text-decoration: none;
}
.prd-show__breadcrumb a:hover { text-decoration: underline; }

.prd-show__title {
    font-family: var(--ib-font-heading);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    color: var(--ib-navy);
    line-height: 1;
    margin: 0;
    /*text-transform: lowercase;*/
}
.prd-show__title::first-letter {
  /*text-transform: uppercase;*/ /* Pone solo la primera letra en mayúscula */
}

/* Pastillas de solución — crema del Figma (#eee0cb) */
.prd-show__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.prd-show__tag {
    display: inline-flex;
    align-items: center;
    background: #eee0cb;
    color: var(--ib-blue);
    font-family: var(--ib-font-body);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.375rem 1.375rem;
    border-radius: 3rem;
    line-height: 1;
    white-space: nowrap;
}

.prd-show__code {
    font-family: var(--ib-font-body);
    font-size: 0.875rem;
    color: var(--ib-gray);
    margin: 0;
}

.prd-show__description {
    font-family: var(--ib-font-body);
    font-size: 1rem;
    color: var(--ib-blue);
    line-height: 1.75;
    margin: 0;
}

.prd-show__seal {
    display: block;
    width: auto;
    max-width: min(220px, 100%);
    max-height: 120px;
    object-fit: contain;
    object-position: left center;
}

.prd-show__body {
    font-family: var(--ib-font-body);
    font-size: 1rem;
    color: var(--ib-blue);
    line-height: 1.75;
}

/* Badge "Novedad" sobre la imagen */
.prd-show__novedad {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 3;
    background: var(--ib-red);
    color: var(--ib-off-white);
    font-family: var(--ib-font-body);
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0.375rem 1.25rem;
    border-radius: var(--ib-radius-pill);
    line-height: 1;
}

/* Admin bar */
.prd-show__admin-bar {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem var(--ib-pad) 0;
}

/* ── Área de contenido (acordeones + relacionados) ── */
.prd-show__content {
    max-width: 1290px;
    margin: 0 auto;
    padding: 3.5rem var(--ib-pad);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Acordeones — estilos específicos del show page */
.prd-show .prd-accordion {
    border: none;
    border-radius: 0;
    border-top: 1.5px solid var(--ib-light-gray);
    margin-top: 0;
}
.prd-show .prd-accordion:last-of-type {
    border-bottom: 1.5px solid var(--ib-light-gray);
}
.prd-show .prd-accordion > summary {
    font-size: 1.5rem;
    font-weight: 500;
    padding: 1.5rem 0;
    background: transparent;
}
.prd-show .prd-accordion > summary:hover { background: transparent; opacity: 0.8; }
.prd-show .prd-accordion__body {
    background: transparent;
    border-top: 1px solid var(--ib-light-gray);
    padding: 1.5rem 0 2rem;
}

/* Icono "+" circular (nodo Figma 92:1563, Component9) en vez de la flecha
   genérica, para todas las secciones desplegables de la ficha pública. */
.prd-show .prd-accordion > summary::after {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    background-color: var(--ib-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 17px;
    transform: none;
}
.prd-show .prd-accordion[open] > summary::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Sección relacionados dentro del show */
.prd-show__related {
    margin-top: 4rem;
}
.prd-show__related-title {
    font-family: var(--ib-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 0 2rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .prd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .prd-related__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .prd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prd-related__grid { grid-template-columns: repeat(2, 1fr); }
    .prd-featured { flex-direction: column; min-height: auto; }
    .prd-featured__info { padding: 1.5rem 1.5rem 0; }
    .prd-featured__image { width: 100%; height: 260px; }
    .prd-featured__image img { height: 100%; margin-top: 0; }
    /* Show page (nodo Figma 599:8098, mobile) — la imagen del producto deja de
       ser un fondo a sangre completa con texto encima: pasa a ser un bloque
       normal a la vista completa, y los textos van debajo, no sobre ella.
       Sin textura ni degradado: ya no hace falta, la imagen se ve entera. */
    .prd-show__hero {
        min-height: auto;
    }
    .prd-show__hero-bg {
        display: none;
    }
    .prd-show__hero-image {
        width: 100%;
        min-height: 0;
        max-height: none;
        padding: 1.5rem var(--ib-pad);
    }
    .prd-show__hero-image img {
        width: auto;
        max-width: 100%;
        max-height: 360px;
    }
    .prd-show__hero-inner {
        display: block;
        min-height: auto;
    }
    .prd-show__info-col {
        width: 100%;
        padding: 2rem var(--ib-pad);
        background: none;
    }
}

@media (min-width: 901px) and (max-width: 1050px) {
    .prd-show__hero { min-height: auto; }
    .prd-show__hero-bg { display: none; }
    .prd-show__hero-image {
        width: 100%;
        min-height: 0;
        padding: 1.5rem var(--ib-pad);
    }
    .prd-show__hero-image img {
        width: auto;
        max-width: 100%;
        max-height: 360px;
    }
    .prd-show__hero-inner {
        display: block;
        min-height: auto;
    }
    .prd-show__info-col {
        width: 100%;
        padding: 2rem var(--ib-pad);
        background: none;
    }
}

@media (max-width: 600px) {
    .prd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prd-related__grid { grid-template-columns: 1fr; }
    .prd-chip { font-size: 1rem; padding: 0 1rem; height: 40px; }
    .prd-index-hero { padding: 2rem var(--ib-pad) 1.5rem; }
    .prd-show__related-title,
    .prd-related__title { font-size: 1.75rem; }

    /* Con la card a ~2 columnas el ancho baja mucho y el badge "Novedad"
       (arriba-izq) y el círculo de marca (arriba-dcha) llegan a solaparse
       además de verse desproporcionados — se reducen ambos en mobile */
    .prd-card__novedad {
        top: 12px;
        left: 12px;
        padding: 2px 10px 3px;
        font-size: 0.875rem;
    }
    .prd-card__brand-badge {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

/* ============================================================
   FILTRO DE CATEGORÍAS ("Soluciones") — nodo Figma 201:1630
   Desplegable multi-selección que se complementa con los demás
   filtros (marca, departamento, búsqueda).
   ============================================================ */
.cat-filter {
    position: relative;
    width: max-content;
    min-width: 224px;
    z-index: 5;
}

.cat-filter__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    height: 48px;
    padding: 0 0.75rem 0 1.5rem;
    background: var(--ib-off-white);
    border: 1.5px solid var(--ib-navy);
    border-radius: var(--ib-radius);
    color: var(--ib-navy);
    font-family: var(--ib-font-body);
    font-size: 1.125rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: border-radius 0.15s;
}
.cat-filter__toggle svg { flex-shrink: 0; transition: transform 0.15s; }
.cat-filter.is-open .cat-filter__toggle svg { transform: rotate(180deg); }

.cat-filter__panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 100%;
    width: max-content;
    max-width: 320px;
    background: var(--ib-off-white);
    border: 1px solid var(--ib-navy);
    border-radius: var(--ib-radius);
    padding: 1rem 1.5rem;
    box-shadow: 0 12px 32px rgba(30, 52, 86, 0.18);
}
.cat-filter.is-open .cat-filter__panel { display: flex; flex-direction: column; gap: 0.5rem; }

.cat-filter__check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ib-font-body);
    font-size: 1rem;
    color: var(--ib-navy);
    cursor: pointer;
}
.cat-filter__check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--ib-red);
}

.cat-filter__submit {
    margin-top: 0.5rem;
    height: 47px;
    border: none;
    border-radius: var(--ib-radius);
    background: var(--ib-red);
    color: var(--ib-white);
    font-family: var(--ib-font-body);
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.cat-filter__submit:hover { opacity: 0.87; }

/* z-index:3 > el z-index:2 que ".prd-page > *" aplica a todos los hijos
   directos: sin esto, el panel del desplegable queda tapado por las
   secciones de productos que van después en el DOM. */
.prd-filters { position: relative; z-index: 3; }

/* Barra del selector de categorías en páginas de marca (Ibercook / Ibercook Natural):
   va justo encima del listado de productos, alineada a la derecha (ver Figma nodo 207:1315). */
.prd-category-filter-bar {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    padding: 0 var(--ib-pad);
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .prd-category-filter-bar { justify-content: center; }
}
