/* ==========================================================================
   COMPRASGT: UI REFINED LIGHT, BLUE & CELESTE (ULTIMATE COMPLETE EDITION)
   ========================================================================== */

:root {
    --panel-bg: #f8fafc;           /* Fondo general muy claro y limpio */
    --card-bg: #ffffff;            /* Fondo de tarjetas blanco puro */
    --modal-bg: #ffffff;
    --accent-blue: #2563eb;        /* Azul corporativo principal */
    --accent-celeste: #38bdf8;     /* Celeste vibrante para interacciones */
    --text-primary: #1e293b;       /* Texto principal oscuro */
    --text-secondary: #64748b;     /* Texto secundario gris */
    --success-green: #10b981;
    --danger-red: #ef4444;
    --border-light: #e2e8f0;       /* Bordes muy suaves */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   1. CONTENEDOR Y SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--panel-bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.comprasgt-panel {
    background-color: var(--panel-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    margin-top: 25px;
    border: 1px solid var(--border-light);
}

/* ==========================================================================
   FIX ESTRUCTURAL: BARRA SUPERIOR, TABS PÍLDORA Y BUSCADOR
   ========================================================================== */

/* 1. Título de la Terminal (Estructura de 2 líneas) */
.comprasgt-panel .fa-app-top-bar {
    background: #ffffff;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.fa-user-welcome {
    display: flex;
    flex-direction: column; /* Obliga a que el nombre vaya debajo del título */
    gap: 4px;
}

.comprasgt-panel .welcome-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    font-weight: 800;
}

.comprasgt-panel .user-name {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent-blue);
    line-height: 1.2;
}

/* 2. Pestañas estilo "Píldora" (A prueba de fallos del tema) */
.comprasgt-panel .fa-navigation-tabs {
    display: flex;
    background: #f8fafc;
    padding: 20px 30px;
    gap: 15px;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto; /* Permite deslizar en móviles si hay muchas */
}

.comprasgt-panel .tab-btn {
    background: #e2e8f0 !important; /* Fondo gris claro por defecto */
    color: var(--text-secondary) !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border-radius: 12px !important; /* Bordes totalmente redondeados */
    transition: all 0.3s ease !important;
}

.comprasgt-panel .tab-btn:hover {
    background: #cbd5e1 !important;
    color: var(--text-primary) !important;
}

.comprasgt-panel .tab-btn.active {
    background: var(--accent-blue) !important; /* Azul sólido al activarse */
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
}

.comprasgt-panel .tab-btn.active::after {
    display: none !important; /* Oculta la línea inferior vieja */
}

/* 3. Buscador blindado (Fix de la Lupa sobre el texto) */
.search-bar-modern { 
    position: relative; 
    margin-bottom: 30px; 
    display: flex;
    align-items: center;
}

.search-bar-modern .dashicons {
    position: absolute; 
    left: 20px !important; /* Aleja la lupa del borde */
    color: var(--accent-blue) !important; /* Lupa azul para que resalte */
    font-size: 22px !important;
    z-index: 5;
}

.search-bar-modern input {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    padding: 16px 20px 16px 60px !important; /* Forzamos 60px de espacio a la izquierda para la lupa */
    border-radius: 16px !important;
    font-size: 15px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
}

/* 4. Ajustes precisos para celular de esta área */
@media (max-width: 768px) {
    .comprasgt-panel .fa-app-top-bar { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
        padding: 20px;
    }
    .fa-user-welcome { 
        align-items: center; 
        margin-bottom: 5px;
    }
    .comprasgt-panel .fa-navigation-tabs { 
        padding: 15px; 
        justify-content: center;
    }
    .comprasgt-panel .tab-btn { 
        flex: 1; /* Hace que ambos botones midan lo mismo */
        text-align: center;
        padding: 12px 10px !important;
    }
}

/* ==========================================================================
   3. BOTONES MODERNOS
   ========================================================================== */
.btn-primary-modern, .btn-save-modern {
    background: linear-gradient(135deg, var(--accent-celeste) 0%, var(--accent-blue) 100%);
    color: #ffffff !important;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary-modern:hover, .btn-save-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

.btn-delete-selected {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
}

/* ==========================================================================
   4. BUSCADOR Y SECCIÓN PRINCIPAL
   ========================================================================== */
.comprasgt-panel .administrator-tab-content { padding: 30px; }

.search-bar-modern { position: relative; margin-bottom: 30px; }
.search-bar-modern .dashicons {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-secondary);
}
.search-bar-modern input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 16px 20px 16px 50px;
    border-radius: 16px;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* ==========================================================================
   5. TARJETAS DE PEDIDO AVANZADAS (FUNCIONES ANULADAS/INLINE)
   ========================================================================== */

/* AHORA ANULADO PARA SER APLICADO EN LÍNEA:
.order-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}
*/

/* DEJAMOS EL HOVER PARA INTERACTIVIDAD */
.order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--accent-celeste) !important;
}

/* ==========================================================================
   MEJORA DE VISIBILIDAD EN TARJETAS (TEXTOS Y BOTONES)
   ========================================================================== */

/* AHORA ANULADO PARA SER APLICADO EN LÍNEA:
.order-id {
    font-size: 22px !important; 
    font-weight: 900 !important;
    color: var(--accent-blue) !important;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.customer-name {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin-bottom: 10px;
}

.order-card div[style*="text-transform:uppercase"] {
    font-size: 14px !important;
    letter-spacing: 1.5px !important;
    margin-top: 15px !important;
    color: var(--accent-blue) !important;
    background: #eff6ff; 
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
}

.btn-wa-status {
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 8px 5px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.wa-status-actions span {
    font-size: 12px !important;
    margin-bottom: 10px !important;
    color: var(--text-primary) !important;
}

.order-extra-info p {
    font-size: 16px !important; 
}
*/

/* HOVERS DE BOTONES DE WHATSAPP CONSERVADOS */
.btn-wa-status:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ==========================================================================
   FIX ICONOS Y TEXTO DE INFO ADICIONAL
   ========================================================================== */

/* AHORA ANULADO PARA SER APLICADO EN LÍNEA:
.order-extra-info {
    margin: 15px 0;
    padding: 12px 15px;
    background: #f8fafc; 
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.order-extra-info p {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 10px 0 !important;
    font-size: 15px !important; 
    color: #334155 !important;
    line-height: 1.2 !important;
}
*/

/* Forzar renderizado de Dashicons (DEJADO INTACTO PARA PREVENIR ERRORES GRÁFICOS DEL TEMA) */
.order-extra-info .dashicons, 
.order-extra-info .dashicons-before:before {
    font-family: "dashicons" !important;
    display: inline-block !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    font-style: normal !important;
    speak: never;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important; /* Iconos más grandes */
    color: #2563eb !important; /* Color azul fuerte */
}

/* AHORA ANULADO PARA SER APLICADO EN LÍNEA:
.order-extra-info span {
    word-break: break-all;
}

.order-total {
    font-size: 24px; font-weight: 800;
    color: var(--text-primary);
    margin-top: auto; padding-top: 15px;
    border-top: 1px solid var(--border-light);
}
*/

/* ==========================================================================
   6. CHECKBOXES Y ACCIONES MASIVAS
   ========================================================================== */
input[type="checkbox"].order-checkbox, 
input[type="checkbox"]#select-all-orders {
    appearance: none; background-color: #ffffff;
    border: 2px solid #cbd5e1; border-radius: 6px;
    width: 20px; height: 20px;
    transition: all 0.2s ease; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
}

input[type="checkbox"]:hover { border-color: var(--accent-blue); }

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--accent-celeste), var(--accent-blue));
    border-color: transparent;
}

