/* ============================================================
   LA YUNTA - ESTILOS DEL MÓDULO DE PROMOCIONES & RANKING
   Alineado con el diseño oscuro y sobrio de Productos y Dashboard
   ============================================================ */

.promo-page-body {
    background-color: #0b0f19;
    color: #e2e8f0;
}

/* Botón Switch a Top Artículos en Navbar */
.btn-nav-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-nav-switch:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    transform: translateY(-1px);
}

/* Botón Toggle de Modo Ranking */
.btn-ranking-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-ranking-toggle:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-ranking-toggle.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.25) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.btn-ranking-toggle.active i {
    color: #fbbf24;
    transform: scale(1.1);
}

/* Contenedor de Promociones */
.promos-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

/* Tarjeta Individual de Promoción */
.promo-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.promo-card:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.promo-card.rank-top-1 {
    border-left: 4px solid #f59e0b;
}

.promo-card.rank-top-2 {
    border-left: 4px solid #94a3b8;
}

.promo-card.rank-top-3 {
    border-left: 4px solid #b45309;
}

/* Header de la Tarjeta */
.promo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
}

.promo-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.promo-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1.1rem;
    font-weight: 900;
    color: #e2e8f0;
}

.promo-rank-badge.top-1 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.4) 100%);
    border-color: rgba(245, 158, 11, 0.6);
    color: #fbbf24;
}

.promo-rank-badge.catalog-badge {
    font-size: 0.85rem;
    font-weight: 700;
    min-width: auto;
    height: 32px;
    padding: 0 12px;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.promo-title-texts h4 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.3px;
}

.promo-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #94a3b8;
}

.badge-coverage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-weight: 600;
}

.badge-coverage.not-applied {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.badge-dates {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Grilla de Métricas de la Tarjeta */
.promo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.promo-metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.promo-metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.promo-metric-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
}

.promo-metric-val.emerald {
    color: #10b981;
}

.promo-metric-val.amber {
    color: #fbbf24;
}

.promo-metric-val.purple {
    color: #c084fc;
}

.promo-metric-val.cyan {
    color: #38bdf8;
}

/* Sección Top Items Vendidos dentro de la Promo */
.promo-top-items-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.promo-top-items-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.promo-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.promo-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.promo-item-chip:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.3);
    color: #f8fafc;
}

.promo-item-chip strong {
    color: #38bdf8;
}

.promo-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
}

.btn-open-promo-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-promo-modal:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Modal Detalle de Promoción */
.promo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.promo-modal-backdrop.active {
    display: flex;
}

.promo-modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 1100px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.promo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.8);
}

.promo-modal-title-group h3 {
    margin: 4px 0 6px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #f8fafc;
}

.promo-modal-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
}

.promo-modal-dates {
    font-size: 0.85rem;
    color: #94a3b8;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

.promo-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.promo-modal-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.modal-stat-pill {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.modal-stat-pill strong {
    font-size: 1.15rem;
    color: #f8fafc;
}

.promo-modal-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.promo-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.promo-modal-table th {
    background: rgba(15, 23, 42, 0.95);
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.72rem;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-modal-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    white-space: nowrap;
}

.promo-modal-table th.text-right,
.promo-modal-table td.text-right {
    text-align: right;
}

.promo-modal-table th.text-center,
.promo-modal-table td.text-center {
    text-align: center;
}

.promo-modal-table tr:hover td {
    background: rgba(30, 41, 59, 0.4);
}

.promo-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.8);
}

.btn-modal-close-action {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-close-action:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #ffffff;
}

/* Tabla de Desglose de Descuentos por Tienda */
.promo-stores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.promo-stores-table th {
    background: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-stores-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

.promo-stores-table tr:hover td {
    background: rgba(30, 41, 59, 0.35);
}

.badge-discount-rate {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

/* Responsive */
@media (max-width: 900px) {
    .promo-card-header {
        flex-direction: column;
    }
    .promo-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    .promo-subtemas-bar {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   SUBTEMAS NAVIGATION BAR & PANELS
   ============================================================ */
.promo-subtemas-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 24px 0 24px;
}

.promo-subtema-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}

.promo-subtema-tab:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    transform: translateY(-1px);
}

.promo-subtema-tab.active {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: rgba(56, 189, 248, 0.55);
    color: #f8fafc;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.promo-subtema-tab.active i {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
}

.promo-subtema-tab i {
    font-size: 1.3rem;
    padding: 10px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #64748b;
    transition: all 0.2s ease;
}

.subtema-tab-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.subtema-tab-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.subtema-tab-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.subtema-content-panel {
    animation: fadeInTab 0.25s ease-out;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PÁGINA ESPECÍFICA DE DETALLE DE TIENDA
   ============================================================ */
.store-detail-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-back-stores-list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-stores-list:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateX(-3px);
}

.store-detail-title-badge {
    display: flex;
    align-items: center;
    gap: 14px;
}

.store-detail-title-badge h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
}

