/* POS Custom Styles */
.pos-section {
    padding-top: 10px !important;
}

.pos-card {
    margin-bottom: 0px !important;
    height: 100%;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.condensed-header {
    background: #ffffff;
    padding: 15px 20px !important;
    min-height: 50px !important;
    border-bottom: 1px solid #f0f0f0;
}

.condensed-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-list-container {
    height: 600px;
    overflow-y: auto;
    padding: 15px;
    background: transparent !important;
}

body.pos-page .card-body {
    background: transparent !important;
}

/* Custom Product Grid */
#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin: 0;
}

/* Premium Product Card */
/* Premium Product Card - Image Hero Design */
.product-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Full edge image */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(103, 119, 239, 0.2);
}

.product-card-img-container {
    height: 160px;
    /* Hero image height */
    width: 100%;
    overflow: hidden;
    background-color: #ffffff;
    position: relative;
    border-bottom: 1px solid #f8fafc;
}

.product-card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    /* Ensure the full product is visible */
    padding: 10px;
    transition: transform 0.4s ease;
}

.product-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #1e293b;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card-body {
    padding: 12px 8px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 5px;
    line-height: 1.25;
}

.product-card-title-minimal {
    font-size: 0.8rem;
    /* Smaller font as requested */
    font-weight: 600;
    color: #334155;
    margin: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #6777ef;
    /* Brand primary */
    display: none;
    /* Removed as requested */
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.product-card-price .currency {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Custom Search Bar */
.pos-search-bar {
    margin-bottom: 15px;
    position: relative;
    padding: 0 5px;
}

.pos-search-input {
    height: 50px;
    font-size: 1rem;
    border-radius: 25px;
    padding-left: 20px;
    padding-right: 45px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.pos-search-input:focus {
    border-color: #6777ef;
    box-shadow: 0 0 0 3px rgba(103, 119, 239, 0.2) !important;
}

.pos-search-bar::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 20px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 1;
}

/* Custom Numeric Keypad */
.keypad-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    /* Darker backdrop */
    z-index: 9999;
    display: none;
    align-items: flex-end;
    /* Show at bottom like mobile keyboard */
    justify-content: center;
    backdrop-filter: blur(2px);
}

.keypad-container {
    background: white;
    width: 100%;
    max-width: 420px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.keypad-display {
    width: 100%;
    height: 70px;
    font-size: 3rem;
    font-weight: 700;
    text-align: right;
    margin-bottom: 24px;
    border: none;
    border-bottom: 2px solid #6777ef;
    background: transparent;
    color: #1e293b;
    padding-right: 10px;
    font-family: monospace;
}

.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.keypad-btn {
    height: 64px;
    border-radius: 16px;
    border: none;
    background-color: #f1f5f9;
    font-size: 1.6rem;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 4px 0 #cbd5e1;
    transition: all 0.1s;
}

.keypad-btn:active {
    transform: translateY(4px);
    box-shadow: none;
    background-color: #e2e8f0;
}

.keypad-btn-action {
    background-color: #e2e8f0;
    color: #333;
}

.keypad-btn-close {
    background-color: #ef4444;
    color: white;
    box-shadow: 0 4px 0 #b91c1c;
}

.keypad-btn-enter {
    background-color: #6777ef;
    color: white;
    grid-column: span 3;
    box-shadow: 0 4px 0 #4f5ec9;
}

.keypad-btn-clear {
    background-color: #f59e0b;
    color: white;
    box-shadow: 0 4px 0 #d97706;
}

/* Touch Friendly Inputs */
.touch-input {
    background-color: #fff !important;
    cursor: pointer;
}

.pos-inputs-row {
    margin-bottom: 10px;
}

/* Premium Cart & Totals */
/* Premium Cart & Totals - Light Theme */
.pos-total-box {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 8px;
    color: #334155;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    font-size: 0.85rem;
    color: #64748b;
}

.pos-total-row span:last-child {
    color: #334155;
    font-weight: 600;
}

.pos-total-row span:last-child {
    color: #f8fafc;
    font-weight: 500;
}

.pos-total-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.pos-total-final span:last-child {
    color: #6777ef;
}

.pos-total-final span:first-child {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-pos-pay {
    height: 42px;
    padding: 0 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    background: #10b981;
    color: #fff;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-pos-pay:hover {
    background: #059669;
    transform: none;
}

.btn-pos-pay:active {
    transform: scale(0.98);
}

.btn-pos-clear {
    height: 42px;
    padding: 0 15px;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-pos-clear:hover {
    background: #fff;
    color: #ef4444;
    border-color: #fca5a5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-buttons-container {
    padding: 0 15px;
}

.input-invisible {
    border: none;
    background: transparent;
    font-weight: bold;
    color: inherit;
    width: 100px;
    text-align: right;
}

/* Fix for Impuesto grouping */
.input-group-text-checkbox {
    padding-right: 10px;
}

/* Adjust layout when sidebar is missing due to permissions */
/* Global Main Content Fix */
body .main-content {
    padding-left: 30px !important;
    width: 100% !important;
    padding-top: 80px;
    /* Ensure clearance for fixed header */
}

body.sidebar-hidden .main-footer {
    padding-left: 30px !important;
}


body .navbar {
    left: 0 !important;
}

/* Top Navigation Clean Layout (No Sidebar Mode) */
/* body.sidebar-hidden .navbar-bg {
    display: none !important;
} */

/* body.sidebar-hidden .main-navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding-top: 5px;
    padding-bottom: 5px;
} */

/* Touch Friendly Targets */
/* Global Nav Link Styles - WHITE TEXT */
body .navbar-nav .nav-link {
    padding-left: 15px !important;
    padding-right: 15px !important;
    font-size: 15px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

body .navbar-nav .nav-link span {
    color: #ffffff !important;
}

body .navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

body .navbar-nav .nav-link i {
    color: #ffffff !important;
    margin-right: 5px;
}

/* Mobile Responsive Navigation */
@media (max-width: 991px) {

    /* Hide text on mobile, show only icons */
    body .navbar-nav .nav-link .d-none.d-lg-inline-block {
        display: none !important;
    }

    /* Reduce padding on mobile */
    body .navbar-nav .nav-link {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Stack dropdowns properly on mobile */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        min-width: 200px;
    }

    /* Better spacing for mobile menu items */
    .navbar-nav {
        flex-wrap: wrap;
    }

    .navbar-nav .dropdown {
        flex: 0 0 auto;
    }
}

/* Extra small devices - show hamburger if needed */
@media (max-width: 575px) {
    body .navbar-nav .nav-link {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 14px !important;
    }

    /* Smaller icons on very small screens */
    body .navbar-nav .nav-link i {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Dropdown Menu Touch Optimizations */
/* Dropdown Menu Touch Optimizations */
/* Global Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px;
    min-width: 200px;
}

.dropdown-item {
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: #6777ef;
    transform: translateX(5px);
}

.dropdown-item .has-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Hover effect on desktop for all pages - DISABLED, using click instead */
/* @media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        animation: dropdown-show 0.2s;
    }
} */

@keyframes dropdown-show {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Navigation Menu Styling */
.navbar-nav .nav-item-hover {
    position: relative;
    margin: 0 12px;
    /* Increased from 4px for more horizontal spacing */
}

/* Also apply to regular dropdowns */
.navbar-nav .dropdown {
    margin: 0 12px;
    /* More horizontal spacing */
}

.navbar-nav .nav-item-hover>a {
    padding: 12px 18px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
    font-size: 15px !important;
}

.navbar-nav .nav-item-hover>a span {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Also apply to regular dropdown links */
.navbar-nav .dropdown>a {
    color: #ffffff !important;
}

.navbar-nav .dropdown>a span {
    color: #ffffff !important;
}

.navbar-nav .dropdown>a i {
    color: #ffffff !important;
}

.navbar-nav .nav-item-hover>a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.navbar-nav .nav-item-hover>a i {
    transition: transform 0.3s ease;
    color: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.navbar-nav .nav-item-hover>a:hover i {
    transform: scale(1.15);
}

/* Dropdown Menu Improvements */
.nav-item-hover .dropdown-menu {
    min-width: 240px;
    padding: 14px;
    margin-top: 8px !important;
    animation: dropdown-show 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.nav-item-hover .dropdown-item {
    padding: 14px 18px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #334155 !important;
}

.nav-item-hover .dropdown-item:last-child {
    margin-bottom: 0;
}

.nav-item-hover .dropdown-item:hover {
    background-color: #f8fafc;
    color: #6777ef !important;
    transform: translateX(6px);
    box-shadow: 0 2px 8px rgba(103, 119, 239, 0.12);
}

.nav-item-hover .dropdown-item i {
    font-size: 18px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6777ef !important;
    transition: transform 0.2s ease;
}

.nav-item-hover .dropdown-item:hover i {
    transform: scale(1.2);
}

/* Dashboard Icon Special Styling */
.navbar-nav li:first-child a {
    padding: 12px 14px !important;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.navbar-nav li:first-child a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.navbar-nav li:first-child a i {
    margin: 0 !important;
    color: #ffffff !important;
}



/* POS Layout - Full Screen Mode */
body.pos-page {
    overflow: hidden;
    /* Disable body scroll SCOPED TO POS PAGE */
    height: 100vh;
    background-color: #f1f5f9;
    /* Light slate bg */
    display: flex;
    flex-direction: column;
}

/* User Profile in Header */
body.pos-page .navbar .nav-link-user {
    padding: 0;
    color: #fff !important;
    display: flex;
    align-items: center;
}

body.pos-page .navbar .nav-link-user img {
    width: 35px;
    height: 35px;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 10px;
}

body.pos-page .navbar .nav-link-user:hover {
    text-decoration: none;
}

/* Main Content: Push down and fill remaining height */
/* body.pos-page .main-sidebar {
    display: none !important;
} */

body.pos-page .main-content {
    /* margin-left: 0 !important; */
    margin-top: 0 !important;
    padding-top: 80px !important;
    /* Standard Stisla header clearance */
    flex: 1;
    overflow: hidden;
    padding-left: 10px !important;
    padding-right: 10px !important;
    width: auto !important;
    /* Adapt to sidebar margin */
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Hide footer in POS mode to save space */
body.pos-page .main-footer {
    display: none !important;
}

body.pos-page .section.pos-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 0;
}

body.pos-page .section-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.pos-page .section-body>.row {
    flex: 1;
    margin: 0;
    min-height: 0;
}

body.pos-page .row {
    height: 100%;
    margin-bottom: 0;
    margin-left: -5px;
    margin-right: -5px;
    display: flex;
}

/* Columns Full Height */
body.pos-page .col-lg-8,
body.pos-page .col-md-7,
body.pos-page .col-lg-4,
body.pos-page .col-md-5 {
    height: 100%;
    padding-bottom: 0;
    padding-left: 5px;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
}

body.pos-page .col-lg-8 .card,
body.pos-page .col-md-7 .card,
body.pos-page .col-lg-4 .card,
body.pos-page .col-md-5 .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px !important;
}

/* Cards Full Height */
body.pos-page .pos-card {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    max-height: 100%;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    border-radius: 16px;
}

body.pos-page .pos-card .card-header {
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
    min-height: 50px;
    padding: 10px 15px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

body.pos-page .pos-card .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 10px;
    min-height: 0;
    /* Critical for inner scrolling */
}

/* Product List Container */
body.pos-page .product-list-container {
    flex: 1;
    overflow-y: auto;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

/* Cart / Form Container */
body.pos-page #formularioregistros {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 0 !important;
}

body.pos-page #formularioregistros form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.pos-page .mt-2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Professional List Cart Styles */
.pos-cart-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px;
}

.pos-cart-item {
    background: white;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
    margin-bottom: 8px !important;
}

.pos-cart-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    border-color: #e2e8f0;
}

.pos-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.pos-cart-item-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    line-height: 1.2;
    padding-right: 5px;
}

.pos-cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-cart-item-price {
    font-size: 0.9rem;
    color: #64748b;
    width: 60px;
}

.pos-cart-item-controls {
    flex: 1;
    display: flex;
    justify-content: center;
}

.qty-control {
    width: 80px !important;
}

.touch-qty {
    border-radius: 8px !important;
    font-weight: 700;
    color: #334155;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0;
    height: 32px;
}

.touch-qty:focus {
    border-color: #6777ef;
    background-color: white !important;
}

.pos-cart-item-subtotal {
    font-weight: 700;
    color: #10b981;
    font-size: 1rem;
    text-align: right;
    width: 80px;
}

.btn-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hide scrollbar for list wrapper but allow scroll */
.product-list-wrapper::-webkit-scrollbar {
    width: 4px;
}

.product-list-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

body.pos-page .table-responsive {
    flex: 1;
    overflow-y: auto;
    max-height: none !important;
    min-height: 0;
    border: none;
    /* Remove outer border for cleaner look */
    margin-bottom: 0;
    background: #fff;
    height: 100%;
}

/* Scrollbar Styling */
body.pos-page ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

body.pos-page ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body.pos-page ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

body.pos-page ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.sidebar-hidden ::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* Split Button Styling */
.btn-pos-clear {
    height: 64px;
    border-radius: 12px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    border: none;
    color: #64748b;
    transition: all 0.2s;
}

.btn-pos-pay:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none !important;
}

.btn-pos-clear:hover {
    background-color: #e2e8f0;
    color: #ef4444;
}

/* Product Grid & Cards */
#product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
    /* Prevent vertical stretching */
}

.product-card {
    width: calc(25% - 12px);
    /* 4 columns minus gap */
    height: 200px;
    /* Fixed height for consistency */
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1200px) {
    .product-card {
        width: calc(33.33% - 10px);
    }
}

@media (max-width: 992px) {
    .product-card {
        width: calc(50% - 8px);
    }
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: #6777ef;
}

.product-card-img-container {
    height: 140px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card-img-container img {
    max-height: 80%;
    max-width: 80%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-card-img-container img {
    transform: scale(1.1);
}

.product-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.product-card-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.product-card-title-minimal {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ensure product list scrolls properly */
body.sidebar-hidden .product-list-container {
    flex: 1;
    overflow-y: auto;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    min-height: 0;
}

/* Restore visible scrollbar for internal containers */
body.sidebar-hidden .product-list-container::-webkit-scrollbar,
body.sidebar-hidden .table-responsive::-webkit-scrollbar,
body.pos-page .product-list-container::-webkit-scrollbar,
body.pos-page .table-responsive::-webkit-scrollbar {
    width: 8px;
    background: #f1f5f9;
}

body.sidebar-hidden .product-list-container::-webkit-scrollbar-thumb,
body.sidebar-hidden .table-responsive::-webkit-scrollbar-thumb,
body.pos-page .product-list-container::-webkit-scrollbar-thumb,
body.pos-page .table-responsive::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

body.sidebar-hidden .product-list-container::-webkit-scrollbar-thumb:hover,
body.sidebar-hidden .table-responsive::-webkit-scrollbar-thumb:hover,
body.pos-page .product-list-container::-webkit-scrollbar-thumb:hover,
body.pos-page .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Standardize Navbar (No Floating/Margins) */
.navbar {
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Layout Full Width (No Sidebar, Standard Header) */
body.layout-full-width .main-sidebar {
    display: none !important;
}

body.layout-full-width .main-content {
    padding-left: 30px !important;
    padding-right: 30px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
}

body.layout-full-width .navbar {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.layout-full-width .navbar-bg {
    left: 0 !important;
    width: 100% !important;
}

body.layout-full-width .main-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
    width: 100% !important;
    margin-left: 0 !important;
}

/* Ensure mobile toggle doesn't show up weirdly if forced */
body.layout-full-width .navbar-nav .collapse-btn {
    display: none !important;
}

/* Collapsible Transition */
.transition-all {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pro Payment Modal Overlay */
.modal-pro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-pro-overlay.active {
    display: flex;
}

.modal-pro-content {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-pro-header {
    padding: 20px 25px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.close-modal {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.modal-pro-body {
    padding: 20px 30px 30px;
}

/* Payment Methods Grid */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.payment-method-item {
    padding: 15px 10px;
    border: 2px solid #f1f5f9;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.payment-method-item.active {
    border-color: #6777ef !important;
    background: #f8faff !important;
    color: #6777ef !important;
}

.payment-method-item i {
    font-size: 1.5rem;
}

.payment-method-item span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Large Payment Input */
.payment-input-wrapper {
    position: relative;
    background: #f8fafc;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.2s;
    overflow: hidden;
}

.payment-input-wrapper:focus-within {
    border-color: #6777ef;
    background: #ffffff;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: #cbd5e1;
}

.payment-large-input {
    width: 100%;
    height: 60px;
    border: none;
    background: transparent;
    padding-left: 45px;
    padding-right: 20px;
    font-size: 1.75rem;
    font-weight: 800;
    color: #334155;
    text-align: right;
    outline: none !important;
}

/* Pro Keypad */
.pro-keypad {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 15px;
}

.keypad-numbers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.k-btn {
    height: 50px;
    border-radius: 14px;
    border: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.1s;
}

.k-btn:active {
    background: #f1f5f9 !important;
    transform: scale(0.95);
}

.k-btn.k-clear {
    color: #ef4444 !important;
}

.keypad-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.k-quick-btn {
    height: 42px;
    border-radius: 12px;
    border: none;
    background: #f1f5f9;
    font-weight: 700;
    color: #475569;
    font-size: 0.9rem;
}

/* Virtual Keyboard Styles */
.modal-keyboard-content {
    background: #f8fafc;
    width: 95%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: zoomIn 0.3s ease;
}

.qwerty-keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    user-select: none;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.kb-key {
    flex: 1;
    min-width: 0;
    height: 55px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-weight: 700;
    color: #334155;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 0 #cbd5e1;
    transition: all 0.05s;
    cursor: pointer;
}

.kb-key:active {
    transform: translateY(2px);
    box-shadow: none;
    background: #f1f5f9;
}

.kb-action-key {
    background: #e2e8f0;
    color: #475569;
}

.kb-space {
    flex: 6;
    background: #fff;
    font-size: 0.9rem;
    color: #94a3b8;
}

.kb-spacer-half {
    flex: 0.5;
}

#payment-total-display {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.k-done-btn {
    flex-grow: 1;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.k-done-btn:active {
    transform: scale(0.98);
}
/* ============================================
   Modern Action Button Dropdown Styles
   ============================================ */

/* Action Button Container */
.action-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Main Action Dropdown Button */
.btn-actions-dropdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #ffffff !important;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-actions-dropdown:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-actions-dropdown:active,
.btn-actions-dropdown:focus {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    color: #ffffff !important;
}

.btn-actions-dropdown i {
    font-size: 14px;
}

/* Dropdown Menu for Actions */
.dropdown-menu-actions {
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 8px 0;
    min-width: 220px;
    margin-top: 8px;
}

.dropdown-menu-actions .dropdown-item {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-menu-actions .dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-menu-actions .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
    padding-left: 24px;
}

/* Action Item Colors */
.dropdown-menu-actions .action-add {
    color: #28a745;
}

.dropdown-menu-actions .action-add:hover {
    background-color: #e8f5e9;
    color: #1e7e34;
}

.dropdown-menu-actions .action-excel {
    color: #1d6f42;
}

.dropdown-menu-actions .action-excel:hover {
    background-color: #e8f5e9;
    color: #155724;
}

.dropdown-menu-actions .action-pdf {
    color: #dc3545;
}

.dropdown-menu-actions .action-pdf:hover {
    background-color: #f8d7da;
    color: #bd2130;
}

/* Dropdown Divider */
.dropdown-menu-actions .dropdown-divider {
    margin: 8px 0;
}

/* Hide DataTables default buttons */
.dt-buttons {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .action-buttons-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-actions-dropdown {
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-menu-actions {
        width: 100%;
    }
}
