@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=Playfair+Display:wght@400;500;600&display=swap');

:root {
    --r: 18px;
    --g: 14px;
    --green: #2d6a2f;
    --green-lt: #d4edda;
    --gold: #f0c040;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

#cat-layout {
    width: 100%;
}

.cat-content {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 var(--g) 80px;
    overflow: visible;
}

/* ══════════════════════════════════════
   LOADING / ERROR
══════════════════════════════════════ */
.cat-loading,
.cat-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 60vh;
    color: #86868b;
    font-size: .95rem;
    text-align: center;
    padding: 40px;
}

.cat-error i {
    font-size: 3rem;
    color: #ef4444;
}

.cat-spinner {
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid #d2d2d7;
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ══════════════════════════════════════
   BASE DE TARJETA (igual que inicio)
══════════════════════════════════════ */
.cat-hero,
.cat-card-full {
    position: relative;
    border-radius: var(--r);
    background: #111;
    overflow: visible;
    transform: translateZ(0);
}

.cat-clip {
    position: absolute;
    inset: 0;
    border-radius: var(--r);
    overflow: hidden;
    z-index: 1;
}

.cat-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform .7s cubic-bezier(.25, .46, .45, .94);
}

.cat-fallback-bg {
    background: linear-gradient(135deg, #0a2e0e 0%, #1a4a1f 50%, #2d6a2f 100%);
}

/* ── Overlays ── */
.cat-ov {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.cat-ov--bottom {
    background: linear-gradient(to top,
            rgba(0, 0, 0, .85) 0%,
            rgba(0, 0, 0, .4) 40%,
            rgba(0, 0, 0, .1) 100%);
}

/* texto a la derecha → oscurecer derecha */
.cat-ov--r {
    background: linear-gradient(to left,
            rgba(0, 0, 0, .85) 0%,
            rgba(0, 0, 0, .42) 45%,
            rgba(0, 0, 0, .05) 100%);
}

/* texto a la izquierda → oscurecer izquierda */
.cat-ov--l {
    background: linear-gradient(to right,
            rgba(0, 0, 0, .88) 0%,
            rgba(0, 0, 0, .42) 45%,
            rgba(0, 0, 0, 0) 100%);
}

/* ══════════════════════════════════════
   PNG FLOTANTE (igual que inicio)
══════════════════════════════════════ */
.cat-img-wrap {
    position: absolute;
    left: -14%;
    bottom: -4%;
    width: 54%;
    height: 118%;
    z-index: 10;
    pointer-events: none;
    transition: transform .55s cubic-bezier(.25, .46, .45, .94);
    animation: productEntry 1s cubic-bezier(.34, 1.4, .64, 1) both;
    animation-delay: .15s;
}

/* PNG sale por la derecha */
.cat-img-wrap--r {
    left: auto;
    right: -14%;
}

@keyframes productEntry {
    from {
        opacity: 0;
        transform: translateY(60px) scale(.8) rotate(-4deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.cat-producto-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter:
        drop-shadow(-16px 28px 36px rgba(0, 0, 0, .8)) drop-shadow(0 6px 14px rgba(0, 0, 0, .55));
}

.cat-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3d1c, #2d6a2f);
    color: rgba(255, 255, 255, .3);
    font-size: 4rem;
    border-radius: 12px;
}

.cat-img-glow {
    position: absolute;
    bottom: 2%;
    left: 5%;
    width: 90%;
    height: 28%;
    background: radial-gradient(ellipse at 50% 100%, rgba(80, 180, 60, .28) 0%, transparent 70%);
    filter: blur(22px);
    pointer-events: none;
    animation: glowPulse 3.5s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        opacity: .5;
        transform: scaleX(1);
    }

    to {
        opacity: 1;
        transform: scaleX(1.12);
    }
}

/* ══════════════════════════════════════
   SECCIÓN 1 — HERO BLENDED
══════════════════════════════════════ */
.cat-hero-blended {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 0 0;
    margin-bottom: 0;
}

.cat-dual-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.cat-dual-item {
    position: absolute;
    width: 100%;
}

.cat-dual-item--top {
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    z-index: 2;
}

.cat-dual-item--bot {
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    -webkit-mask-image: linear-gradient(to top, black 65%, transparent 100%);
    mask-image: linear-gradient(to top, black 65%, transparent 100%);
    z-index: 1;
}

.cat-dual-item--full {
    height: 100%;
}

.cat-dual-item video,
.cat-dual-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(.25, .46, .45, .94);
}

.cat-hero-blended:hover .cat-dual-item video,
.cat-hero-blended:hover .cat-dual-item img {
    transform: scale(1.04);
}

.cat-dual-item--fallback {
    background: linear-gradient(135deg, #0a2e0e 0%, #1a4a1f 50%, #2d6a2f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 5rem;
}

/* ── Overlay general ── */
.cat-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.10) 30%, rgba(0, 0, 0, 0.10) 70%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
}

