:root {
    --ea-bg-card: #fff;
    --ea-border-card: #e4eaf1;
    --ea-shadow-card: 0 8px 32px 0 rgba(80, 110, 160, 0.07);
    --ea-title: #23272F;
    --ea-price: #23272f;
    --ea-text: #7e8ba0;
    --ea-img-bg: #f5f9fc;
    --ea-btn-coral: #3483FA;
    --ea-btn-coral-hover: #2968C8;
    --ea-pagination-shadow: 0 2px 8px rgba(52,131,250,.09);
    --ea-pagination-shadow-hover: 0 8px 28px 0 rgba(52,131,250,.14);
    --ea-pagination-shadow-active: 0 8px 28px 0 rgba(52,131,250,.22);
    --ea-pagination-bg-active: #3483FA;
    --ea-pagination-color: #3483FA;
    --ea-pagination-color-active: #fff;
}

/* CARD DE PRODUCTO */
.ea-product-card {
    background: var(--ea-bg-card);
    border-radius: 18px;
    box-shadow: var(--ea-shadow-card);
    color: var(--ea-title);
    border: 1.5px solid var(--ea-border-card);
    height: 470px;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, border-color .2s;
    overflow: hidden;
}

/* IMAGEN SIEMPRE CUADRADA Y CENTRADA */
.categoria-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--ea-img-bg);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categoria-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: var(--ea-img-bg);
}

/* CUERPO DE LA CARD */
.card-body {
    flex: 1 1 auto;
    padding: 1.1rem !important;
    height: 280px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    background: #fff;
}

.card-title {
    font-size: 1.15rem;
    height: 30px;
    font-weight: 700;
    color: var(--ea-title);
    margin-bottom: 0.18rem;
    padding-left: 2px;
    letter-spacing: -.5px;
    text-align: center !important;
}

.card-text {
    height: 50px;
}

/* BLOQUE DE PRECIOS/DESCUENTO UNIFORME */
.card-precios-descuento {
    margin-bottom: 1.05rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0; /* sin espacio entre líneas */
}

.card-precios-descuento .row-precio {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.badge-descuento.invisible,
.precio-anterior.invisible {
    visibility: hidden;
    width: 44px;  /* mismo ancho aprox que el badge y el "antes" real */
    display: inline-block;
    height: 22px;
}
.precio-anterior {
    min-width: 110px;
    margin-left: 2px;
    margin-top: 2px;
    display: block;
}


/* El resto igual */
.badge-descuento {
    background: #e01a39;
    color: #fff;
    font-size: 0.99rem;
    font-weight: 700;
    border-radius: 7px;
    padding: 4px 12px 3px 12px;
    display: inline-block;
    letter-spacing: -0.5px;
}
.precio-descuento {
    color: #23272f;
    font-weight: 700;
    font-size: 1.41rem;
    letter-spacing: -0.5px;
}
.precio-anterior {
    color: #b3bbcc;
    font-size: 1.05rem;
    text-decoration: line-through;
    font-weight: 500;
    margin-left: 2px;
    margin-top: 2px;
    display: inline-block;
    min-width: 92px; /* para reservar el ancho, incluso cuando hay poco texto */
   
}

.badge-regular {
    background: #e4eaf1;
    color: #7e8ba0;
    font-size: 0.99rem;
    font-weight: 700;
    border-radius: 7px;
    padding: 4px 12px 3px 12px;
    display: inline-block;
    letter-spacing: -0.5px;
    margin-right: 8px;
}


/* BOTÓN */
.ea-btn-coral {
    font-size: 1rem;
    border-radius: 18px;
    padding: 0.78rem 1.1rem;
    background: var(--ea-btn-coral);
    color: #fff !important;
    border: none;
    font-weight: 600;
    transition: background .18s, transform .13s, box-shadow .13s;
    box-shadow: 0 2px 8px rgba(52,131,250,.09);
    letter-spacing: .2px;
    text-decoration: none !important;
    display: block;
    width: 100%;
    margin-top: auto;
    margin-bottom: 0.1rem;
}

.ea-btn-coral:hover,
.ea-btn-coral:focus {
    background: var(--ea-btn-coral-hover);
    color: #fff !important;
    transform: scale(1.045);
    box-shadow: 0 8px 28px 0 rgba(52,131,250,.14);
}
.ea-btn-coral:active {
    transform: scale(0.97);
    box-shadow: 0 1px 6px 0 rgba(52,131,250,.08);
}

/* PAGINACIÓN ANIMADA Y SEPARADA */
.pagination .page-item {
    margin: 0 4px;
}
.pagination .page-link {
    padding: 0.62rem 1.18rem;
    border-radius: 8px !important;
    font-weight: 600;
    background: none;
    color: var(--ea-pagination-color);
    border: none;
    box-shadow: var(--ea-pagination-shadow);
    transition: background 0.18s, color 0.18s, transform 0.13s, box-shadow 0.13s;
}
.pagination .page-link:hover,
.pagination .page-link:focus {
    background: var(--ea-pagination-bg-active);
    color: var(--ea-pagination-color-active);
    transform: scale(1.07);
    box-shadow: var(--ea-pagination-shadow-hover);
    text-decoration: none;
    outline: none;
}
.pagination .page-item.active .page-link {
    background: var(--ea-pagination-bg-active);
    color: var(--ea-pagination-color-active);
    font-weight: 700;
    transform: scale(1.09);
    box-shadow: var(--ea-pagination-shadow-active);
    transition: background 0.18s, color 0.18s, transform 0.13s, box-shadow 0.13s;
}

/* OTROS: título, label, alertas */
.ea-title-pagina {
    color: #23272f;
    letter-spacing: -.5px;
    font-size: 2rem;
    font-weight: 800;
}
.ea-label-orden {
    color: #23272f;
}
.ea-alert-info {
    background: #4d5a6c;
    color: #fff;
    border: none;
}

/* RESPONSIVE para móvil */
@media (max-width: 500px) {
    .ea-product-card {
        min-height: 350px;
        max-height: none;
        height: auto;
        border-radius: 12px;
    }
    .categoria-img-container {
        aspect-ratio: 1 / 1;
        min-height: 110px;
        max-height: 170px;
    }
    .card-body {
        padding: 1rem 0.7rem 1.12rem 0.7rem !important;
    }
    .ea-btn-coral {
        font-size: 0.98rem;
        border-radius: 12px;
    }
    .card-precios-descuento {
        min-height: 38px;
    }
}

