.estado {
    pointer-events: none;
}

body {
    background-repeat: space;
}

table#data_table tbody tr td {
    vertical-align: middle !important;
}

.tnr {
    display: inline !important;
}

#resumen {
    font-family: 'Calibri' !important;
    font-size: 15px !important;
    color: black !important;
    width: 600;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    border: none;
}

#resumen td {
    padding: 0;
}

.dt-button-collection.dtb-collection-closeable {
    width: 60% !important;
}

.dtsp-panes .dtsp-panesContainer {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    padding: 0px !important;
}

.dtsp-searchPane {
    margin-top: 0px !important;
}

#btnNew {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

#btnNewImport {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
}

/* ============================================ */
/* NUEVO: Grid visual de productos (POS)       */
/* ============================================ */

/* Gap utility (Bootstrap 4 no tiene gap-*) */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ============================================ */
/* Modal responsivo de productos (POS)          */
/* ============================================ */

#formModal .modal-xl {
    max-width: 1100px;
}

#formModal .modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

/* --- Categorías: horizontal en móvil, vertical en desktop --- */

.category-tabs-wrapper {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 8px;
}

#categoryTabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 2px;
    padding-bottom: 2px;
}

#categoryTabs .nav-link {
    border-radius: 0;
    color: #495057;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-bottom: none;
    transition: all 0.15s ease;
}

#categoryTabs .nav-link:hover {
    background-color: #e9ecef;
}

#categoryTabs .nav-link.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* En desktop las categorías van en columna a la izquierda */
@media (min-width: 768px) {
    #stepProductGrid {
        display: flex;
        gap: 0;
        max-height: 460px;
    }

    .category-tabs-wrapper {
        flex: 0 0 220px;
        border-bottom: none;
        border-right: 1px solid #dee2e6;
        margin-bottom: 0;
        padding-right: 4px;
        overflow-y: auto;
    }

    #categoryTabs {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: visible;
    }

    #categoryTabs .nav-link {
        border-left: 3px solid transparent;
        border-bottom: none;
        width: 100%;
    }

    #categoryTabs .nav-link:hover {
        border-left-color: #adb5bd;
    }

    #categoryTabs .nav-link.active {
        border-left-color: #0056b3;
    }

    .tab-content {
        flex: 1;
        overflow: hidden;
    }
}

/* Buscador de productos en el header del modal */
#formModal .modal-header {
    padding-bottom: 6px;
}

#productSearch {
    border-radius: 20px;
    padding-left: 14px;
    font-size: 13px;
    height: 32px;
}

#formModal .modal-header .close {
    position: absolute;
    top: 8px;
    right: 12px;
}

/* Grid de productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px;
    max-height: 420px;
    overflow-y: auto;
}

@media (min-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: 460px;
    }
}

/* Tarjeta de producto */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.product-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.product-card:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-card-img {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 8px;
}

.product-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card-body {
    padding: 8px 10px 10px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #28a745;
}

/* Selector táctil de cantidad */
.quantity-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: manipulation;
}

.qty-value {
    font-size: 28px;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
    color: #212529;
    user-select: none;
}

.qty-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.qty-preset {
    min-width: 48px;
    height: 44px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    touch-action: manipulation;
}

.qty-preset.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Paso de modificadores */
#stepModifiers {
    padding: 0 4px;
}

#modifierContent .form-group {
    margin-bottom: 14px !important;
}

#modifierContent select.form-control-sm {
    padding: 6px 10px !important;
    font-size: 14px;
    min-height: 38px;
}

#modifierContent label.form-label-sm {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #495057;
}

#modifierContent .select2bs4,
#modifierContent select {
    width: 100% !important;
}

#modifierContent .select2-container .select2-selection--single {
    height: 38px !important;
}

/* Preview del producto en modificadores */
#modifierContent .col-2 {
    text-align: center;
    margin-bottom: 8px;
}

#modifierContent .col-10 p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
}

#modCantidad, #modObservaciones {
    font-size: 14px;
}