/* Difuminado inferior blanco */
.cat-hero-bottom-fade {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 15vh;
    min-height: 120px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 4;
    pointer-events: none;
}

/* ── Layout en Row (Izquierda Título, Derecha Descripción) ── */
.cat-hero-content-row {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 40px;
    animation: fadeUp .8s ease both;
    flex: 1;
    padding-bottom: 12vh; /* Evita que el texto caiga sobre el difuminado blanco */
}

.cat-hero-col-left {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin-top: 4vh;
}

/* Difuminado oscuro para el título (reemplaza la tarjeta) */
.cat-hero-col-left::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40%;
    width: 150%;
    height: 180%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* Selector compuesto para ganar en especificidad a .cat-t suelto */
.cat-t.cat-t--hero {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
    letter-spacing: -2px;
    margin: 0;
}

@media (min-width: 901px) {
    .cat-t.cat-t--hero {
        font-size: clamp(5rem, 8vw, 8rem);
        line-height: 1;
        letter-spacing: -3px;
        text-shadow: 0 6px 32px rgba(0, 0, 0, 0.9);
    }
}

.cat-hero-col-right {
    position: relative;
    flex: 0 1 540px;
    text-align: left;
    align-self: flex-end;
}

/* Difuminado verde para la descripción (reemplaza la tarjeta) */
.cat-hero-col-right::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 180%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(30, 80, 32, 0.8) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.cat-hero-desc-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.65;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    margin: 0;
    display: block;
    overflow: visible;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ══════════════════════════════════════
   SECCIÓN 2 — FILA HORIZONTAL
══════════════════════════════════════ */
.cat-fila-section {
    padding-top: 44px;
}

.cat-section-header {
    margin-bottom: 20px;
}

.cat-section-header--pad {
    padding: 0 0 0;
    margin-bottom: 24px;
}

.cat-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-section-title i {
    font-size: 1.1rem;
    color: var(--green);
}

.cat-section-sub {
    font-size: .9rem;
    color: #86868b;
    margin-top: 4px;
}

.cat-fila-wrap {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--green) #e5e5ea;
    padding-bottom: 14px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 32px, black calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 32px, black calc(100% - 32px), transparent 100%);
    cursor: grab;
}

.cat-fila-wrap::-webkit-scrollbar {
    height: 4px;
}

.cat-fila-wrap::-webkit-scrollbar-track {
    background: #e5e5ea;
    border-radius: 99px;
}

.cat-fila-wrap::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 99px;
}

.cat-fila-track {
    display: flex;
    gap: 14px;
    padding: 8px 36px 8px;
    width: max-content;
}

/* Tarjeta de fila — PNG flota, fondo con color dinámico */
.cat-fila-item {
    display: flex;
    flex-direction: column;
    width: 190px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 20px;
    overflow: visible;
    /* permite que PNG salga */
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .08);
    transition: transform .28s ease, box-shadow .28s ease;
    position: relative;
    padding-top: 20px;
}

.cat-fila-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}

/* Aura de color debajo del PNG */
.cat-fila-glow {
    position: absolute;
    bottom: 54px;
    left: 0;
    right: 0;
    height: 140px;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(to top, rgba(45, 106, 47, .12), transparent);
    pointer-events: none;
    transition: background .5s ease;
    z-index: 0;
}

/* PNG del producto — sale por arriba de la tarjeta */
.cat-fila-img-wrap {
    position: relative;
    height: 170px;
    margin: 0 10px;
    z-index: 2;
    transition: transform .4s ease;
}

.cat-fila-item:hover .cat-fila-img-wrap {
    transform: translateY(-6px) scale(1.04);
}

.cat-fila-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .22)) drop-shadow(0 4px 8px rgba(0, 0, 0, .15));
}

.cat-fila-nofoto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: var(--green);
    font-size: 2.5rem;
    opacity: .6;
    border-radius: 12px;
}

.cat-fila-info {
    padding: 8px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 0 0 20px 20px;
}

.cat-fila-nombre {
    font-size: .8rem;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge promo en fila */
.cat-promo-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    white-space: nowrap;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(255, 107, 0, .35);
}

