/* ======================================
   PRODUCTOS - ACORDEÓN
====================================== */

.products-page-section {
    background: #fbfaf8;
}

.products-accordion {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.accordion-item,
.sub-accordion-item {
    overflow: hidden;
    border: 1px solid #e7dfd7;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(60, 32, 29, 0.08);
}

.accordion-toggle,
.sub-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border: 0;
    background: transparent;
    color: #25211f;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: 0.25s ease;
}

.accordion-toggle {
    background: linear-gradient(90deg,
            rgba(230, 41, 47, 0.05),
            rgba(255, 213, 31, 0.03));
}

.accordion-toggle:hover,
.sub-accordion-toggle:hover {
    background: rgba(230, 41, 47, 0.05);
}

.accordion-toggle.active,
.sub-accordion-toggle.active {
    color: #e6292f;
}

.accordion-icon {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.25s ease;
}

.accordion-toggle.active .accordion-icon,
.sub-accordion-toggle.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content,
.sub-accordion-content {
    display: none;
    padding: 0 22px 24px;
}

.accordion-content.open,
.sub-accordion-content.open {
    display: block;
}

.sub-accordion-item {
    margin-top: 18px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 8px;
}

.product-detail-card {
    overflow: hidden;
    border: 1px solid #ece5dd;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(79, 37, 34, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-detail-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(79, 37, 34, 0.14);
}

.product-detail-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f1efeb;
}

.product-detail-body {
    padding: 20px;
}

.product-detail-body h3 {
    margin: 0 0 10px;
    color: #e6292f;
    font-size: 1.05rem;
    text-transform: uppercase;
}

.product-detail-body p {
    margin: 0 0 14px;
    color: #686460;
    line-height: 1.6;
}

.formats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.formats strong {
    width: 100%;
    color: #25211f;
    margin-bottom: 6px;
}

.formats span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 30px;
    color: #25211f;
    font-size: 0.82rem;
    font-weight: 700;
    background: #f5f2ec;
    border: 1px solid #e6ddd3;
}

/* Responsive */

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .accordion-toggle,
    .sub-accordion-toggle {
        padding: 18px 18px;
        font-size: 0.98rem;
    }

    .accordion-content,
    .sub-accordion-content {
        padding: 0 16px 20px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-card img {
        height: 210px;
    }
}

/* ======================================
   PRODUCTOS DE ATÚN - LOMOS
====================================== */

.tuna-loins-section {
    padding: 10px 0 5px;
}

.product-subheading {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
}

.product-subheading span {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.product-subheading h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    text-transform: uppercase;
}

.product-subheading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.label-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.label-product-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.label-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 42px rgba(80, 34, 31, 0.15);
}

.label-image-wrapper {
    width: 100%;
    padding: 16px;
    background: #f8f7f4;
}

.label-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    object-position: center;
}

.label-product-body {
    padding: 22px 24px 25px;
}

.product-brand {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.label-product-body h4 {
    margin: 0 0 16px;
    color: var(--primary);
    font-size: 1.25rem;
    text-transform: uppercase;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid #e7dfd7;
    border-radius: 30px;
    color: var(--text);
    background: #f7f4ef;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Pantallas grandes */

@media (min-width: 1100px) {
    .label-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .label-product-card:last-child {
        grid-column: 1 / -1;
        max-width: 850px;
        width: 100%;
        margin: 0 auto;
    }
}

/* Celulares */

@media (max-width: 600px) {
    .label-image-wrapper {
        padding: 10px;
    }

    .label-image-wrapper img {
        max-height: 180px;
    }

    .label-product-body {
        padding: 18px;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================================================
   PRODUCTOS DE ATÚN
================================================== */

.tuna-product-section {
    padding: 20px 0 10px;
}

.product-subheading {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
}

.product-subheading span {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.product-subheading h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.2;
    text-transform: uppercase;
}

.product-subheading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.product-section-divider {
    width: 100%;
    height: 1px;
    margin: 55px 0 35px;
    background: linear-gradient(90deg,
            transparent,
            rgba(230, 41, 47, 0.35),
            rgba(255, 213, 31, 0.7),
            rgba(38, 169, 79, 0.35),
            transparent);
}


/* Cuadrícula */

.label-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.label-products-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* Tarjetas */

.label-product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e7dfd7;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(68, 32, 29, 0.09);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.label-product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(230, 41, 47, 0.45);
    box-shadow: 0 20px 42px rgba(80, 34, 31, 0.15);
}


/* Imagen horizontal */

.label-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 180px;
    padding: 14px;
    border-bottom: 1px solid #eee7df;
    background: #f8f7f4;
}

.label-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 230px;
    object-fit: contain;
    object-position: center;
}


/* Información */

.label-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 25px;
}

