/* ==========================================================================
   CoStore - Combos Colaborativos: Estilos Frontend
   ========================================================================== */

/* --- Contenedor Principal del Panel --- */
.costore-combos-dashboard,
.costore-bandeja-solicitudes {
    font-family: inherit;
    margin: 25px 0;
    color: #2d3748;
}

/* --- Tarjetas de Métricas (KPIs) --- */
.costore-combos-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.costore-kpi-card {
    background: #ffffff;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.costore-kpi-card .kpi-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.costore-kpi-card .kpi-value {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.costore-kpi-card.kpi-total .kpi-value { color: #2d3748; }
.costore-kpi-card.kpi-units .kpi-value { color: #2b6cb0; }
.costore-kpi-card.kpi-revenue .kpi-value { color: #38a169; }

/* --- Tabla de Gestión de Combos --- */
.costore-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    padding: 20px;
}

.costore-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.costore-table-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a202c;
}

.costore-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.costore-data-table thead tr {
    border-bottom: 2px solid #edf2f7;
    height: 42px;
    color: #4a5568;
}

.costore-data-table th,
.costore-data-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

.costore-data-table tbody tr {
    border-bottom: 1px solid #edf2f7;
    transition: background 0.15s ease-in-out;
}

.costore-data-table tbody tr:hover {
    background: #f7fafc;
}

/* Badges de Estado */
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-status.activo {
    background: #c6f6d5;
    color: #22543d;
}

.badge-status.inactivo {
    background: #fed7d7;
    color: #742a2a;
}

.badge-status.pendiente {
    background: #feebc8;
    color: #7b341e;
}

/* Acciones y Formularios en Tabla */
.form-precio-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.form-precio-inline input[type="number"] {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 13px;
}

.btn-costore {
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-costore:hover {
    opacity: 0.9;
}

.btn-actualizar {
    background: #4a5568;
    color: #ffffff;
}

.btn-pausar {
    background: #e53e3e;
    color: #ffffff;
}

.btn-reactivar {
    background: #3182ce;
    color: #ffffff;
}

.btn-aprobar {
    background: #38a169;
    color: #ffffff;
    margin-right: 6px;
}

.btn-rechazar {
    background: #718096;
    color: #ffffff;
}

/* --- Vitrina Pública de Combos (Tienda WCFM) --- */
.costore-vitrina-tienda {
    margin: 35px 0 25px 0;
    padding: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.costore-vitrina-tienda .vitrina-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.costore-vitrina-tienda .vitrina-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1a202c;
}

.combos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.combo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.combo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
}

.combo-card .combo-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 120px;
    margin-bottom: 12px;
}

.combo-card .combo-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.combo-card h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #2d3748;
}

.combo-card .combo-composition {
    font-size: 13px;
    color: #718096;
    margin-bottom: 14px;
    line-height: 1.4;
}

.combo-card .combo-price-box {
    margin-bottom: 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.combo-card .precio-especial {
    font-size: 22px;
    font-weight: 800;
    color: #2f855a;
}

.combo-card .precio-regular {
    font-size: 14px;
    text-decoration: line-through;
    color: #a0aec0;
}

.combo-card .btn-comprar {
    width: 100%;
    background: #319795;
    color: #ffffff;
    border: none;
    padding: 11px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.combo-card .btn-comprar:hover {
    background: #285e61;
}

/* Spinner AJAX / Estado deshabilitado */
.costore-loading {
    opacity: 0.5;
    pointer-events: none;
}
