/* =====================================================

   BIO FARMA — CARRUSEL PREMIUM DE CATEGORÍAS

\===================================================== */

.cc-section {

    --cc-green: #078653;

    --cc-dark: #18352b;

    --cc-muted: #718078;

    width: min(1200px, calc(100% - 36px));

    margin: 52px auto;

    color: var(--cc-dark);

    font-family: "DM Sans", "Segoe UI", Arial, sans-serif;

}

/* =====================================================

   ENCABEZADO

\===================================================== */

.cc-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;

    margin-bottom: 28px;

}

.cc-heading-content {

    min-width: 0;

}

/* Etiqueta superior */

.cc-eyebrow {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: var(--cc-green);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.8px;

    text-transform: uppercase;

}

.cc-eyebrow-dot {

    width: 7px;

    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: #0aa66a;

    box-shadow: 0 0 0 4px rgba(10, 166, 106, .10);

    animation: ccDotPulse 2s infinite ease-in-out;

}

/* Título */

.cc-heading h2 {

    margin: 13px 0 10px;

    color: #18352b;

    font-size: clamp(27px, 3.2vw, 39px);

    font-weight: 800;

    letter-spacing: -1.5px;

    line-height: 1.15;

}

.cc-heading-highlight {

    color: #078653;

}

/* Descripción */

.cc-heading p {

    margin: 0;

    color: #7b8981;

    font-size: 14px;

    font-weight: 400;

    line-height: 1.6;

}

/* Animación del indicador */

@keyframes ccDotPulse {

    0%,

    100% {

        box-shadow: 0 0 0 4px rgba(10, 166, 106, .10);

    }

    50% {

        box-shadow: 0 0 0 7px rgba(10, 166, 106, .04);

    }

}

/* =====================================================

   BOTONES DE NAVEGACIÓN

\===================================================== */

.cc-controls {

    display: flex;

    flex: 0 0 auto;

    gap: 9px;

}

.cc-arrow {

    display: grid;

    place-items: center;

    width: 44px;

    height: 44px;

    padding: 0;

    border: 1px solid #e5eee8;

    border-radius: 50%;

    background: #fff;

    color: var(--cc-green);

    font-size: 15px;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(15, 80, 48, .04);

    transition:

        background .25s ease,

        color .25s ease,

        border-color .25s ease,

        transform .25s ease,

        box-shadow .25s ease;

}

.cc-arrow:hover:not(:disabled) {

    background: var(--cc-green);

    color: #fff;

    border-color: var(--cc-green);

    transform: translateY(-2px);

    box-shadow: 0 7px 18px rgba(8, 134, 83, .2);

}

.cc-arrow:disabled {

    opacity: .3;

    cursor: default;

    box-shadow: none;

}

/* =====================================================

   VENTANA DEL CARRUSEL

\===================================================== */

.cc-viewport {

    width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    scroll-behavior: smooth;

    scrollbar-width: none;

    overscroll-behavior-x: contain;

    scroll-snap-type: x mandatory;

    padding: 3px 1px 15px;

    box-sizing: border-box;

}

.cc-viewport::-webkit-scrollbar {

    display: none;

}

.cc-track {

    display: flex;

    flex-wrap: nowrap;

    align-items: stretch;

    gap: 17px;

    width: max-content;

    min-width: 100%;

    padding: 2px 2px 5px;

    box-sizing: border-box;

}

/* =====================================================

   TARJETAS

\===================================================== */

.cc-card {

    position: relative;

    box-sizing: border-box;

    flex: 0 0 calc(

        (min(100vw - 36px, 1200px) - 68px) / 5

    );

    min-width: 0;

    min-height: 175px;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    justify-content: center;

    padding: 21px;

    border: 1px solid #e7eee9;

    border-radius: 21px;

    background: linear-gradient(

        145deg,

        #ffffff 0%,

        #fcfefc 100%

    );

    color: var(--cc-dark);

    text-decoration: none;

    box-shadow:

        0 5px 18px rgba(15, 80, 48, .035),

        0 1px 3px rgba(15, 80, 48, .025);

    scroll-snap-align: start;

    overflow: hidden;

    transition:

        transform .3s cubic-bezier(.2, .8, .2, 1),

        border-color .3s ease,

        box-shadow .3s ease,

        background .3s ease;

}

/* Decoración */