.product-brand {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 8px;
    padding: 5px 11px;
    border-radius: 30px;
    color: #ffffff;
    background: var(--secondary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.label-product-body h4 {
    margin: 0 0 11px;
    color: var(--primary);
    font-size: 1.12rem;
    line-height: 1.35;
    text-transform: uppercase;
}

.label-product-body p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: auto;
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #e7dfd7;
    border-radius: 30px;
    color: var(--text);
    background: #f7f4ef;
    font-size: 0.78rem;
    font-weight: 700;
}


/* La tercera tarjeta de lomos centrada */

.label-products-grid:not(.label-products-grid-two) .label-product-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(820px, 100%);
    margin: 0 auto;
}


/* Tablet */

@media (max-width: 900px) {

    .label-products-grid,
    .label-products-grid-two {
        grid-template-columns: 1fr;
    }

    .label-products-grid:not(.label-products-grid-two) .label-product-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}


/* Celular */

@media (max-width: 600px) {
    .tuna-product-section {
        padding-top: 10px;
    }

    .product-section-divider {
        margin: 42px 0 25px;
    }

    .label-image-wrapper {
        min-height: 120px;
        padding: 8px;
    }

    .label-image-wrapper img {
        max-height: 170px;
    }

    .label-product-body {
        padding: 18px;
    }

    .label-product-body h4 {
        font-size: 1rem;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-meta span {
        width: 100%;
    }
}


/* ==================================================
   PRODUCTOS NO TRADICIONALES
================================================== */

.traditional-products-intro {
    max-width: 780px;
    margin: 25px auto 50px;
    text-align: center;
}

.traditional-products-intro>span {
    display: block;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.traditional-products-intro h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    text-transform: uppercase;
}

.traditional-products-intro p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.traditional-product-group {
    padding: 10px 0;
}

.traditional-group-heading {
    max-width: 760px;
    margin: 0 auto 30px;
    text-align: center;
}

.traditional-group-heading>span {
    display: block;
    margin-bottom: 7px;
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.traditional-group-heading h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(1.6rem, 4vw, 2.35rem);
    line-height: 1.25;
    text-transform: uppercase;
}

.traditional-group-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

/* Producto individual centrado */

.traditional-single-product {
    grid-template-columns: minmax(0, 850px);
    justify-content: center;
}

/* Imagen del morocho, que es más alta */

.traditional-tall-image {
    min-height: 300px;
}

.traditional-tall-image img {
    max-height: 400px;
}

/* Diferenciar las tarjetas de no tradicionales */

.traditional-product-group .label-product-card {
    border-top: 4px solid var(--secondary);
}

.traditional-product-group .label-product-card:hover {
    border-color: var(--secondary);
}

.traditional-product-group .product-brand {
    background: var(--secondary);
}

.traditional-product-group .label-product-body h4 {
    color: var(--primary);
}

@media (max-width: 600px) {
    .traditional-products-intro {
        margin-bottom: 35px;
    }

    .traditional-group-heading {
        margin-bottom: 22px;
    }

    .traditional-group-heading h3 {
        font-size: 1.4rem;
    }

    .traditional-tall-image {
        min-height: 220px;
    }

    .traditional-tall-image img {
        max-height: 300px;
    }
}



/* Tabs principales */

.product-tabs,
.product-family-tabs,
.presentation-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 45px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(50, 35, 32, 0.12);
}

.product-tab,
.family-tab,
.presentation-tab {
    position: relative;
    padding: 12px 23px;
    border: 0;
    border-radius: 999px;
    color: #282322;
    background: transparent;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        color 0.25s ease,
        background 0.25s ease;
}

.product-tab.active,
.family-tab.active,
.presentation-tab.active {
    color: #ffffff;
    background: var(--primary);
}

.product-tab:hover,
.family-tab:hover,
.presentation-tab:hover {
    color: var(--primary);
}

.product-tab.active:hover,
.family-tab.active:hover,
.presentation-tab.active:hover {
    color: #ffffff;
}


/* Contenidos */

.product-tab-content,
.family-content,
.presentation-content {
    display: none;
}

.product-tab-content.active,
.family-content.active,
.presentation-content.active {
    display: block;
}