.badge-store-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.badge-store-type.franquicia {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.35);
    color: #c084fc;
}

.store-specific-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.store-kpi-card {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.store-promos-section {
    margin-top: 10px;
}

/* Tabla de Tiendas con Filas Interactiva / Clickable */
.promo-stores-table tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
}

.promo-stores-table tbody tr:hover td {
    background: rgba(30, 41, 59, 0.65) !important;
    color: #f8fafc;
}

.promo-stores-table tbody tr:hover td:first-child {
    border-left: 3px solid #38bdf8;
}

.btn-table-action-store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.promo-stores-table tbody tr:hover .btn-table-action-store {
    background: #38bdf8;
    color: #0b0f19;
    border-color: #38bdf8;
}

/* Controles de Ordenamiento del Ranking de Promociones */
.ranking-header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.promo-sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-sort-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.promo-sort-label i {
    color: #f59e0b;
}

.promo-sort-select {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.promo-sort-select:hover,
.promo-sort-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.promo-sort-select option {
    background: #0f172a;
    color: #f1f5f9;
}

.btn-promo-sort-dir {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    white-space: nowrap;
}

.btn-promo-sort-dir:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.btn-promo-sort-dir.desc {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.btn-promo-sort-dir.desc:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #fbbf24;
}

.btn-promo-sort-dir.asc {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
}

.btn-promo-sort-dir.asc:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #34d399;
}

.btn-promo-sort-dir i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

/* ============================================================
   BUSCADOR DE ARTÍCULOS EN PROMOCIÓN
   ============================================================ */
.promo-search-panel {
    background: var(--bg-card, rgba(15, 23, 42, 0.72));
    backdrop-filter: var(--glass-blur, blur(16px));
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 16px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.promo-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.promo-search-header h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.promo-search-header h3 i {
    color: #38bdf8;
}

.promo-search-tip {
    font-size: 0.78rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
}

.promo-search-box-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.promo-search-input-wrap {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.promo-search-input-wrap:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.promo-search-input-wrap i {
    color: #38bdf8;
    font-size: 0.95rem;
}

.promo-search-input-wrap input {
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
}

.promo-search-input-wrap input::placeholder {
    color: #64748b;
}

.btn-promo-search-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-promo-search-clear:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #f87171;
    color: #fff;
}

.promo-article-results-container {
    margin-top: 1rem;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.promo-article-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.promo-article-results-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.promo-article-results-title i {
    color: #34d399;
}

.promo-article-count-badge {
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
}

.btn-inline-open-promo {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-inline-open-promo:hover {
    background: rgba(56, 189, 248, 0.28);
    color: #fff;
}

.promo-item-chip-match {
    background: rgba(56, 189, 248, 0.16) !important;
    border-color: rgba(56, 189, 248, 0.55) !important;
    color: #e0f2fe !important;
}

.store-promo-search-bar {
    margin: 0.85rem 0 1.1rem 0;
}

/* ============================================================
   RESPONSIVIDAD MASTER PROMOCIONES
   ============================================================ */
@media (max-width: 900px) {
    .promo-search-panel {
        padding: 0.95rem 1rem !important;
    }

    .promo-search-box-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .promo-search-input-wrap {
        width: 100% !important;
        min-width: 0 !important;
    }

    .btn-promo-search-clear {
        width: 100% !important;
        justify-content: center !important;
    }
    .promo-subtemas-bar {
        grid-template-columns: 1fr !important;
        margin: 0.75rem 0 !important;
        gap: 8px !important;
    }

    .promo-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .ranking-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .ranking-search-box {
        width: 100% !important;
    }

    .ranking-header-controls {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
    }

    .promo-sort-group {
        flex: 1 1 100% !important;
        justify-content: space-between !important;
    }

    .promo-sort-select {
        flex: 1 !important;
    }

    .btn-export-ranking {
        width: 100% !important;
        justify-content: center !important;
    }

    .promo-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .promo-metrics-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
    }

    .store-specific-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }

    .store-select-wrapper select,
    .store-specific-filter-bar input[type="date"] {
        width: 100% !important;
    }

    .store-specific-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

@media (max-width: 550px) {
    .promo-metrics-grid,
    .store-specific-kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .promo-modal-stats-bar {
        grid-template-columns: 1fr !important;
    }
}