.cc-card::before {

    content: "";

    position: absolute;

    top: -55px;

    right: -55px;

    width: 115px;

    height: 115px;

    border-radius: 50%;

    background: rgba(8, 134, 83, .035);

    transition:

        transform .4s ease,

        background .4s ease;

}

.cc-card:hover {

    transform: translateY(-5px);

    border-color: #b8e6ce;

    background: #fff;

    box-shadow:

        0 16px 36px rgba(15, 80, 48, .09),

        0 4px 10px rgba(15, 80, 48, .035);

}

.cc-card:hover::before {

    transform: scale(1.6);

    background: rgba(8, 134, 83, .055);

}

.cc-card:focus-visible {

    outline: 3px solid var(--cc-green);

    outline-offset: 3px;

}

/* =====================================================

   ICONOS

\===================================================== */

.cc-icon {

    position: relative;

    z-index: 1;

    display: grid;

    place-items: center;

    width: 52px;

    height: 52px;

    margin-bottom: 15px;

    border: 1px solid rgba(8, 134, 83, .07);

    border-radius: 17px;

    background: linear-gradient(

        145deg,

        #eaf8f0,

        #d8f2e4

    );

    color: #078653;

    font-size: 23px;

    box-shadow:

        0 5px 12px rgba(8, 134, 83, .06),

        inset 0 1px 0 rgba(255, 255, 255, .8);

    transition:

        transform .35s cubic-bezier(.2, .8, .2, 1),

        background .3s ease,

        color .3s ease,

        box-shadow .3s ease;

}

.cc-card:hover .cc-icon {

    transform: translateY(-2px) rotate(-5deg) scale(1.07);

    background: linear-gradient(

        145deg,

        #078653,

        #10a86b

    );

    color: #fff;

    box-shadow: 0 8px 18px rgba(8, 134, 83, .2);

}

/* =====================================================

   COLORES DE ICONOS

\===================================================== */