.product-family-tabs,
.presentation-tabs {
    margin-bottom: 35px;
    box-shadow: 0 8px 22px rgba(50, 35, 32, 0.09);
}

.presentation-tabs {
    margin-top: 20px;
}

.product-family-heading {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.product-family-heading span {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.product-family-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
    text-transform: uppercase;
}


/* Grid de productos */

.reference-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
}

.reference-product-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 470px;
    padding: 36px;
    border-radius: 28px;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease;
}

.reference-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(50, 35, 32, 0.12);
}

.bg-blue-soft {
    background: #f0f6fb;
}

.bg-pink-soft {
    background: #fff1f1;
}

.bg-green-soft {
    background: #ecfbf2;
}

.bg-yellow-soft {
    background: #fff8df;
}


/* Imagen */

.reference-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 260px;
    margin-bottom: 28px;
}

.reference-product-image img {
    display: block;
    width: 100%;
    max-width: 3550px;
    max-height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 12px 14px rgba(40, 30, 27, 0.12));
}

.product-image-tall img {
    max-height: 330px;
}


/* Pie de tarjeta */

.reference-product-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.reference-product-footer span {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.reference-product-footer h4 {
    max-width: 330px;
    margin: 0 0 6px;
    color: #10203d;
    font-size: 1.35rem;
    line-height: 1.25;
}

.reference-product-footer p {
    margin: 0;
    color: #6f6662;
    font-size: 0.9rem;
}

.product-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: #151211;
    background: #ffffff;
    font-size: 1.45rem;
    font-weight: 700;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.product-arrow:hover {
    color: #ffffff;
    background: var(--primary);
    transform: translateY(-3px);
}


/* Responsive */

@media (max-width: 1150px) {
    .reference-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .product-tabs,
    .product-family-tabs,
    .presentation-tabs {
        width: 100%;
        border-radius: 18px;
        padding: 10px;
    }

    .product-tab,
    .family-tab,
    .presentation-tab {
        width: 100%;
        padding: 13px 16px;
    }

    .reference-product-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .reference-product-card {
        min-height: auto;
        padding: 24px;
        border-radius: 22px;
    }

    .reference-product-image {
        min-height: 190px;
        margin-bottom: 22px;
    }

    .reference-product-image img {
        max-height: 190px;
    }

    .product-image-tall img {
        max-height: 260px;
    }

    .reference-product-footer {
        align-items: center;
    }

    .reference-product-footer h4 {
        font-size: 1.1rem;
    }

    .product-arrow {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }
}

/* ==================================================
   DETALLE DE PRODUCTO
================================================== */

.product-detail-view {
    display: none;
    padding: 90px 0;
    background: #ffffff;
}

.product-detail-view.show {
    display: block;
}

.back-products-btn {
    margin-bottom: 55px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.back-products-btn:hover {
    text-decoration: underline;
}

.product-detail-page {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.product-detail-page.active-detail {
    display: grid;
}

.detail-images-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}

.detail-image-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 290px;
    padding: 35px;
    border-radius: 40px;
    background: #f8f3ee;
}

.detail-image-box:nth-child(2) {
    background: #edf9f1;
}

.detail-image-box img {
    display: block;
    width: 50%;
    max-width: 350px;
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 15px 18px rgba(40, 30, 27, 0.12));
}

.detail-image-box span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    top: auto;
    right: auto;
    transform: none;
    padding: 8px 16px;
    border-radius: 30px;
    color: #ffffff;
    background: var(--primary);
    font-size: 0.70rem;
    font-weight: 800;
}

