:root {
    --assa-descuentos-primary: #0D2E68;
    --assa-descuentos-primary-dark: #00287A;
    --assa-descuentos-whatsapp: #25D366;
    --assa-descuentos-text: #1A1A1A;
    --assa-descuentos-text-secondary: #555555;
    --assa-descuentos-border: #E5E7EB;
    --assa-descuentos-bg: #F7F9FC;
    --assa-descuentos-card-bg: #FFFFFF;
    --assa-descuentos-radius: 16px;
    --assa-descuentos-shadow: 0 4px 20px rgba(0, 51, 160, 0.08);
    --assa-descuentos-shadow-hover: 0 8px 30px rgba(0, 51, 160, 0.14);
}

.assa-descuentos-wrap {
    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Header */
.assa-descuentos-header {
    text-align: center;
    margin-bottom: 40px;
}

.assa-descuentos-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--assa-descuentos-primary);
    margin: 0 0 20px;
    line-height: 1.2;
}

.assa-descuentos-subtitle {
    font-size: 18px;
    color: var(--assa-descuentos-text-secondary);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .assa-descuentos-title {
        font-size: 28px;
    }
    .assa-descuentos-subtitle {
        font-size: 16px;
    }
}

/* Pills - estilo Figma */
.assa-descuentos-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.assa-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: #F2F4F6;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.assa-pill:hover {
    background: #E8EAED;
    color: #0D2E68;
}

.assa-pill--active,
.assa-pill--active:hover,
.assa-descuentos-pills .assa-pill--active,
.assa-descuentos-pills .assa-pill--active:hover,
button.assa-pill--active,
button.assa-pill--active:hover {
    background: #CDE4FF !important;
    color: #0D2E68 !important;
}

/* Grid */
.assa-descuentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.assa-card {
    background: var(--assa-descuentos-card-bg);
    border: 1px solid var(--assa-descuentos-border);
    border-radius: var(--assa-descuentos-radius);
    box-shadow: var(--assa-descuentos-shadow);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.assa-card:hover {
    box-shadow: var(--assa-descuentos-shadow-hover);
    transform: translateY(-3px);
}

.assa-card.is-hidden {
    display: none;
}

/* Collapsed card */
.assa-card__collapsed {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 28px 24px;
}

.assa-card__logo {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--assa-descuentos-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.assa-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.assa-card__logo-placeholder {
    font-size: 42px;
    font-weight: 700;
    color: var(--assa-descuentos-primary);
    text-transform: uppercase;
}

.assa-card__body {
    width: 100%;
}

.assa-card__category {
    display: none;
}

.assa-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--assa-descuentos-primary);
    margin: 0 0 12px;
    line-height: 1.25;
}

.assa-card__short {
    font-size: 15px;
    color: var(--assa-descuentos-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.assa-card__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: none;
    border-radius: 999px;
    background: #3B99D7;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.assa-card__toggle:hover {
    background: #3B99D7;
    color: #FFFFFF;
}

.assa-card__toggle-icon {
    display: none;
}




/* Modal */
.assa-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.assa-modal[hidden] {
    display: none;
}

.assa-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 33, 71, 0.72);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.assa-modal__content {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 33, 71, 0.25);
    padding: 40px 32px 32px;
    text-align: left;
    animation: assa-modal-in 0.25s ease;
}

@keyframes assa-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.assa-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 2px solid #0193E5;
    border-radius: 50%;
    background: #FFFFFF;
    color: #0193E5;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.assa-modal__close:hover {
    background: #0193E5;
    color: #FFFFFF;
}

.assa-modal__header {
    text-align: center;
    margin-bottom: 16px;
}

.assa-modal__logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #F7F9FC;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.assa-modal__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.assa-modal__logo-placeholder {
    font-size: 36px;
    font-weight: 700;
    color: #0D2E68;
    text-transform: uppercase;
}

.assa-modal__category {
    display: none;
}

.assa-modal__title {
    font-size: 24px;
    font-weight: 700;
    color: #0D2E68;
    margin: 0 0 16px;
    line-height: 1.25;
    text-align: center;
}

h3.assa-modal__title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #0D2E68 !important;
    margin: 0 0 16px !important;
    line-height: 1.25 !important;
    text-align: center !important;
}

.assa-modal__short {
    font-size: 18px;
    font-weight: 700;
    color: #555555;
    line-height: 1.4;
    margin-bottom: 20px;
    text-align: center;
}

