:root {
    --primary: #232f3e;
    --accent: #febd69;
    --bg: #f4f7f6;
    --text-main: #333;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg);
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-main);
    margin: 0;
    overflow: hidden; /* Evita doble scroll */
}

/* Layout Principal */
.pos-main-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header de Búsqueda */
.search-section {
    background: white;
    padding: 15px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-container { position: relative; }

#pos-search {
    height: 50px;
    border-radius: 10px;
    border: 2px solid #ddd;
    font-size: 16px;
    padding: 0 15px;
}

/* Resultados Dropdown */
.dropdown-results {
    background: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 3000;
    margin-top: 5px;
}

.resultado-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.resultado-item:hover { background: #f8f9fa; }

/* Carrito Scrollable */
.cart-section {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    padding-bottom: 90px;
    -webkit-overflow-scrolling: touch;
}

/* Tarjetas de Producto */
.product-card {
    background: white;
    border-radius: 15px;
    margin-bottom: 12px;
    padding: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}

.p-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    line-height: 1.3;
}

.btn-delete {
    border: none;
    background: transparent;
    color: #dc3545;
    font-size: 1.2rem;
    padding: 0 5px;
}

.card-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f8f9fa;
}

/* Botones de Cantidad */
.qty-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-group button {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: none;
    background: #f0f2f5;
    font-size: 1.2rem;
    font-weight: bold;
}

.qty-group span {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 25px;
    text-align: center;
}

.p-subtotal {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Footer Fijo */
.pos-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 90px;
    background: var(--primary);
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4000;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}

.total-label { font-size: 0.75rem; color: var(--accent); font-weight: bold; }
.total-amount { font-size: 1.6rem; font-weight: 800; }

.btn-cobrar {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1rem;
}

/* Espacio al final de la lista */
.spacer-bottom {
    height: 110px;
    width: 100%;
    display: block;
    clear: both;
}

/* Ajuste PC */
@media (min-width: 992px) {
    .pos-main-wrapper {
        padding: 0 15%;
    }
}
/* Estilos para el Modal de Cobro */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: none;
    padding: 20px;
}

.modal-body {
    padding: 25px;
}

/* Botones de Método de Pago */
.btn-outline-primary, .btn-outline-secondary {
    border-width: 2px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
}

/* Campo de Monto Pagado */
#monto-pagado {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #212529;
    height: 70px;
    font-size: 2.2rem !important;
    border-radius: 12px;
}

#monto-pagado:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Área de Cambio */
.cambio-container {
    background: #e9ecef;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.text-success-custom { color: #198754; }
.text-danger-custom { color: #dc3545; }

/* Botón Final */
.btn-confirmar-final {
    height: 60px;
    font-size: 1.2rem;
    letter-spacing: 1px;
    border-radius: 12px;
}