input[type="checkbox"]:checked::after {
    content: '✓'; color: #ffffff; font-weight: 900; font-size: 14px;
}

/* ==========================================================================
   7. MODALES Y BOTÓN CERRAR (LIGHT EDITION)
   ========================================================================== */
.fa-modal-custom {
    position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.5); /* Fondo oscuro semitransparente */
    backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
}

.fa-modal-custom .modal-content {
    background: var(--modal-bg); padding: 35px;
    border: none; border-radius: 24px;
    width: 92%; max-width: 900px; max-height: 90vh; overflow-y: auto;
    position: relative; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.close-modal {
    position: absolute; top: 20px; right: 25px;
    background: #f1f5f9; color: var(--text-secondary);
    font-size: 24px; font-weight: 700; cursor: pointer; transition: all 0.3s ease;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.close-modal:hover { background: #fee2e2; color: var(--danger-red); transform: rotate(90deg); }

/* Títulos dentro del modal */
.modal-section-title, .comprasgt-panel .panel-section h2, .comprasgt-panel .panel-section h3 {
    color: var(--accent-blue); font-size: 14px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 20px; border-bottom: 1px solid var(--border-light); padding-bottom: 10px;
}

/* ==========================================================================
   8. FORMULARIOS E INPUTS GLOBALES (NUEVO CLIENTE / EDICIÓN)
   ========================================================================== */
.comprasgt-form-grid, .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }

/* Unifica todos los inputs, textareas y selectores */
.comprasgt-panel input[type="text"], .comprasgt-panel input[type="email"],
.comprasgt-panel input[type="tel"], .comprasgt-panel input[type="number"],
.comprasgt-panel textarea, .comprasgt-panel select, .modern-input {
    width: 100% !important; background: #f8fafc !important;
    border: 1px solid var(--border-light) !important; color: var(--text-primary) !important;
    padding: 7px !important; border-radius: 12px !important; font-size: 14px !important;
    box-sizing: border-box !important; transition: all 0.3s ease !important; margin-bottom: 10px;
}

.comprasgt-panel input:focus, .comprasgt-panel textarea:focus, .comprasgt-panel select:focus, .modern-input:focus {
    outline: none !important; border-color: var(--accent-blue) !important; background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.comprasgt-panel label {
    color: var(--text-secondary); font-size: 12px; font-weight: 700;
    margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.5px;
}

/* Ocultamiento de selectores base */
#select-cliente-ajax, #select-productos-ajax, #edit-select-productos-ajax {
    opacity: 0; height: 0; width: 100%; position: absolute; pointer-events: none; z-index: -1;
}

/* ==========================================================================
   9. SELECT2 CUSTOMIZATION (LIGHT EDITION)
   ========================================================================== */
.select2-container { z-index: 999999 !important; width: 100% !important; }

.select2-container--default .select2-selection--single {
    background-color: #f8fafc !important; border: 1px solid var(--border-light) !important;
    height: 48px !important; border-radius: 12px !important;
    display: flex; align-items: center; transition: all 0.3s;
}

.select2-container--open .select2-selection--single {
    border-color: var(--accent-blue) !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text-primary) !important; padding-left: 15px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px !important; right: 15px !important; }

.select2-dropdown {
    background-color: #ffffff !important; border: 1px solid var(--border-light) !important;
    border-radius: 12px !important; box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important; overflow: hidden;
}

.select2-search__field {
    background-color: #f1f5f9 !important; border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important; border-radius: 8px !important; padding: 12px !important;
}
.select2-search__field:focus { outline: none !important; border-color: var(--accent-blue) !important; }

.select2-results__option { color: var(--text-secondary) !important; padding: 12px 15px !important; border-bottom: 1px solid #f1f5f9; }
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(37, 99, 235, 0.1) !important; color: var(--accent-blue) !important; font-weight: bold;
}

/* ==========================================================================
   10. CARRITO TEMPORAL Y BOTONES ELIMINAR
   ========================================================================== */
.item-carrito {
    display: flex; justify-content: space-between; align-items: center;
    background: #f8fafc; padding: 12px 15px; margin-top: 10px;
    border-radius: 10px; border: 1px solid var(--border-light); font-size: 14px;
}

.btn-quitar, .btn-quitar-nuevo {
    color: var(--danger-red); background: #fee2e2; border: none;
    font-weight: bold; cursor: pointer; padding: 6px 10px; border-radius: 6px; transition: all 0.2s;
}
.btn-quitar:hover, .btn-quitar-nuevo:hover { background: var(--danger-red); color: #fff; }

.loading-spinner {
    text-align: center; color: var(--accent-blue); padding: 40px;
    font-weight: 600; font-size: 15px; grid-column: 1 / -1; letter-spacing: 1px;
}

/* ==========================================================================
   11. FIX SELECTORES NATIVOS (ESTADOS)
   ========================================================================== */
.comprasgt-panel select option {
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    font-size: 14px;
}

/* ==========================================================================
   12. FIX ESTRUCTURA Y ACCIONES MASIVAS
   ========================================================================== */
#lista-pedidos-ajax { display: block !important; width: 100% !important; }

.bulk-actions-bar {
    width: 100% !important; box-sizing: border-box !important; display: flex !important;
    background: #ffffff; padding: 20px 25px; border-radius: 16px;
    border: 1px solid var(--border-light); margin-bottom: 25px;
    box-shadow: var(--shadow-soft); justify-content: space-between; align-items: center;
}

.sedes-grid-container {
    width: 100% !important; display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    align-items: start !important; gap: 25px;
}

/* ==========================================================================
   13. RESPONSIVE MÓVIL Y FIX DE ESTRUCTURA INTERNA
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Forzar a que TODO el panel se adapte */
    .comprasgt-panel .fa-app-top-bar { flex-direction: column; align-items: flex-start; gap: 15px; }
    .btn-primary-modern { width: 100%; justify-content: center; }
    .bulk-actions-bar { flex-direction: column; gap: 15px; align-items: flex-start !important; }
    
    /* 2. Ajuste del Modal Principal */
    .fa-modal-custom .modal-content { 
        width: 95% !important; 
        padding: 20px 15px !important; /* Relleno reducido en móviles */
        max-height: 85vh !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* 3. FIX CRÍTICO: Romper el Grid de 2 columnas a 1 sola columna */
    .comprasgt-form-grid, 
    .form-row { 
        display: flex !important; /* Cambiamos grid por flex para mayor control */
        flex-direction: column !important; /* Todo en una lista vertical */
        width: 100% !important; 
        gap: 15px !important; 
        margin-top: 15px !important;
    }

    /* 4. Forzar anchos en elementos internos */
    .comprasgt-form-grid > div, /* Afecta a las divisiones grandes (Cliente / Productos) */
    .modern-input, 
    textarea, 
    select, 
    .select2-container, 
    .select2-selection {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 5. Asegurar que la X de cerrar esté en una posición tocable */
    .close-modal {
        top: 10px !important;
        right: 10px !important;
        width: 35px !important;
        height: 35px !important;
    }
}


/* ==========================================================================
   14. CORRECCIÓN FIX: LISTA DE PRODUCTOS Y CARRITO TEMPORAL (BOTÓN X)
   ========================================================================== */

/* 1. Forzar el texto oscuro y quitar los bordes oscuros viejos */
#carrito-temporal div, 
#edit-carrito-temporal div,
.item-carrito {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-light) !important;
    align-items: center !important;
}

#carrito-temporal span, 
#edit-carrito-temporal span {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

/* 2. Reducir y estilizar la caja de cantidad */
#carrito-temporal input[type="number"], 
#edit-carrito-temporal input[type="number"],
.item-carrito input[type="number"] {
    width: 65px !important;
    height: 36px !important;
    padding: 5px !important;
    text-align: center !important;
    border-radius: 8px !important;
    margin-right: 12px !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
}

/* 3. Limpiar la "X" (BOTÓN CENTRADO PERFECTO) */
button.btn-quitar, 
button.btn-quitar-nuevo,
button.btn-quitar-item-existente {
    all: unset !important; 
    background: transparent !important;
    color: #ef4444 !important; /* Rojo forzado */
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important; /* Evita que se encoja */
    min-height: 32px !important;
    display: flex !important; /* Flexbox puro para centrar */
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    margin-left: 10px !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    line-height: 0 !important; /* Elimina el desfase oculto del texto */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

button.btn-quitar:hover, 
button.btn-quitar-nuevo:hover,
button.btn-quitar-item-existente:hover {
    background: #fee2e2 !important; /* Cuadro rojizo centrado */
}

/* Eliminar el anillo de enfoque azul de los navegadores */
button.btn-quitar:focus, 
button.btn-quitar-nuevo:focus,
button.btn-quitar-item-existente:focus {
    outline: none !important;
}

/* ==========================================================================
   15. FIX DEFINITIVO: DESBORDE HORIZONTAL EN MÓVILES (BOX-SIZING)
   ========================================================================== */
.fa-modal-custom .modal-content {
    /* Obliga al navegador a meter el padding DENTRO del ancho definido */
    box-sizing: border-box !important; 
    margin: 0 auto !important; /* Asegura un centrado perfecto */
}

@media (max-width: 768px) {
    .fa-modal-custom .modal-content {
        width: 92% !important;      /* Un poco más estrecho para dejar margen */
        padding: 20px !important;   /* Relleno reducido para móviles */
        max-height: 85vh !important; /* Evita que choque con los bordes superior/inferior */
    }
    
    /* Aseguramos que ningún input rebelde rompa el ancho máximo */
    .modern-input, 
    textarea, 
    select, 
    .comprasgt-form-grid, 
    .form-row {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Ajustar el botón de cerrar (X) para que no se salga en pantallas muy pequeñas */
    .close-modal {
        top: 10px !important;
        right: 10px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 20px !important;
    }
}


/* ==========================================================================
   16. FIX DEFINITIVO: DESBORDE DE CONTENIDO INTERNO EN MÓVILES
   ========================================================================== */

/* 1. Obligar a que TODOS los elementos internos respeten la caja */
.fa-modal-custom * {
    box-sizing: border-box !important;
    max-width: 100% !important; 
}

/* 2. El buscador Select2 es famoso por romper el ancho en móviles, esto lo controla */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
}
.select2-selection {
    width: 100% !important;
    max-width: 100% !important;
}

/* 3. Asegurar que las columnas y filas internas no se estiren */
.form-row, 
.comprasgt-form-grid {
    width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

/* 4. Evitar que el cuadro de notas se pueda estirar hacia los lados */
textarea.modern-input {
    resize: vertical !important; /* Solo permite estirar hacia abajo */
    width: 100% !important;
}


/* Botón de WhatsApp en Carrito */
.checkout-button.button.alt {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    text-transform: uppercase;
    transition: transform 0.2s ease;
}

.checkout-button.button.alt:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Estilo para el botón de "Iniciar Sesión" preventivo */
a[style*="background:#f59e0b"] {
    border-bottom: 4px solid #d97706 !important;
}

/* Icono de WhatsApp en el botón */
.checkout-button .dashicons-whatsapp {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Ajuste del campo WhatsApp en el registro */
.woocommerce-form-row input[name="billing_phone"] {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-weight: 600;
}

/* Ocultar elementos innecesarios del carrito para que parezca una cotización limpia */
.cart-collaterals .cart_totals h2, 
.cart-collaterals .shipping, 
.cart-collaterals .order-total th {
    display: none !important;
}

.cart-collaterals .shop_table {
    border: none !important;
}

/* Hacer que el botón de WhatsApp se vea enorme y centrado */
.checkout-button.button.alt {
    width: 100% !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    box-shadow: 0 10px 20px -5px rgba(22, 163, 74, 0.3) !important;
}

/* Ajuste de columnas en el registro de WooCommerce */
.woocommerce-form-row--first {
    width: 48% !important;
    float: left !important;
    margin-right: 4% !important;
}

.woocommerce-form-row--last {
    width: 48% !important;
    float: left !important;
}

.woocommerce-form-row--wide {
    clear: both !important;
    width: 100% !important;
}

/* Limpieza de floats para que el formulario no se rompa */
.woocommerce-form-register::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   DISEÑO FINAL CONSOLIDADO Y LIMPIO - COMPRASGT
   ========================================================================== */

/* 1. CONTENEDOR RAÍZ */
.cgt-orden-maestra {
    background: #ffffff !important;
    padding: 40px !important;
    max-width: 950px !important;
    margin: 30px auto !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* 2. HEADER (Logo y Fecha a la derecha) */
.cgt-header.cgt-flex-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #2563eb !important;
    padding-bottom: 15px !important;
    margin-bottom: 25px !important;
}

.cgt-logo { 
    max-height: 60px !important; 
    width: auto !important;
}

.cgt-pedido-id { 
    font-size: 26px !important; 
    font-weight: 900 !important; 
    margin: 0 !important; 
    color: #1e293b !important; 
    letter-spacing: -1px;
}

.cgt-col-header-fecha { 
    text-align: right !important; 
}

.cgt-fecha-linea { 
    margin: 0 !important; 
    font-size: 13px !important;
    color: #64748b !important; /* Gris suave para el label */
}

.cgt-fecha-linea strong {
    color: #1e293b !important; /* Negro para el dato */
}

/* 3. TÍTULOS DE SECCIÓN (Fake H3) */
.cgt-fake-h3 {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #2563eb !important; /* Azul ComprasGT */
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin: 0 0 10px 0 !important;
    display: block !important;
}

/* 4. SECCIONES DE INFORMACIÓN */
.cgt-cliente-seccion {
    text-align: left !important;
    margin-bottom: 30px !important;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.cgt-cliente-datos p {
    margin: 0 !important; 
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #475569 !important;
}

.cgt-cliente-datos p strong {
    color: #0f172a !important; /* Datos en negro fuerte */
    margin-right: 4px;
}

/* 5. GRILLAS DE DATOS (Pago y Entrega) */
.cgt-pago-grid, .cgt-entrega-grid-simple {
    display: grid !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden;
    margin-bottom: 25px;
    background: #ffffff;
}

.cgt-pago-grid { grid-template-columns: repeat(2, 1fr) !important; }

.pago-item, .entrega-col {
    padding: 12px 15px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.item-estado, .item-doc { border-right: 1px solid #e2e8f0 !important; }
.item-doc, .item-total { border-bottom: none !important; }

.cgt-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    display: block !important;
    margin-bottom: 2px !important;
}

/* Colores de estado */
.pagado { color: #10b981 !important; }
.pendiente { color: #f59e0b !important; }

/* 6. TABLA DE PRODUCTOS (Anchos Fijos) */
.cgt-tabla-container { overflow-x: auto; margin-bottom: 30px !important; }
.cgt-tabla { 
    width: 100% !important; 
    border-collapse: collapse !important; 
    table-layout: fixed !important; /* Fuerza a respetar los anchos */
}

.cgt-tabla th { 
    background: #f8fafc !important; 
    color: #64748b !important; 
    padding: 12px !important; 
    font-size: 11px !important;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0 !important;
    text-align: left;
}

.cgt-tabla td { 
    padding: 12px !important; 
    border-bottom: 1px solid #f1f5f9 !important; 
    vertical-align: middle !important;
}

/* Definición de columnas */
.cgt-col-cant { width: 50px !important; text-align: center !important; }
.cgt-col-foto { width: 70px !important; text-align: center !important; }
.cgt-col-desc { width: auto !important; }
.text-right { text-align: right !important; width: 100px !important; }

/* Miniaturas Blindadas */
.cgt-mini-foto {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    background: #fff;
}

.cgt-mini-foto img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: contain !important; 
}

/* 7. SECCIÓN ENTREGA DESTACADA */
.cgt-entrega-grid-simple {
    background: #f0f7ff !important; /* Azul muy pálido */
    border-color: #dbeafe !important;
    display: flex !important;
    padding: 15px !important;
    gap: 15px !important;
}

.dashicons-location { color: #2563eb !important; font-size: 20px !important; }

/* 8. RESPONSIVE */
@media (max-width: 768px) {
    .cgt-orden-maestra { padding: 20px !important; }
    .cgt-header.cgt-flex-header { flex-direction: column !important; align-items: flex-start !important; }
    .cgt-col-header-fecha { text-align: left !important; margin-top: 10px !important; }
    .cgt-pago-grid { grid-template-columns: 1fr !important; }
    .item-estado, .item-doc { border-right: none !important; }
}

/* 9. LIMPIEZA */
.woocommerce-order-details__title, 
.woocommerce-customer-details, 
.mq-photos-grid, 
.cgt-galeria-grid,
.woocommerce-order-details { 
    display: none !important; 
}

/* ==========================================================================
   NUEVA CAJA DE INFORMACIÓN INDEPENDIENTE (CGT)
   ========================================================================== */

.cgt-meta-box {
    background-color: #f8fafc !important; /* Gris suave */
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin: 20px 0 !important;
    display: block !important;
    clear: both !important;
}

.cgt-meta-item {
    display: flex !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
}

.cgt-meta-item:last-child {
    border-bottom: none !important;
}

/* Títulos en Azul */
.cgt-meta-label {
    color: #004ea8 !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    width: 100px !important; /* Alineación perfecta */
    flex-shrink: 0 !important;
}

/* Valores y Enlaces */
.cgt-meta-value, .cgt-meta-value a {
    color: #475569 !important; /* Gris oscuro para texto */
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.cgt-meta-value a {
    color: #2563eb !important; /* Azul eléctrico para links */
}

.cgt-meta-value a:hover {
    text-decoration: underline !important;
}


/* Ajuste para los logos de marca */
.cgt-logo-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.cgt-logo-wrap img {
    max-height: 35px !important; /* Controla el tamaño del logo */
    width: auto !important;
    filter: brightness(1.05); /* Un toque de brillo para que resalte */
    transition: transform 0.2s ease;
}

.cgt-logo-wrap img:hover {
    transform: scale(1.1); /* Efecto zoom sutil */
}


/* Estilo del botón de Administrador en el Menú */
.btn-admin-panel a {
    background-color: #ffeb3b !important; /* Amarillo para resaltar */
    color: #000 !important;
    font-weight: 800 !important;
    padding: 5px 15px !important;
    border-radius: 5px !important;
    margin-left: 10px !important;
    border: 1px solid #fbc02d !important;
    transition: all 0.3s ease !important;
}

.btn-admin-panel a:hover {
    background-color: #000 !important;
    color: #fff !important;
    transform: scale(1.05);
}


/* Estilo para la info de tracking */
.cgt-cliente-tracking, .cgt-admin-fields {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.cgt-cliente-tracking h4 {
    color: #0369a1;
    margin-bottom: 10px;
}

/* Miniatura en el Panel de Pedidos (Admin) */
.cgt-panel-guia-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

/* ==========================================================================
   FOTOS DE COMPROBANTES 
   ========================================================================== */
/* 1. Contenedores de vista previa (Unificado para ambos modales) */
.media-preview-box, .cgt-media-preview {
    position: relative !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 1;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    overflow: visible !important; /* CRÍTICO: Para que la X pueda sobresalir */
    width: 70px;
    height: 70px;
}

/* 2. La imagen dentro de cualquier contenedor */
.media-preview-box img, .cgt-media-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    border-radius: 10px;
}

/* 3. El botón de eliminar (La X roja universal) */
.btn-remove-media {
    /* Posicionamiento */
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    z-index: 9999 !important;
    
    /* Forma y Tamaño (Círculo Perfecto) */
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important; /* Evita que se deforme */
    max-width: 24px !important;
    border-radius: 50% !important;
    
    /* Colores y Limpieza de Estilos de WordPress */
    background: #ef4444 !important; /* Rojo puro */
    color: #ffffff !important;
    border: 2px solid #ffffff !important; /* Borde blanco para resaltar */
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    padding: 0 !important; /* Elimina el espacio gris que mencionas */
    margin: 0 !important;
    outline: none !important;
    
    /* Centrado del texto X */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-family: Arial, sans-serif !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    
    /* Eliminar efectos de hover del tema */
    transition: transform 0.2s ease !important;
    -webkit-appearance: none !important;
}

.btn-remove-media:hover {
    background: #b91c1c !important;
    transform: scale(1.1) !important;
    color: #ffffff !important;
}

.cgt-media-preview, .media-preview-box {
    overflow: visible !important;
    position: relative !important;
}

/* ==========================================================================
   NAVEGACIÓN DE CARPETAS (MÉTODO DE MARGEN NEGATIVO - BLINDADO)
   ========================================================================== */

/* 1. Contenedor de las pestañas */
.cgt-folder-tabs {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    padding-left: 20px !important;
    margin: 0 !important;
    border: none !important; /* Quitamos el borde general de las pestañas */
    position: relative !important;
    z-index: 2 !important;
}

/* 2. Pestañas individuales (Inactivas) */
.cgt-tab {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important; /* Gris un poco más claro para contraste */
    border: 1px solid #cbd5e1 !important;
    padding: 10px 25px !important;
    
    /* CRÍTICO: El -1px abajo obliga a la pestaña a "morder" el borde de la caja principal */
    margin: 0 5px -1px 0 !important; 
    
    border-radius: 12px 12px 0 0 !important;
    cursor: pointer;
    font-weight: 800 !important;
    font-size: 13px !important;
    color: #64748b !important;
    text-decoration: none !important;
    height: 40px !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s ease !important;
}

.cgt-tab:hover {
    background: #e2e8f0 !important;
}

/* 3. Pestaña Activa (La que abre la carpeta) */
.cgt-tab.active {
    background: #ffffff !important;
    color: #2563eb !important; 
    
    /* Pinta una línea blanca gruesa sobre el borde de la caja principal */
    border-bottom: 2px solid #ffffff !important; 
    
    height: 48px !important; /* Crece hacia arriba para resaltar */
    z-index: 10 !important; /* Se coloca por encima de todo */
    padding-top: 14px !important;
}

/* Color rojo para el botón de salir */
.cgt-tab.exit:hover {
    color: #ef4444 !important;
    background: #fee2e2 !important;
}

/* 4. Cuerpo de la carpeta (El contenido) */
.cgt-folder-body {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important; /* Ahora el cuerpo tiene los 4 bordes cerrados */
    border-radius: 0 12px 12px 12px !important;
    padding: 30px !important;
    position: relative !important;
    z-index: 5 !important;
    margin-top: 0 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
}


/* Impedir que el texto salte de línea en cualquier pantalla */
.cgt-tab span {
    white-space: nowrap !important;
}

/* Ajustes específicos para móviles */
@media (max-width: 600px) {
    .cgt-folder-tabs {
        padding-left: 10px !important;
    }

    .cgt-tab {
        padding: 8px 12px !important; /* Reducimos el espacio lateral */
        font-size: 11px !important;    /* Texto un poco más pequeño */
        margin-right: 3px !important;
    }

    .cgt-tab.active {
        height: 42px !important; /* Ajuste de altura proporcional */
    }
    
    .cgt-folder-body {
        padding: 15px !important; /* Menos margen interno en el contenido */
    }
}


/* ==========================================================================
   CONFIGURACIÓN GLOBAL Y MODERNIZACIÓN - COMPRASGT
   ========================================================================== */

/* Suavizar contenedores y galerías */
.flex-viewport, 
.woocommerce-product-gallery, 
div.dgwt-wcas-search-wrapp .dgwt-wcas-search-form,
.woocommerce .col2-set .col-1, 
.woocommerce .col2-set .col-2,
ul.shop-page>.product-category, 
ul.shop-page>.product-item {
    border: 1px solid #e2e8f0 !important;
    background-color: #fff;
    border-radius: 12px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

/* Título del Producto */
.entry-summary .product_title {
    font-size: 26px;
    color: #1e293b; /* Gris muy oscuro, más elegante */
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Contenedor principal de la columna de compra */
.single-product-wrapper {
    padding: 15px;
    background: #f8fafc;
    border-radius: 14px;
}

/* ==========================================================================
   PRECIOS Y ESTADOS DE STOCK
   ========================================================================== */

.price {
    font-weight: 800;
    color: #004ea8; /* Tu azul principal */
    font-size: 24px;
}

.price del {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.7em;
}

.available-on-backorder, .in-stock, .wishlist-in-stock {
    color: #10b981 !important; /* Verde esmeralda moderno */
    font-weight: bold;
}

.out-of-stock {
    color: #ef4444;
    font-weight: bold;
}

/* ==========================================================================
   NUEVA CAJA DE METADATOS (SKU, CATEGORÍAS, MARCAS, ENVÍO)
   ========================================================================== */

/* Ocultar lo que el tema intente mostrar por defecto */
.summary-content .product_meta, 
.entry-summary .product_meta,
.product_meta {
    display: none !important;
}

/* Nuestra caja personalizada unificada */
.cgt-custom-meta {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin: 20px 0 10px 0 !important;
    display: block !important;
}

.cgt-linea {
    display: flex !important;
    padding: 10px 0 !important;
    border-bottom: 1px dashed #e2e8f0 !important; /* Línea punteada sutil para dividir mejor */
    font-size: 13px !important;
    align-items: center !important;
}

.cgt-linea:last-child {
    border-bottom: none !important;
}

/* Títulos de la izquierda (SKU, ENVÍO CAPITAL, etc.) */
.cgt-linea strong {
    color: #64748b !important; /* Gris profesional unificado para todos los títulos */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    width: 115px !important; /* Aumentado para que "ENVÍO CAPITAL" quepa en una sola línea */
    flex-shrink: 0 !important;
}

/* Valores de la derecha (Textos y Enlaces normales) */
.cgt-linea span, .cgt-linea a {
    color: #334155 !important; /* Gris un poco más oscuro para buen contraste */
    font-weight: 600 !important;
    text-decoration: none !important;
}

.cgt-linea a {
    color: #2563eb !important; /* Enlaces en azul eléctrico */
    transition: color 0.2s ease;
}

.cgt-linea a:hover {
    color: #004ea8 !important; /* Azul más oscuro al pasar el mouse */
}

/* Asegurar que el logo no empuje el texto hacia abajo */
.cgt-logo-wrap {
    display: flex !important;
    align-items: center !important;
    height: 30px !important;
}

/* --- ESTILOS ESPECIALES DENTRO DE LA CAJA META --- */

/* Resaltado de VENDIDO */
.cgt-fila-vendido span {
    color: #004ea8 !important; /* Tu azul marca para destacar ventas */
    font-weight: 800 !important;
}

/* Resaltado de Envío Gratis */
.cgt-envio-gratis span {
    color: #10b981 !important; /* Verde esmeralda para resaltar lo positivo */
    font-weight: 800 !important;
    text-transform: uppercase;
}

/* ==========================================================================
   BOTÓN DE EDICIÓN PARA ADMINISTRADORES
   ========================================================================== */

.cgt-admin-edit-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #cbd5e1;
    text-align: center;
}

.cgt-btn-edit {
    display: inline-block !important;
    background-color: #1e293b !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: 1px solid #0f172a !important;
}

.cgt-btn-edit:hover {
    background-color: #004ea8 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   VISTAS, ENVÍO Y PAGO (BLOQUE INFERIOR CON ICONOS)
   ========================================================================== */

.delivery-info, .payment-info {
    display: flex !important;
    flex-direction: column !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin: 10px 0 !important;
    gap: 8px !important;
}

.delivery-info .item, .payment-info .item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.delivery-info .icon, .payment-info .icon {
    color: #004ea8 !important; /* Iconos en tu azul */
    font-size: 16px !important;
}

.delivery-info .post-views b {
    color: #004ea8 !important;
    font-weight: 800 !important;
}

.payment-info .item .text {
    font-weight: 700 !important;
    color: #1e293b !important;
}

/* ==========================================================================
   BOTONES Y FORMULARIOS
   ========================================================================== */

/* Checkout y Formularios */
.woocommerce .col2-set .col-1, .woocommerce .col2-set .col-2 {
    padding: 25px;
    margin-bottom: 20px;
}

input[type=checkbox], input[type=radio] {
    accent-color: #004ea8; /* Checkboxes en tu azul */
}

/* Facturación / Invoice */
.invoice_totals {
    font-weight: bold;
    font-size: 14px;
    color: #0f172a;
}

.summary-content>.stock, .entry-summary>.stock {
    display: none;
    font-size: 14px;
    line-height: 24px;
    margin: 15px 0 0;
}

@media (max-width: 767px) {
    .shop_table .actions .coupon {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .woocommerce-cart-form .shop_table .actions {
        display: none;
    }
}

@media (max-width: 767px) {
    .woocommerce-cart-form > .shop_table .actions {
        display: none;
    }
}

/* ==========================================================================
   BOTÓN DE WHATSAPP (VER STOCK) - CORRECCIÓN DE ICONO
   ========================================================================== */

/* 1. Estructura del botón */
.joinchat__woo-btn {
    background: #25d366 !important; /* Verde WhatsApp oficial */
    color: #ffffff !important; /* Asegura que el texto sea blanco */
    border-radius: 50px !important;
    font-weight: 700;
    transition: all 0.3s ease;
    
    /* CRÍTICO: Flexbox para alinear el icono y el texto */
    display: inline-flex !important; 
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important; /* Espacio exacto entre el icono y la palabra VER STOCK */
    padding: 10px 24px !important; /* Asegura un buen volumen para el botón */
}

/* 2. Efecto Hover */
.joinchat__woo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(37, 211, 102, 0.3);
    color: #ffffff !important;
}

/* 3. Forzar visibilidad y color del icono SVG de Joinchat */
.joinchat__woo-btn svg {
    display: block !important;
    width: 20px !important; /* Forzamos un tamaño visible */
    height: 20px !important;
    fill: #ffffff !important; /* Aseguramos que el icono sea blanco puro */
    flex-shrink: 0 !important; /* Evita que el texto aplaste el icono */
}

/* ==========================================================================
   DISEÑO PROPIO PARA "SIN PEDIDOS"
   ========================================================================== */

.cgt-pedidos-vacios {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centramos todo */
    justify-content: center;
    text-align: center;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1; /* Borde punteado estilo caja vacía */
    border-radius: 12px;
    padding: 40px 20px;
    margin-top: 20px;
}

.cgt-vacio-icono {
    font-size: 40px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.cgt-pedidos-vacios h4 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 5px 0;
    font-weight: 800;
}

.cgt-pedidos-vacios p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 25px;
}

.cgt-btn-tienda {
    background-color: #2563eb !important; /* Tu azul */
    color: #ffffff !important;
    padding: 12px 30px !important;
    border-radius: 50px !important; /* Botón redondeado moderno */
    font-weight: 800 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2) !important;
}

.cgt-btn-tienda:hover {
    background-color: #1e3a8a !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

/* Estilizar los Checkboxes para que parezcan de App */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

/* Efecto cuando se pasa el mouse */
input[type="checkbox"]:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

/* Estilo cuando están marcados (General) */
input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* El símbolo de la "V" blanca dentro del check */
input[type="checkbox"]:checked::after {
    content: '\f147'; /* Icono de Dashicons */
    font-family: dashicons;
    font-size: 20px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Color específico para el Check de PAGO (Verde) */
#nuevo-esta-pagado:checked, 
#edit_esta_pagado:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}

/* Color específico para el Check de ENTREGADO (Morado) */
#nuevo_esta_entregado:checked, 
#edit_esta_entregado:checked {
    background-color: #7e22ce !important;
    border-color: #7e22ce !important;
}

/* Estilo para los checks de la lista masiva (Azul) */
.order-checkbox:checked {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* Botones del Menú Primary */
.cgt-menu-btn a {
    font-weight: 800 !important;
    padding: 8px 15px !important;
    border-radius: 8px !important;
    transition: all 0.3s !important;
}

.login-btn a { color: #2563eb !important; }
.register-btn a { background: #2563eb !important; color: #fff !important; margin-left: 10px !important; }
.logout-btn a { color: #ef4444 !important; }

/* El botón que ya tenías de Admin */
.btn-admin-panel a {
    background: #ef0000 !important;
    color: #fff !important;
    font-weight: 900 !important;
    border-radius: 8px;
}

/* Ocultar el Menú Principal y el disparador móvil en ComprasGT */
@media (max-width: 991px) {
    .menu-toggle, 
    .mobile-navigation, 
    .main-navigation, 
    .header-menu-mobile,
    #primary-menu { 
        display: none !important; 
    }
}

/* 1. ELIMINAR BOTONES INFERIORES DE KUTESHOP (Home, Account, Top) */
.footer-device-mobile, 
.kuteshop-mobile-footer, 
.mobile-navigation,
.backtotop {
    display: none !important;
    visibility: hidden !important;
}

/* 2. DISEÑO DE BARRA APP SUPERIOR (BAJO EL LOGO) */
.cgt-app-bar {
    display: flex;
    width: 100% !important;
    background: #ffffff;
    border-bottom: 2px solid #2563eb;
    padding: 10px 0;
    justify-content: space-around;
    clear: both; /* Evita que se mezcle con elementos flotantes arriba */
}

.cgt-app-link {
    flex: 1; /* Esto hace que se estiren proporcionalmente */
    text-align: center;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-decoration: none !important;
}

.cgt-app-link i {
    font-size: 18px;
    margin-bottom: 3px;
}

.cgt-app-link span {
    font-size: 10px;
    font-weight: 800;
}

.cgt-app-link.active, .cgt-app-link:hover {
    color: #2563eb;
    background: #f1f5f9;
}

/* 3. QUITAR PESTAÑAS VIEJAS SI QUEDARON */
.cgt-folder-tabs {
    display: none !important;
}

.block-userlink>a {
    display: none;
}

.header-mobile .fixed {
    display: none !important;
}

/* 1. OCULTAR EN ESCRITORIO (WEB) */
@media (min-width: 992px) {
    .cgt-app-mobile-tabs, .cgt-app-bar {
        display: none !important;
    }
}

/* 2. MOSTRAR SOLO EN MÓVILES (Tu código original con ajustes de posición) */
@media (max-width: 991px) {
    .cgt-app-mobile-tabs {
        display: flex;
        position: fixed; /* Esto evita que flote y la deja fija abajo */
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 99999;
        border-top: 1px solid #eee;
        padding: 5px 0;
    }

    .cgt-app-tab {
        flex: 1;
        text-align: center;
        text-decoration: none !important;
        color: #64748b;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .cgt-app-tab i {
        font-size: 18px;
    }

    .cgt-app-tab span {
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .cgt-app-tab:active, .cgt-app-tab.active {
        color: #2563eb;
    }

    .cgt-app-tab.exit {
        color: #ef4444;
    }
}

/* Ocultar el mensaje de estado y fecha en el detalle del pedido */
.woocommerce-view-order mark.order-number,
.woocommerce-view-order mark.order-date,
.woocommerce-view-order mark.order-status {
    display: none !important;
}

/* Ocultar el párrafo completo que contiene la frase */
.woocommerce-view-order p:has(.order-number) {
    display: none !important;
}

/* Si tu tema no soporta :has, usamos esta alternativa para el párrafo */
.woocommerce-AccountContent > p:first-of-type {
    display: none !important;
}

/* --- CORRECCIÓN BOTÓN EXPLORAR PRODUCTOS Y MENSAJE VACÍO --- */

/* Centrar el mensaje "Aún no se han realizado pedidos" */
.cgt-account-wrapper .woocommerce-info {
    border-top: 3px solid #38bdf8 !important; /* Color celeste de tu marca */
    background-color: #f8fafc !important;
    color: #475569 !important;
    padding: 20px !important;
    border-radius: 10px;
    margin-bottom: 20px !important;
    list-style: none !important;
    text-align: center;
}

/* Quitar el icono lateral que a veces descuadra el texto */
.cgt-account-wrapper .woocommerce-info::before {
    display: none !important;
}

/* Estilizar y centrar el botón EXPLORAR LOS PRODUCTOS */
.cgt-account-wrapper .woocommerce-Button.button {
    display: block !important;
    width: fit-content;
    margin: 0 auto !important; /* Esto lo centra horizontalmente */
    background-color: #2563eb !important; /* Azul de ComprasGT */
    color: #ffffff !important;
    padding: 12px 30px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none !important;
    text-decoration: none !important;
}

.cgt-account-wrapper .woocommerce-Button.button:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* FORZAR VISIBILIDAD DE HEADER ESCRITORIO */
@media (min-width: 992px) {
    /* Escondemos el header móvil que se quedó "pegado" */
    .header-mobile, 
    .mobile-navigation, 
    .ovic-menu-mobile,
    .cgt-app-bar { 
        display: none !important; 
    }

    /* Forzamos que el header de escritorio aparezca */
    .header.display-desktop, 
    .header-desktop,
    .main-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Corregimos el ancho de la página que se ve estrecho */
    .container {
        max-width: 1200px !important;
        width: 100% !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }
}

/* AHORA ANULADO PARA SER APLICADO EN LÍNEA:
.contenedor-botones-orden {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important; 
    width: 100% !important;
    margin-top: 5px !important;
}

.btn-ver-factura, 
.btn-ver-detalle {
    flex: 1 !important; 
    height: 42px !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    margin: 0 !important;
}

.btn-ver-factura {
    background-color: var(--accent-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
}

.btn-ver-detalle {
    background-color: #f1f5f9 !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-light) !important;
}
*/

/* HOVERS DE BOTONES PRINCIPALES CONSERVADOS */
.btn-ver-factura:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

.btn-ver-detalle:hover {
    background-color: #ffffff !important;
    border-color: var(--accent-blue) !important;
    color: var(--accent-blue) !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   MODAL: UNIFICACIÓN DE SCROLL PARA FACTURA Y EDITOR
   ========================================================================== */

/* Forzar que el contenedor del modal sea siempre desplazable */
#modal-detalle-pedido {
    display: none; /* Se activa con el JS */
    overflow-y: scroll !important; /* Forza la aparición de la barra si el contenido desborda */
    -webkit-overflow-scrolling: touch; /* Suavidad en móviles */
}

#contenido-detalle-pedido {
    width: 100%;
    height: auto !important;
    display: block !important;
    padding-bottom: 50px; /* Espacio extra al final para que no se corte el total */
}

/* ==========================================================================
   ASISTENTE WHATSAPP BOT
   ========================================================================== */
#btn-enviar-info-wp:hover {
    background: #1da851 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 211, 102, 0.2);
}

.item-producto-bot {
    transition: all 0.2s ease;
}

.item-producto-bot:hover {
    border-color: var(--accent-celeste) !important;
    box-shadow: var(--shadow-soft);
}

/* Efecto para el checkbox de selección */
.incluir-producto-wp {
    accent-color: var(--accent-blue);
    transform: scale(1.2);
}

/* Resultados de Búsqueda Flotantes Bot */
.item-resultado-busqueda:hover {
    background-color: var(--panel-bg) !important;
}

.item-producto-bot {
    transition: all 0.2s ease;
}

.item-producto-bot:hover {
    border-color: var(--accent-celeste) !important;
    box-shadow: var(--shadow-soft);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FIX DE ESPACIADOS PARA MÓVILES (APROVECHAMIENTO DE PANTALLA)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Reducir el margen brutal del contenedor principal */
    .comprasgt-panel .administrator-tab-content { 
        padding: 10px !important; 
    }

    /* 2. Reducir el espacio entre las tarjetas y forzar que ocupen todo el ancho */
    .sedes-grid-container {
        gap: 15px !important; 
        grid-template-columns: 1fr !important; /* Fuerza a 1 sola columna ocupando el 100% */
    }

    /* 3. Anular el padding de 25px en línea de la tarjeta para ganar espacio interno */
    .order-card {
        padding: 15px !important; 
        border-radius: 16px !important; /* Un borde un poco más sutil en móviles */
    }

    /* 4. Ajustar la caja interior gris para que no se vea tan apretada */
    .order-extra-info {
        padding: 12px 10px !important;
        margin: 10px 0 !important;
    }
}


/* ==========================================================================
   OPTIMIZACIÓN DE VISTA DE PRODUCTO (KUTESHOP CUSTOM)
   ========================================================================== */

/* --- TÍTULO DESCRIPCIÓN DESTACADA: VERSIÓN MODERNA --- */
.titulo-personalizado {
    font-size: 15px !important; /* Tamaño reducido para asegurar una sola línea */
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1.2px; /* Look técnico y pro */
    color: #004b91;
    margin: 0 0 20px 0 !important;
    padding-bottom: 8px;
    border-bottom: 2px solid #004b91; /* Línea más fina y elegante */
    display: inline-table; 
    line-height: 1.2;
}

/* --- CONTENEDOR REFINADO (BAJO IMAGEN) --- */
.caja-descripcion-destacada {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* Bordes más suaves */
    padding: 25px 30px;
    margin-top: 30px;
    /* Sombra moderna: difuminada y elegante */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); 
    position: relative;
    overflow: hidden;
}

/* Detalle de línea vertical al inicio del párrafo */
.caja-descripcion-destacada .woocommerce-product-details__short-description {
    border-left: 3px solid #f2f2f2; 
    padding-left: 15px;
    margin-left: 2px;
}

.caja-descripcion-destacada .woocommerce-product-details__short-description p {
    font-size: 14.5px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 0;
}

/* ==========================================================================
   --- FOLDER DE ESPECIFICACIONES (PREMIUM) --- 
   ========================================================================== */

.custom-folder-wrapper {
    margin-top: 60px;
    clear: both;
}

/* La pestaña del folder con sombra y línea fuerte */
.folder-tab {
    background: #ffffff;
    border: 1.5px solid #d1d1d1; /* Borde definido */
    border-bottom: none;
    display: inline-block;
    padding: 16px 50px;
    font-weight: 800;
    color: #004b91;
    font-size: 19px; /* Ajuste ligero de tamaño */
    border-radius: 12px 60px 0 0; /* Curva de folder dramática */
    position: relative;
    z-index: 10;
    bottom: -1.5px; /* Cubre el borde del cuerpo inferior */
    box-shadow: 0 -5px 10px rgba(0,0,0,0.05);
}

/* Línea azul de acento superior */
.folder-tab::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 65px;
    height: 6px;
    background: #004b91;
    border-radius: 10px 0 0 0;
}

/* El cuerpo del folder con profundidad real */
.folder-content {
    background: #ffffff;
    border: 1.5px solid #d1d1d1;
    border-radius: 0 15px 15px 15px;
    padding: 45px;
    position: relative;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 5px rgba(0,0,0,0.05); 
}

/* --- ESTILO DE TABLA PROFESIONAL --- */
.folder-content table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.folder-content table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 15px;
}

/* Efecto cebra */
.folder-content table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Columna de etiquetas */
.folder-content table td:first-child {
    font-weight: 700;
    color: #555;
    background-color: #fcfcfc;
    width: 30%;
}

.folder-content table tr:last-child td {
    border-bottom: none;
}

/* --- AJUSTES RESPONSIVE --- */
@media (max-width: 768px) {
    .folder-tab {
        padding: 12px 30px;
        font-size: 17px;
        border-radius: 10px 30px 0 0;
    }
    .folder-content {
        padding: 25px;
    }
    .titulo-personalizado {
        font-size: 14px !important;
    }
}


/* =============================================================
   NUEVO WIDGET DE CATEGORÍAS PREMIUM (INMUNE AL TEMA)
   ============================================================= */

/* Contenedor principal */
.caja-categorias-premium {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
}

/* Título del widget */
.titulo-cat-premium {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #004b91;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    display: inline-block;
}

/* --- MAGIA DEL SCROLL: Límite de altura --- */
.contenedor-scroll-categorias {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Estilo de la barra de scroll (Webkit) */
.contenedor-scroll-categorias::-webkit-scrollbar {
    width: 6px;
}
.contenedor-scroll-categorias::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
.contenedor-scroll-categorias::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}
.contenedor-scroll-categorias::-webkit-scrollbar-thumb:hover {
    background: #004b91; 
}

/* Lista principal */
ul.lista-cat-premium {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Cada ítem de la lista (Forzado a bloque vertical) */
ul.lista-cat-premium li.item-limpio {
    border-bottom: 1px solid #f2f2f2 !important;
    padding: 0 !important;
    display: block !important; 
    width: 100% !important;
    clear: both !important;
}

ul.lista-cat-premium li.item-limpio:last-child {
    border-bottom: none !important;
}

/* Fila para enlace y contador (Mantiene el flex solo aquí adentro) */
.fila-principal-cat {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px !important;
    width: 100%;
}

/* El enlace de texto */
ul.lista-cat-premium li.item-limpio a {
    color: #444 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

ul.lista-cat-premium li.item-limpio a:hover {
    color: #004b91 !important;
    padding-left: 5px;
}

/* El número de productos */
.contador-limpio {
    background: #f0f4f8;
    color: #004b91;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

/* --- Subcategorías (Debajo de la principal) --- */
ul.lista-cat-premium ul.sub-limpio {
    display: block !important;
    list-style: none !important;
    padding-left: 20px !important; 
    margin: 0 0 10px 0 !important;
    background: #fcfcfc !important;
    border-left: 2px solid #004b91 !important;
    width: 100%;
}

ul.lista-cat-premium ul.sub-limpio li.item-limpio {
    border-bottom: none !important;
    padding: 5px 0 !important;
}

ul.lista-cat-premium ul.sub-limpio li.item-limpio a {
    font-size: 13px !important;
    color: #666 !important;
    font-weight: 400 !important;
}

/* =============================================================
   WIDGET PRODUCTOS SIDEBAR (DEBAJO DE CATEGORÍAS)
   ============================================================= */

.lista-productos-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item-producto-sidebar {
    display: flex;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f2f2f2;
    align-items: center;
}

.item-producto-sidebar:last-child {
    border-bottom: none;
}

.img-sidebar {
    width: 100px !important;
    height: 100px !important;
    object-fit: contain;
    border-radius: 5px;
    border: 1px solid #eee;
}

.info-sidebar {
    flex: 1;
}

.nom-sidebar {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.2;
    margin-bottom: 5px;
}

.precio-sidebar {
    font-size: 14px;
    font-weight: 700;
    color: #004b91;
    margin-bottom: 8px;
}

.btn-wa-sidebar {
    display: inline-block;
    background: #03b847;
    color: #fff !important;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none !important;
    text-transform: uppercase;
}

.btn-wa-sidebar:hover {
    background: #029a3b;
}

.sidebar-inner > .widget:not(:first-child) {
    border-top: 1px solid #eee;
    padding-top: 0px;
    margin-top: 0px;
}

.custom-folder-wrapper {
    margin-top: 0px;
    clear: both;
}


/* =============================================================
   REDISEÑO INTEGRAL: PRECIOS Y BOTONES (ANTI-COLAPSO)
   ============================================================= */
/* =============================================================
   NUEVO SISTEMA DE PRECIOS COMPRASGT - SIN DEFORMACIÓN
   ============================================================= */

.contenedor-precio-cgt {
    display: block !important;
    margin-bottom: 25px !important;
    padding: 10px 0 !important;
    margin-top: 15px;
}

/* Fila de Oferta (Azul y Grande) */
.cgt-fila-oferta {
    display: block !important;
    line-height: 1 !important;
    margin-bottom: 8px !important;
}

.cgt-label-oferta {
    display: block !important;
    font-size: 13px !important;
    color: #444 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    margin-bottom: 5px !important;
}

.cgt-monto-oferta {
    display: block !important;
    color: #004b91 !important; /* Tu azul de marca */
    font-size: 32px !important;
    font-weight: 900 !important;
    white-space: nowrap !important; /* Evita que la Q se separe */
}

/* Fila de Precio Normal (Gris y Tachado) */
.cgt-fila-normal {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.cgt-label-normal {
    font-size: 13px !important;
    color: #888 !important;
}

.cgt-monto-normal {
    font-size: 15px !important;
    color: #cc0000 !important; /* Rojo para el tachado */
    text-decoration: line-through !important;
    font-weight: 600 !important;
}

/* Asegurar que los botones no se peguen */
form.cart {
    margin-top: 15px !important;
}


/* =============================================================
   ELIMINAR PRECIO DUPLICADO (PREDETERMINADO DEL TEMA)
   ============================================================= */

/* Ocultamos el contenedor de precio estándar de WooCommerce 
   pero respetamos nuestro nuevo contenedor personalizado */

.single-product div.product p.price:not(.contenedor-precio-cgt),
.single-product div.product .price:not(.contenedor-precio-cgt) {
    display: none !important;
}

/* Si el tema usa una clase específica para el precio que no sea la estándar */
.product-info-main .price-box, 
.entry-summary .price {
    display: none !important;
}

/* Y nos aseguramos que NUESTRO contenedor SÍ se vea */
.contenedor-precio-cgt, 
.contenedor-precio-cgt * {
    display: block !important;
}

.cgt-fila-normal {
    display: flex !important; /* El precio normal tachado sí debe ser flex */
}

/* =============================================================
    2. ALINEACIÓN DE BOTONES (CANTIDAD + AÑADIR) 
   ============================================================= */
form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    clear: both !important;
    margin-top: 20px !important;
}

/* Ajuste del selector de cantidad */
form.cart .quantity {
    display: inline-flex !important;
    margin: 0 !important;
    height: 48px !important; /* Altura fija para emparejar */
}

form.cart .quantity input.qty {
    height: 100% !important;
    border-radius: 4px !important;
}

/* Botón Añadir al pedido */
form.cart .single_add_to_cart_button {
    flex: 1 !important; /* Ocupa el resto de la fila */
    height: 48px !important;
    background-color: #0d2340 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 3. BOTÓN VER STOCK (SIEMPRE ABAJO) */
.single-product .cgt-wa-button { 
    display: flex !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 15px !important;
    background-color: #03b847 !important;
    color: #fff !important;
    height: 50px !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-weight: 800 !important;
}

/* ==========================================================================
   CORRECCIONES MÓVILES (KUTESHOP OVERRIDES) - COMPRASGT
   ========================================================================== */

@media (max-width: 991px) {
    
    /* 1. OCULTAR EL PRECIO DUPLICADO NATIVO DEL TEMA EN MÓVIL */
    /* Apuntamos al precio nativo de WooCommerce y evitamos ocultar tus clases personalizadas */
    .single-product div.product p.price:not(.cgt-monto-oferta):not(.cgt-monto-normal),
    .single-product div.product span.price:not(.cgt-monto-oferta):not(.cgt-monto-normal),
    .mobile-product-summary .price {
        display: none !important;
    }

    /* 2. RESTAURAR ESTILOS DEL BOTÓN "VER STOCK" EN MÓVIL */
    /* Aumentamos la especificidad e inyectamos !important para vencer al tema */
    .single-product .cgt-wa-button,
    body.single-product .mobile-product-summary .cgt-wa-button {
        display: flex !important;
        background-color: var(--accent-green, #25D366) !important; /* Ajusta al verde de WA o tu color base */
        color: #ffffff !important;
        padding: 12px 20px !important;
        border-radius: 8px !important;
        font-weight: bold !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        width: 100% !important;
        margin-top: 15px !important;
        box-sizing: border-box !important;
    }

    /* Opcional: Asegurar que el icono de WhatsApp dentro del botón mantenga su tamaño */
    .single-product .cgt-wa-button i,
    .single-product .cgt-wa-button svg {
        margin-right: 8px !important;
        font-size: 1.2em !important;
    }
}

/* =========================================================================
   BLINDAJE DEL BOTÓN DE STOCK/WHATSAPP PARA VISTA MÓVIL
   ========================================================================= */

/* Al apuntar directamente a 'a.cgt-wa-button' evitamos que la estructura padre importe */
a.cgt-wa-button,
div[class*="mobile"] a.cgt-wa-button,
form.cart a.cgt-wa-button {
    display: flex !important;
    background-color: #25D366 !important; /* El verde de WhatsApp */
    color: #ffffff !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    width: 100% !important;
    margin-top: 15px !important;
    box-sizing: border-box !important;
    border: none !important;
}

/* Evitar que el tema cambie el color del texto al pasar el dedo/mouse */
a.cgt-wa-button:hover,
a.cgt-wa-button:active,
a.cgt-wa-button:focus {
    color: #ffffff !important;
    background-color: #20b858 !important;
}