.detail-brand {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 16px;
    border-radius: 30px;
    color: #ffffff;
    background: var(--secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.detail-info-side h2 {
    margin: 0 0 22px;
    color: var(--text);
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
}

.detail-description {
    max-width: 650px;
    margin: 0 0 35px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-info-grid div {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fbfaf8;
}

.detail-info-grid strong {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.detail-info-grid span {
    color: var(--text);
    font-weight: 600;
}

/* La flecha ahora es botón */

.product-arrow {
    border: 0;
    cursor: pointer;
}

/* Responsive */

@media (max-width: 950px) {
    .product-detail-page {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .detail-images-side {
        order: 2;
    }

    .detail-info-side {
        order: 1;
    }
}

@media (max-width: 600px) {
    .product-detail-view {
        padding: 65px 0;
    }

    .detail-image-box {
        min-height: 220px;
        padding: 22px;
        border-radius: 28px;
    }

    .detail-image-box img {
        max-height: 170px;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
    }

    .detail-info-side h2 {
        font-size: 2rem;
    }
}

/* ==================================================
   PAGINACIÓN PRODUCTOS TRADICIONALES
================================================== */

.traditional-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 45px;
}

.traditional-pagination button {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    background: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(60, 32, 29, 0.07);
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.traditional-pagination button:hover {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
    transform: translateY(-2px);
}

.traditional-pagination button.active {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
}

.traditional-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.traditional-pagination button:disabled:hover {
    color: var(--text);
    border-color: var(--border);
    background: #ffffff;
}

/* ==================================================
   DETALLE SARDINA TALL
================================================== */

.detail-image-box-large {
    min-height: 520px;
}

.detail-image-box-large img {
    max-height: 460px;
}

.sardine-variants {
    margin-top: 34px;
}

.sardine-variants h3 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 1.25rem;
    text-transform: uppercase;
}

.sardine-variant-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.sardine-variant-card {
    display: flex;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfaf8;
}

.sardine-variant-card h4 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 0.98rem;
}

.sardine-variant-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.variant-color {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-top: 5px;
    border-radius: 4px;
}

.variant-color.tomato {
    background: #9b3a32;
}

.variant-color.spicy {
    background: #d6813d;
}

.variant-color.soy {
    background: #3b9462;
}

.variant-color.water {
    background: #3e9dcc;
}

.variant-color.vegetables {
    background: #c4a925;
}

@media (max-width: 600px) {
    .detail-image-box-large {
        min-height: 300px;
    }

    .detail-image-box-large img {
        max-height: 280px;
    }

    .sardine-variant-card {
        padding: 15px;
    }
}

/* ==================================================
   GALERÍA DE PRESENTACIONES - SARDINA
================================================== */

.sardine-detail-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.sardine-presentation-card {
    min-height: 300px;
    padding: 24px;
    border-radius: 28px;
}

.sardine-presentation-card img {
    max-height: 115px;
    object-fit: contain;
}

.sardine-presentation-card span {
    left: 20px;
    bottom: 18px;
    max-width: calc(100% - 40px);
    text-align: center;
}

/* Fondos suaves diferentes */

.sardine-presentation-card:nth-child(1) {
    background: #fff1f1;
}

.sardine-presentation-card:nth-child(2) {
    background: #fff4e8;
}

.sardine-presentation-card:nth-child(3) {
    background: #eef9f2;
}

.sardine-presentation-card:nth-child(4) {
    background: #eef8ff;
}

@media (max-width: 700px) {
    .sardine-detail-gallery {
        grid-template-columns: 1fr;
    }

    .sardine-presentation-card {
        min-height: 240px;
        padding: 18px;
    }

    .sardine-presentation-card img {
        max-height: 180px;
    }
}

.sardine-detail-gallery .sardine-presentation-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: min(520px, 100%);
    margin: 0 auto;
}

@media (max-width: 700px) {
    .sardine-detail-gallery .sardine-presentation-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

/* ==================================================
   HERO PRODUCTOS CON IMAGEN
================================================== */

.products-hero {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background:
        var(--products-hero-image) center / cover no-repeat;
}

.products-hero.hero-atun {
    --products-hero-image: url("../img/banner-atun.jpeg");
}

.products-hero.hero-sardina {
    --products-hero-image: url("../img/banner-sardina.png");
}

.products-hero.hero-camaron {
    --products-hero-image: url("../img/banner-camaron.png");
}

.products-hero.hero-frutas-almibar {
    --products-hero-image: url("../img/banner-frutas-almibar.png");
}

.products-hero.hero-tradicionales {
    --products-hero-image: url("../img/banner-verduras.jpeg");
}

.products-hero-content {
    max-width: 760px;
}

.products-hero-label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.products-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 1.05;
    color: black;
}

.products-hero p {
    max-width: 620px;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: black;
}

/* Texto blanco solo para el hero de Frutas en almíbar */

.products-hero.hero-frutas-almibar .products-hero-label,
.products-hero.hero-frutas-almibar h1,
.products-hero.hero-frutas-almibar p, .products-hero.hero-tradicionales .products-hero-label,
.products-hero.hero-tradicionales h1,
.products-hero.hero-tradicionales p {
    color: #ffffff;
}

.products-hero.hero-frutas-almibar .products-hero-label {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.18);
}


/* ==================================================
   SHOWCASE TIPO REFERENCIA
================================================== */

.product-category-showcase {
    margin-bottom: 60px;
}

.category-showcase {
    display: none;
}

.category-showcase.active {
    display: block;
}

.category-showcase-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.category-showcase-heading span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.category-showcase-heading h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.category-showcase-heading p {
    margin: 0 auto;
    max-width: 600px;
    color: var(--muted);
    line-height: 1.7;
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
}

.category-card-grid-camaron {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
}

.sardine-showcase-grid,
.traditional-showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-main-card {
    overflow: hidden;
    display: block;
    min-height: 360px;
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(35, 28, 25, 0.08);
    text-align: center;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.category-main-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 45px rgba(35, 28, 25, 0.14);
}

.category-main-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #f7f7f7;
}

