/* Layout Principal */
.bonda-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (max-width: 850px) {
    .bonda-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Filtros */
.bonda-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.bonda-sidebar__title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.bonda-sidebar__chevron {
    display: none;
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.25s ease;
}

@media (max-width: 850px) {
    .bonda-sidebar__title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0;
        cursor: pointer;
        user-select: none;
    }

    .bonda-sidebar__chevron {
        display: block;
    }

    .bonda-sidebar__body {
        display: none;
    }

    .bonda-sidebar.is-open .bonda-sidebar__body {
        display: block;
    }

    .bonda-sidebar.is-open .bonda-sidebar__title {
        margin-bottom: 16px;
    }

    .bonda-sidebar.is-open .bonda-sidebar__chevron {
        transform: rotate(180deg);
    }
}

.bonda-search {
    position: relative;
    margin-bottom: 16px;
}

.bonda-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: #94a3b8;
}

.bonda-search input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.bonda-search input:focus {
    border-color: #00447C;
}

.bonda-filter-group {
    border-top: 1px solid #f1f5f9;
}

.bonda-filter-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.bonda-filter-dropdown {
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.bonda-option {
    font-size: 12px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Toolbar Superior */
.bonda-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #475569;
}

.bonda-map-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
}

.bonda-sort select {
    border: none;
    background: transparent;
    font-weight: 700;
    color: #00447C;
    cursor: pointer;
    outline: none;
}

/* Grid de Tarjetas */
.bonda-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) { .bonda-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .bonda-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) {
    .bonda-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bonda-card__header {
        height: 84px;
    }

    .bonda-card__logo-wrapper {
        margin-top: -26px;
        width: 56px;
        height: 56px;
        border-radius: 12px;
        margin-bottom: 6px;
    }

    .bonda-card__logo-inicial {
        font-size: 18px;
    }

    .bonda-card__body {
        padding: 0 10px 12px 10px;
    }

    .bonda-card__title {
        font-size: 12px;
    }

    .bonda-card__discount {
        font-size: 15px;
    }

    .bonda-card__desc {
        font-size: 10px;
    }
}

/* Tarjetas */
.bonda-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bonda-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.bonda-card__header {
    position: relative;
    height: 100px;
    background-size: cover;
    background-position: center;
    background-color: #cbd5e1;
}

.bonda-card__logo-wrapper {
    position: relative;
    margin: -35px auto 8px auto;
    width: 72px;
    height: 72px;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bonda-card__logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bonda-card__body {
    padding: 0 14px 16px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bonda-card__partner-name {
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.bonda-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.bonda-card__logo-inicial {
    font-size: 24px;
    font-weight: 800;
    color: #00447C;
}

.bonda-card__discount {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.bonda-card__desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Paginación */
.bonda-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.bonda-page-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.bonda-page-btn.active {
    background: #475569;
    color: #ffffff;
}

/* Provincias y Ciudades */
.bonda-province-title {
    font-size: 11px;
    font-weight: 800;
    color: #00447C;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    background-color: #f1f5f9;
    border-radius: 6px;
    margin-top: 6px;
    margin-bottom: 4px;
}

.bonda-cities-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bonda-loc-radio {
    cursor: pointer;
    accent-color: #00447C;
}

.bonda-loc-select {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
}

.bonda-loc-select:focus {
    border-color: #00447C;
}

/* ESTILOS PARA LA VISTA DE DETALLE DEL CUPÓN */
.container-ticket {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    background: #ffffff;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

@media (max-width: 900px) {
    .container-ticket {
        grid-template-columns: 1fr;
    }
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-text .title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 16px 0 8px 0;
}

.info-text .subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #00447C;
    margin-top: 20px;
    margin-bottom: 8px;
}

.dynamic-wysiwyg-content p {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 6px;
}

.wrap-collapse {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-top: 16px;
}

.header-collapse .text-h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.col-info__content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-box img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: #ffffff;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

.brand-box .text-h3 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

/* Texto rico proveniente de Bonda (sanitizado en el server) */
.bonda-rich { line-height: 1.6; }
.bonda-rich p { margin: 0 0 8px 0; }
.bonda-rich p:last-child { margin-bottom: 0; }
.bonda-rich ul,
.bonda-rich ol { margin: 0 0 8px 0; padding-left: 20px; }
.bonda-rich li { margin-bottom: 4px; }
.bonda-rich ul li { list-style: disc; }
.bonda-rich ol li { list-style: decimal; }
.bonda-rich a { color: #00447C; font-weight: 600; text-decoration: underline; word-break: break-word; }
.bonda-rich b,
.bonda-rich strong { font-weight: 700; color: #0f172a; }
.bonda-rich h1, .bonda-rich h2, .bonda-rich h3, .bonda-rich h4 {
    font-weight: 700;
    color: #0f172a;
    margin: 10px 0 6px 0;
}

.valid-for {
    font-size: 12px;
    color: #64748b;
}