.cc-icon--medicamentos {

    background: linear-gradient(145deg, #eaf8f0, #d8f2e4);

    color: #078653;

}

.cc-icon--vitaminas {

    background: linear-gradient(145deg, #fff6df, #ffedc0);

    color: #b77908;

}

.cc-icon--jarabes {

    background: linear-gradient(145deg, #e8f3ff, #d5e8ff);

    color: #2875c7;

}

.cc-icon--inyectables {

    background: linear-gradient(145deg, #f0eaff, #e2d6ff);

    color: #8054c9;

}

.cc-icon--dermatologia {

    background: linear-gradient(145deg, #ffe9e8, #ffd8d7);

    color: #d65b61;

}

.cc-icon--oftalmologia {

    background: linear-gradient(145deg, #e7f7fa, #d2f0f5);

    color: #1689a5;

}

.cc-icon--respiratorio {

    background: linear-gradient(145deg, #e8f3ff, #d5e8ff);

    color: #3477bd;

}

.cc-icon--urinario {

    background: linear-gradient(145deg, #e7f7fa, #d2f0f5);

    color: #1689a5;

}

.cc-icon--salud {

    background: linear-gradient(145deg, #ffe9ee, #ffd6e1);

    color: #d64b75;

}

.cc-icon--infantil {

    background: linear-gradient(145deg, #fff0df, #ffe2c1);

    color: #d98235;

}

.cc-icon--cuidado {

    background: linear-gradient(145deg, #f5eaff, #e9d9ff);

    color: #9861bd;

}

.cc-icon--dental {

    background: linear-gradient(145deg, #e7f7fa, #d2f0f5);

    color: #1689a5;

}

.cc-icon--material {

    background: linear-gradient(145deg, #edf1f5, #dfe6ed);

    color: #63758a;

}

.cc-icon--equipos {

    background: linear-gradient(145deg, #e8f8ef, #d8f2e4);

    color: #078653;

}

.cc-icon--limpieza {

    background: linear-gradient(145deg, #e6f6ff, #d4edff);

    color: #3288c5;

}

.cc-icon--digestivo {

    background: linear-gradient(145deg, #fff4d8, #ffe8ac);

    color: #b77908;

}

/* =====================================================

   TEXTOS DE TARJETAS

\===================================================== */

.cc-name {

    position: relative;

    z-index: 1;

    font-size: 14px;

    font-weight: 750;

    line-height: 1.5;

    overflow-wrap: anywhere;

}

.cc-count {

    position: relative;

    z-index: 1;

    display: inline-flex;

    align-items: center;

    gap: 5px;

    margin-top: 8px;

    color: #7b8981;

    font-size: 12px;

    font-weight: 500;

}

.cc-count::before {

    content: "";

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: #0da66b;

}

/* =====================================================

   ESTADO VACÍO

\===================================================== */

.cc-empty {

    padding: 24px;

    border: 1px dashed #cfe2d5;

    border-radius: 16px;

    color: #718078;

    text-align: center;

}

/* =====================================================

   TABLET

\===================================================== */

@media (max-width: 1100px) {

    .cc-card {

        flex-basis: calc(

            (min(100vw - 36px, 1200px) - 34px) / 3

        );

    }

}

@media (max-width: 900px) {

    .cc-card {

        flex-basis: calc(

            (min(100vw - 36px, 1200px) - 17px) / 2

        );

    }

}

/* =====================================================

   MÓVIL

\===================================================== */

@media (max-width: 600px) {

    .cc-section {

        width: calc(100% - 28px);

        margin: 38px auto;

    }

    .cc-heading {

        align-items: flex-start;

        gap: 12px;

        margin-bottom: 22px;

    }

    .cc-eyebrow {

        font-size: 9px;

        letter-spacing: 1.3px;

    }

    .cc-heading h2 {

        margin: 11px 0 8px;

        font-size: 27px;

        letter-spacing: -.9px;

        line-height: 1.2;

    }

    .cc-heading p {

        max-width: 280px;

        font-size: 12px;

    }

    .cc-controls {

        gap: 5px;

    }

    .cc-arrow {

        width: 34px;

        height: 34px;

        font-size: 12px;

    }

    .cc-track {

        gap: 12px;

    }

    .cc-card {

        flex-basis: calc(100vw - 28px);

        min-height: 150px;

        padding: 18px;

        border-radius: 19px;

    }

    .cc-icon {

        width: 46px;

        height: 46px;

        margin-bottom: 12px;

        border-radius: 15px;

        font-size: 20px;

    }

    .cc-name {

        font-size: 14px;

    }

    .cc-count {

        font-size: 12px;

    }

}

/* =====================================================

   ACCESIBILIDAD

\===================================================== */

@media (prefers-reduced-motion: reduce) {

    .cc-viewport {

        scroll-behavior: auto;

    }

    .cc-card,

    .cc-icon,

    .cc-arrow,

    .cc-card::before {

        transition: none;

    }

    .cc-eyebrow-dot {

        animation: none;

    }

}

/* =====================================================
   BIO FARMA — AJUSTE RESPONSIVE MÓVIL
   Mostrar 2 o 3 categorías por pantalla
===================================================== */

@media (max-width: 600px) {
    .cc-section {
        width: calc(100% - 20px);
        margin: 28px auto;
    }

    .cc-heading {
        gap: 8px;
        margin-bottom: 16px;
    }

    .cc-heading h2 {
        font-size: clamp(22px, 6vw, 26px);
        letter-spacing: -.6px;
    }

    .cc-heading p {
        font-size: 11px;
        line-height: 1.45;
    }

    .cc-track {
        gap: 9px;
    }

    /* Dos categorías en móviles angostos */
    .cc-card {
        flex: 0 0 calc((100vw - 45px) / 2);
        min-height: 132px;
        padding: 13px 11px;
        border-radius: 16px;
    }

    .cc-icon {
        width: 39px;
        height: 39px;
        margin-bottom: 9px;
        border-radius: 12px;
        font-size: 18px;
    }

    .cc-name {
        font-size: 12px;
        line-height: 1.35;
    }

    .cc-count {
        margin-top: 5px;
        font-size: 10px;
    }

    .cc-arrow {
        width: 31px;
        height: 31px;
    }
}

/* Tres categorías en pantallas móviles más anchas */
@media (min-width: 390px) and (max-width: 600px) {
    .cc-card {
        flex-basis: calc((100vw - 54px) / 3);
        min-height: 126px;
        padding: 11px 9px;
    }

    .cc-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 8px;
        font-size: 16px;
    }

    .cc-name {
        font-size: 11px;
    }

    .cc-count {
        font-size: 9px;
    }
}

/* Mantener navegación y tarjetas cómodas en pantallas muy pequeñas */
@media (max-width: 350px) {
    .cc-card {
        flex-basis: calc((100vw - 43px) / 2);
        padding: 11px 9px;
    }
}