.category-main-card h3 {
    margin: 0;
    padding: 26px 15px 30px;
    font-size: 1.35rem;
    font-weight: 900;
}

.available-formats {
    margin: 42px auto 0;
    text-align: center;
}

.available-formats h3 {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 1.05rem;
}

.formats-row {
    display: inline-flex;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    border: 1px solid #0b1e45;
    border-radius: 18px 18px 0 0;
}

.formats-row span {
    min-width: 72px;
    padding: 16px 18px;
    color: #ffffff;
    background: #4f76c8;
    border-right: 1px solid #0b1e45;
    font-weight: 800;
}

.formats-row span:last-child {
    border-right: 0;
}

.available-formats p {
    margin-top: 20px;
    color: var(--muted);
    font-weight: 800;
}


/* Ocultar tabs viejos visualmente si usarás el menú superior */

.product-tabs,
.product-family-tabs {
    display: none;
}


/* Responsive */

@media (max-width: 950px) {

    .category-card-grid,
    .sardine-showcase-grid,
    .traditional-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-hero {
        min-height: 360px;
    }
}

@media (max-width: 620px) {

    .category-card-grid,
    .sardine-showcase-grid,
    .traditional-showcase-grid {
        grid-template-columns: 1fr;
    }

    .category-main-card {
        min-height: auto;
    }

    .category-main-card img {
        height: 230px;
    }

    .formats-row {
        width: 100%;
    }

    .formats-row span {
        flex: 1;
        min-width: 80px;
    }
}

/* ==================================================
   DETALLE ATÚN CON 4 PRESENTACIONES
================================================== */

.tuna-four-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.tuna-four-gallery .tuna-presentation-card {
    min-height: 270px;
    padding: 24px;
}

.tuna-four-gallery .tuna-presentation-card img {
    max-height: 190px;
    object-fit: contain;
}

.tuna-four-gallery .tuna-presentation-card span {
    left: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
    text-align: center;
}

.tuna-four-gallery .tuna-presentation-card:nth-child(1),
.tuna-four-gallery .tuna-presentation-card:nth-child(2) {
    background: #f8f3ee;
}

.tuna-four-gallery .tuna-presentation-card:nth-child(3),
.tuna-four-gallery .tuna-presentation-card:nth-child(4) {
    background: #edf9f1;
}

@media (max-width: 700px) {
    .tuna-four-gallery {
        grid-template-columns: 1fr;
    }

    .tuna-four-gallery .tuna-presentation-card {
        min-height: 230px;
    }

    .tuna-four-gallery .tuna-presentation-card img {
        max-height: 170px;
    }
}

/* ==================================================
   TARJETAS PRINCIPALES CON ESTILO PRODUCTOS
================================================== */

.category-main-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--text);
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(35, 28, 25, 0.08);
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.category-main-card:hover {
    transform: translateY(-7px);
    border-color: rgba(241, 100, 109, 0.45);
    box-shadow: 0 24px 48px rgba(35, 28, 25, 0.14);
}

.category-main-image {
    min-height: 260px;
    display: grid;
    place-items: center;
    padding: 26px;
}

.category-main-image img {
    width: 100%;
    max-width: 330px;
    max-height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 16px 20px rgba(35, 28, 25, 0.14));
}

.category-main-card h3 {
    margin: 0;
    padding: 24px 18px 28px;
    border-top: 1px solid rgba(70, 45, 41, 0.08);
    background: rgba(255, 255, 255, 0.65);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
}

/* Fondos suaves */

.category-main-card.bg-green-soft {
    background: #eef9f2;
}

.category-main-card.bg-blue-soft {
    background: #eef8ff;
}

.category-main-card.bg-yellow-soft {
    background: #fff8e8;
}

.category-main-card.bg-pink-soft {
    background: #fff1f1;
}