.assa-modal__short:has(ul),
.assa-modal__short.assa-modal__short--list {
    text-align: left;
}

.assa-modal__short ul,
.assa-modal__list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    font-size: 15px;
    color: #555555;
    line-height: 1.4;
}

.assa-modal__short ul li,
.assa-modal__list li {
    margin-bottom: 4px;
}

.assa-modal__section {
    margin-bottom: 16px;
}

.assa-modal__section-title {
    font-size: 15px;
    font-weight: 700;
    color: #0D2E68;
    margin: 0 0 10px;
}

.assa-modal__validity {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555555;
    margin: 0 0 20px;
}

.assa-modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.assa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
    cursor: pointer;
    flex: 1;
    min-height: 44px;
}

.assa-btn svg,
.assa-btn__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.assa-btn--primary,
.assa-btn--primary:hover {
    background: #FFFFFF !important;
    color: #0193E5 !important;
    border: 2px solid #0193E5 !important;
}

.assa-btn--primary svg,
.assa-btn--primary .assa-btn__icon,
.assa-btn--primary:hover svg,
.assa-btn--primary:hover .assa-btn__icon {
    filter: none !important;
}

.assa-btn--primary .assa-btn__icon {
    width: 21px;
    height: 21px;
}

.assa-btn--whatsapp,
.assa-btn--whatsapp:hover {
    background: #0193E5 !important;
    color: #FFFFFF !important;
    border-color: #0193E5 !important;
}

@media (max-width: 600px) {
    .assa-modal__content {
        padding: 32px 20px 24px;
        border-radius: 12px;
    }
    .assa-modal__title {
        font-size: 20px;
    }
    .assa-modal__logo {
        width: 100px;
        height: 100px;
    }
    .assa-modal__actions {
        flex-direction: column;
    }
}

/* Grupos por categoría */
.assa-descuentos-groups {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.assa-descuentos-group__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #0D2E68;
    margin: 0 0 24px;
    line-height: 1.3;
}

.assa-descuentos-group__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    object-fit: contain;
}

.assa-descuentos-group.is-hidden {
    display: none;
}

@media (max-width: 760px) {
    .assa-descuentos-group__title {
        font-size: 20px;
    }
    .assa-descuentos-group__icon {
        width: 22px;
        height: 22px;
    }
    .assa-descuentos-groups {
        gap: 36px;
    }
}

/* Fix: .assa-btn { display: inline-flex; } anula hidden nativo del navegador */
.assa-btn[hidden] {
    display: none !important;
}

/* Boton IR A ASSA APP (solo Farmacia IZI) */
.assa-btn--assa-app,
.assa-btn--assa-app:hover {
    background: #0193E5 !important;
    color: #FFFFFF !important;
    border: 2px solid #0193E5 !important;
}

.assa-modal__actions--app-only {
    justify-content: center;
}

.assa-modal__actions--app-only .assa-btn--assa-app {
    flex: 0 0 auto;
    min-width: 240px;
}

/* Pills en grid de 2 columnas (solo mobile) */
@media (max-width: 760px) {
    .assa-descuentos-pills {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .assa-pill {
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

/* Carrusel de tarjetas por categoria (solo mobile) */
@media (max-width: 760px) {
    .assa-descuentos-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .assa-descuentos-grid::-webkit-scrollbar {
        display: none;
    }

    .assa-descuentos-grid .assa-card {
        flex: 0 0 100%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .assa-descuentos-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 14px;
    }

    .assa-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #EAEAEA;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
        flex-shrink: 0;
    }

    .assa-dot--active {
        background: #0193E5;
        transform: scale(1.15);
    }
}

@media (min-width: 761px) {
    .assa-descuentos-dots {
        display: none;
    }
}


/* Botón Llamar (comercios sin WhatsApp, ej. números 800) */
.assa-btn--llamar,
.assa-btn--llamar:hover {
    background: #0193E5 !important;
    color: #FFFFFF !important;
    border: 2px solid #0193E5 !important;
}

/* Ubicaciones: lista compacta en 2 columnas cuando son muchas */
.assa-modal__list--locations {
    columns: 2;
    column-gap: 24px;
}

@media (max-width: 600px) {
    .assa-modal__list--locations {
        columns: 1;
    }
}
