/* CSS Personalizado para Disk Gelada PDV */
:root {
    --primary-color: #000000;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

/* Navbar Dark Theme */
.navbar-dark.bg-dark { background-color: #000 !important; }
.navbar-dark .navbar-brand, .navbar-dark .nav-link { color: #fff; }
.navbar-dark .nav-link:hover { color: #f8f9fa; }
.navbar-dark .dropdown-menu { background-color: #212529; border-color: #343a40; }
.navbar-dark .dropdown-item { color: #fff; }
.navbar-dark .dropdown-item:hover { background-color: #343a40; color: #fff; }

/* PDV Mobile Responsive */
@media (max-width: 768px) {
    /* Layout do PDV em mobile */
    .pdv-container {
        padding: 0.5rem;
    }
    
    .pdv-search-section {
        margin-bottom: 1rem;
    }
    
    .pdv-search-input {
        font-size: 16px; /* Evita zoom no iOS */
        padding: 0.75rem;
        border-radius: 0.5rem;
    }
    
    /* Botões de categoria em mobile */
    .category-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .category-buttons .btn {
        flex: 1;
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    /* Produtos em mobile */
    .product-card {
        margin-bottom: 0.75rem;
        border-radius: 0.75rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
        border-radius: 0.5rem;
    }
    
    .product-info h6 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .product-info small {
        font-size: 0.8rem;
    }
    
    /* Carrinho em mobile */
    .cart-section {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 2px solid var(--primary-color);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .cart-header {
        padding: 1rem;
        background: var(--primary-color);
        color: white;
        position: sticky;
        top: 0;
        z-index: 1001;
    }
    
    .cart-items {
        padding: 1rem;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .cart-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .cart-item:last-child {
        border-bottom: none;
    }
    
    .cart-item-info {
        flex: 1;
    }
    
    .cart-item-controls {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .cart-item-controls .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Botões de ação em mobile */
    .action-buttons {
        display: flex;
        gap: 0.5rem;
        padding: 1rem;
        background: #f8f9fa;
    }
    
    .action-buttons .btn {
        flex: 1;
        padding: 0.75rem;
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Modal de produto em mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 1rem;
    }
    
    .modal-header {
        border-radius: 1rem 1rem 0 0;
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        border-radius: 0 0 1rem 1rem;
    }
    
    /* Formulários em mobile */
    .form-control, .form-select {
        font-size: 16px; /* Evita zoom no iOS */
        padding: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    /* Cliente e entrega em mobile */
    .client-section, .delivery-section {
        margin-bottom: 1rem;
    }
    
    .client-info, .delivery-info {
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    
    /* Pagamento em mobile */
    .payment-section {
        margin-bottom: 1rem;
    }
    
    .payment-methods {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .payment-methods .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Totais em mobile */
    .totals-section {
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .total-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }
    
    .total-item:last-child {
        font-weight: bold;
        font-size: 1.1rem;
        border-top: 1px solid #ddd;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    
    /* Botões principais em mobile */
    .main-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .main-actions .btn {
        padding: 1rem;
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Ocultar elementos desnecessários em mobile */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Ajustar espaçamentos */
    .mb-mobile {
        margin-bottom: 1rem;
    }
    
    /* Scroll suave */
    .smooth-scroll {
        scroll-behavior: smooth;
    }
}

/* Estilos específicos para telas muito pequenas */
@media (max-width: 480px) {
    .category-buttons .btn {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .main-actions {
        grid-template-columns: 1fr;
    }
    
    .cart-item-controls .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* Estilos para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .cart-section {
        max-height: 80vh;
    }
    
    .cart-items {
        max-height: 60vh;
    }
}

/* Navbar moderna */
.navbar-modern {
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.15);
}
.navbar-modern .navbar-brand,
.navbar-modern .nav-link {
    color: #fff;
}
.navbar-modern .nav-link {
    opacity: 0.85;
    transition: color .2s ease, opacity .2s ease, transform .2s ease;
}
.navbar-modern .nav-link:hover {
    color: #fff;
    opacity: 1;
    transform: translateY(-1px);
}
.navbar-modern .nav-link.active {
    opacity: 1;
    font-weight: 600;
    position: relative;
}
.navbar-modern .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
}
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}
.navbar-brand img.brand-logo {
    height: 28px;
    width: auto;
    margin-right: .5rem;
    vertical-align: middle;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Botões */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Tabelas */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--secondary-color);
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Modais */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Formulários */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

/* Spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.375rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Estilos específicos do PDV */
.product-card {
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08);
}
.product-card .img-thumbnail,
.product-card .product-image {
    border-radius: 0.5rem;
}
#categoryButtons .btn,
.category-buttons .btn {
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#categoryButtons .btn:hover,
.category-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08);
}
.pdv-product-card {
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.pdv-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.cart-item {
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Estilos para impressão */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}

/* Stock Bar */
.stock-info .stock-bar {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f3f5;
    font-weight: 600;
    font-size: 0.9rem;
}