/* Recuadro completo de aperitivos */
.traditional-category-box {
    grid-column: 1 / -1;
    width: 100%;
    padding: 34px;
    margin: 10px 0 28px;
    border: 1px solid rgba(20, 68, 92, 0.12);
    border-radius: 28px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.98),
            rgba(244, 249, 247, 0.96));
    box-shadow: 0 18px 45px rgba(20, 68, 92, 0.08);
}

/* Encabezado */
.traditional-category-header {
    margin-bottom: 28px;
    text-align: center;
}

.traditional-category-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(198, 55, 58, 0.1);
    color: #c6373a;
    font-size: 1.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.traditional-category-header h3 {
    margin: 0;
    color: #123f56;
    font-size: clamp(1.1rem, 1.8rem);
    font-weight: 700;
    line-height: 1.15;
}

/* Cuadrículas de aperitivos y postres */
.appetizers-grid,
.desserts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

/* Tarjetas con el mismo tamaño */
.appetizers-grid .reference-product-card,
.desserts-grid .reference-product-card {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Espacio uniforme para las imágenes */
.appetizers-grid .reference-product-image,
.desserts-grid .reference-product-image {
    min-height: 310px;
}

/* Productos completos sin deformarse */
.appetizers-grid .reference-product-image img,
.desserts-grid .reference-product-image img {
    width: 100%;
    height: 100%;
    max-height: 290px;
    object-fit: contain;
}

/* Tabletas */
@media (max-width: 900px) {

    .appetizers-grid,
    .desserts-grid {
        gap: 18px;
    }

    .appetizers-grid .reference-product-image,
    .desserts-grid .reference-product-image {
        min-height: 260px;
    }
}

/* Celulares */
@media (max-width: 650px) {

    .appetizers-grid,
    .desserts-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .appetizers-grid .reference-product-image,
    .desserts-grid .reference-product-image {
        min-height: 250px;
    }
}



/* Cuadrícula de lasañas */
.lasagna-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

/* Tarjetas del mismo tamaño */
.lasagna-grid .reference-product-card {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Espacio uniforme para las imágenes */
.lasagna-grid .reference-product-image {
    min-height: 310px;
    padding: 24px;
}

/* Latas completas, centradas y sin deformación */
.lasagna-grid .reference-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 270px;
    max-height: 290px;
    margin: auto;
    object-fit: contain;
}

/* La quinta tarjeta queda centrada */
.lasagna-grid .lasagna-last-card {
    grid-column: 1 / -1;
    width: min(100%, 520px);
    justify-self: center;
}

/* Tabletas */
@media (max-width: 900px) {
    .lasagna-grid {
        gap: 18px;
    }

    .lasagna-grid .reference-product-image {
        min-height: 270px;
        padding: 20px;
    }

    .lasagna-grid .reference-product-image img {
        max-height: 250px;
    }
}

/* Celulares */
@media (max-width: 650px) {
    .lasagna-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lasagna-grid .lasagna-last-card {
        grid-column: auto;
        width: 100%;
    }

    .lasagna-grid .reference-product-image {
        min-height: 250px;
        padding: 16px;
    }

    .lasagna-grid .reference-product-image img {
        max-height: 225px;
    }
}

/* Tabletas */
@media (max-width: 900px) {
    .fruit-preserves-grid {
        grid-template-columns: minmax(0, 500px);
    }

    .fruit-preserves-grid .reference-product-image {
        min-height: 290px;
    }

    .pitahaya-images img {
        max-height: 240px;
    }
}

/* Celulares */
@media (max-width: 650px) {
    .fruit-preserves-grid {
        grid-template-columns: 1fr;
    }

    .fruit-preserves-grid .reference-product-image {
        min-height: 250px;
    }

    .pitahaya-images {
        gap: 10px;
        padding: 20px 12px;
    }

    .pitahaya-images img {
        max-width: 48%;
        max-height: 210px;
    }
}


.fruit-syrup-showcase-grid {
    max-width: 420px;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.pitahaya-main-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: center;
}


@media (max-width: 620px) {
    .pitahaya-main-image {
        grid-template-columns: 1fr;
    }
}

.fruit-syrup-showcase-grid {
    max-width: 640px;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.fruit-syrup-showcase-grid .category-main-card {
    min-height: 530px;
}

.pitahaya-main-image {
    min-height: 410px;
    padding: 18px;
    gap: 12px;
}

.pitahaya-main-image img {
    width: 100%;
    max-width: 450px;
    max-height: 480px;
    object-fit: contain;
}