/* Precios */
.cat-price {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cat-price-original {
    font-size: .78rem;
    color: #86868b;
    text-decoration: line-through;
}

.cat-price-final {
    font-size: .92rem;
    font-weight: 700;
    color: var(--green);
}

.cat-price-tag {
    font-size: .7rem;
    font-weight: 600;
    color: #ff6b00;
    background: rgba(255, 107, 0, .1);
    padding: 1px 6px;
    border-radius: 99px;
}

.cat-price--lg .cat-price-final {
    font-size: 1.6rem;
}

.cat-price--lg .cat-price-original {
    font-size: 1rem;
}

/* ══════════════════════════════════════
   SECCIÓN 3 — TARJETAS STAR
══════════════════════════════════════ */
.cat-stars-section {
    padding-top: 56px;
}

.cat-s {
    margin-bottom: var(--g);
    overflow: visible;
    position: relative;
}

/* Tarjeta grande estilo inicio */
.cat-card-full {
    height: 68vh;
    min-height: 440px;
    box-shadow: 0 4px 36px rgba(0, 0, 0, .14);
    cursor: pointer;
    transition: box-shadow .3s ease;
}

.cat-card-full:hover {
    box-shadow: 0 16px 56px rgba(0, 0, 0, .22);
}

/* Texto */
.cat-cnt {
    position: absolute;
    bottom: 0;
    top: 0;
    z-index: 5;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeUp .6s ease both;
    animation-delay: .2s;
    gap: 12px;
}

.cat-cnt--r {
    right: 0;
    left: auto;
    width: 52%;
    padding: 36px 44px;
}

.cat-cnt--l {
    left: 0;
    right: auto;
    width: 52%;
    padding: 36px 44px;
}

/* Tipografía */
.cat-t {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.12;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.cat-t--xl {
    font-size: clamp(2.6rem, 5.8vw, 4.6rem);
}

.cat-t--lg {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.cat-sub {
    font-size: .98rem;
    color: rgba(255, 255, 255, .82);
    line-height: 1.5;
    max-width: 380px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badges */
.cat-badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    width: fit-content;
    letter-spacing: .4px;
}

.cat-badge--star {
    color: #92610a;
    background: rgba(240, 192, 64, .2);
    border: 1px solid rgba(240, 192, 64, .45);
}

.cat-badge--super {
    color: #fff;
    background: linear-gradient(135deg, #1a3d1c, #2d6a2f);
}

/* Promo en tarjeta grande */
.cat-promo-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255, 107, 0, .12);
    border: 1px solid rgba(255, 107, 0, .3);
    border-left: 4px solid #ff6b00;
    border-radius: 10px;
    max-width: 340px;
}

.cat-promo-block .cat-promo-badge {
    position: static;
}

.cat-promo-desc {
    font-size: .84rem;
    color: rgba(255, 220, 180, .9);
    line-height: 1.4;
}

/* Botón */
.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: 980px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(14px) saturate(1.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, .4);
    color: #fff;
    text-decoration: none;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .22s, color .22s;
    align-self: flex-start;
    width: fit-content;
}

.cat-btn::after {
    content: ' ›';
    font-size: 1.1rem;
}

.cat-btn:hover {
    background: #fff;
    color: var(--green);
}

/* Botón para error (oscuro) */
.cat-error .cat-btn {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 13px 28px;
}

.cat-error .cat-btn:hover {
    background: #235225;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
    .cat-hero-blended {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 0px;
        justify-content: center;
    }

    .cat-hero-content-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        padding: 0 30px;
        padding-bottom: 14vh;
    }

    .cat-hero-col-right {
        flex: 1 1 auto;
        width: 100%;
        align-self: flex-start;
    }

    .cat-card-full {
        height: 56vh;
        min-height: 380px;
    }

    .cat-img-wrap {
        width: 50%;
    }

    .cat-cnt--r,
    .cat-cnt--l {
        width: 58%;
        padding: 28px 30px;
    }
}

@media (max-width: 640px) {
    .cat-hero-blended {
        min-height: 100vh;
    }

    .cat-hero-content-row {
        padding: 0 20px;
        gap: 20px;
        padding-bottom: 15vh;
    }

    .cat-t.cat-t--hero {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .cat-hero-desc-text {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    /* En móviles ajustamos cuánto difumina la máscara si es necesario, pero la estructura sigue vertical */
    .cat-dual-item--top {
        height: 60%;
        -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    }

    .cat-dual-item--bot {
        height: 55%;
        -webkit-mask-image: linear-gradient(to top, black 50%, transparent 100%);
        mask-image: linear-gradient(to top, black 50%, transparent 100%);
    }

    .cat-card-full {
        height: auto;
        min-height: 420px;
    }

    .cat-img-wrap,
    .cat-img-wrap--r {
        width: 55%;
        height: 110%;
        left: auto;
        right: -6%;
        bottom: -4%;
        top: auto;
        transform: none;
        transform-origin: bottom right;
    }

    .cat-cnt--r,
    .cat-cnt--l {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 72%;
        padding: 22px 24px 30px;
        justify-content: flex-end;
        align-items: flex-start;
        text-align: left;
    }

    .cat-ov,
    .cat-ov--r,
    .cat-ov--l {
        background: linear-gradient(to right,
                rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .6) 55%, rgba(0, 0, 0, 0) 100%);
    }

    .cat-fila-item {
        width: 155px;
    }

    .cat-fila-img-wrap {
        height: 140px;
    }

    .cat-fila-wrap {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .cat-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .cat-fila-track {
        padding: 8px 16px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cat-img-wrap,
    .cat-img-glow,
    .cat-video-bg,
    .cat-banner-media img,
    .cat-banner-media video,
    .cat-fila-img-wrap {
        animation: none;
        transition: none;
    }
}