* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
    font-size: 12px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.live-cart-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    color: white;
    border-radius: 12px 12px 0 0;
}

.live-cart-header h2 {
    font-size: 16px;
    margin: 0;
    color: white;
}

.cart-badge-live {
    background-color: #ff6600;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.live-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: calc(100vh - 230px);
}

.live-cart-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.live-cart-item-name {
    font-weight: bold;
    font-size: 11px;
    color: #1a1a1a;
    flex: 1;
    min-width: 0;
}

.live-cart-item-sku {
    font-size: 9px;
    color: #999;
    margin-bottom: 5px;
}

.live-cart-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.live-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-cart-item-qty {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 11px;
}

.live-cart-item-price {
    color: #ff6600;
    font-weight: bold;
    font-size: 12px;
    min-width: 60px;
    text-align: right;
}

.cart-item-total {
    font-size: 11px;
    color: #1a1a1a;
    font-weight: bold;
    margin-top: 5px;
}

.cart-shipping-section {
    padding: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.cart-section-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.cart-form-group {
    margin-bottom: 8px;
}

.cart-form-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 11px;
    box-sizing: border-box;
}

.cart-form-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}

.cart-form-row {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.cart-form-row .cart-form-input {
    flex: 1;
}

.pickup-location {
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 20px;
    border-left: 3px solid #ff6600;
    margin-top: 5px;
}

.pickup-location p {
    margin: 3px 0;
    font-size: 10px;
    color: #666;
    line-height: 1.4;
}

.live-cart-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 0 0 12px 12px;
}

.live-cart-shipping {
    font-size: 11px;
    margin-bottom: 8px;
    text-align: right;
    color: #666;
}

/* ── Recent Orders Panel ── */
.recent-orders-section {
    padding: 14px 15px 10px;
    border-top: 2px solid #eee;
}

.recent-orders-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-order-card {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: border-color 0.15s, background 0.15s;
}

.recent-order-card:hover {
    background: #fff4ee;
    border-color: #ff6600;
}

.ro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.ro-date {
    font-size: 11px;
    color: #888;
}

.ro-total {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.ro-items {
    font-size: 11px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ro-item {
    display: inline-block;
    background: #efefef;
    border-radius: 4px;
    padding: 1px 6px;
    margin: 2px 2px 2px 0;
}

.ro-more {
    font-size: 11px;
    color: #999;
    font-style: italic;
}

.ro-reorder-btn {
    width: 100%;
    padding: 6px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ro-reorder-btn:hover {
    background: #e55a00;
}

.live-cart-total {
    font-size: 14px;
    margin-bottom: 10px;
    text-align: right;
    font-weight: bold;
}

/* Header */
.header {
    background-color: #1a1a1a;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: white;
    font-size: 12px;
}

.logout-btn {
    padding: 6px 12px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #555;
}

.google-signin {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 18px;
    color: #ff6600;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #ff6600;
}

.nav a.active {
    color: #ff6600;
}

/* Login Overlay Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.login-overlay.hidden {
    display: none;
}

.login-overlay-content {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #ff6600;
    font-size: 32px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.login-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.login-tab.active {
    color: #ff6600;
    border-bottom: 2px solid #ff6600;
    font-weight: bold;
}

.login-tab:hover {
    color: #ff6600;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.login-form .form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.login-form .form-input:focus {
    outline: none;
    border-color: #ff6600;
}

.login-form .login-btn {
    width: 100%;
    padding: 12px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.login-form .login-btn:hover {
    background: #e55a00;
}

.login-form .login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-form .error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.login-form .error-message.show {
    display: block;
}

.login-form .success-message {
    background: #efe;
    color: #3c3;
    padding: 10px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.login-form .success-message.show {
    display: block;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: normal;
}

.remember-me-checkbox {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.login-form .divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.login-form .divider::before,
.login-form .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.login-form .divider::before {
    left: 0;
}

.login-form .divider::after {
    right: 0;
}

.login-form .divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

.login-form .google-signin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    min-height: 40px;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: #4CAF50;
}

.toast.error {
    border-left-color: #f44336;
}

.toast.info {
    border-left-color: #2196F3;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error .toast-icon {
    color: #f44336;
}

.toast.info .toast-icon {
    color: #2196F3;
}

.toast.warning .toast-icon {
    color: #ff9800;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6600;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin: 0 auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.loading-overlay-content p {
    margin-top: 15px;
    color: #666;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Smooth Transitions */
.modal, .checkout-modal, .thank-you-modal, .upsell-modal {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cart-sidebar {
    transition: transform 0.3s ease;
}

/* Form Validation Styles */
.form-input.invalid {
    border-color: #f44336;
    background-color: #ffebee;
}

.form-input.valid {
    border-color: #4CAF50;
}

.field-error {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.field-error.show {
    display: block;
}

/* Search Loading Indicator */
.search-loading {
    display: none;
    position: absolute;
    right: 140px; /* Position to the left of the barcode button */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.search-loading.active {
    display: block;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 12px;
    background-color: #ff6600;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.cart-icon:hover {
    background-color: #e55a00;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

.main-layout {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-section {
    flex: 1;
    min-width: 0;
}

.live-cart-panel {
    width: 300px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 70px);
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-header {
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 16px;
    color: #1a1a1a;
}

/* Search Container */
.phone-banner {
    background: #fff8e1;
    border: 1px solid #f5a623;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: #5a3e00;
    text-align: center;
}

.phone-banner a {
    color: #d4720a;
    font-weight: 600;
    text-decoration: none;
}

.phone-banner a:hover {
    text-decoration: underline;
}

.search-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 2.5px solid #ff6600;
    border-radius: 30px;
    background-color: #fffaf5;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
    min-width: 0;
    animation: search-pulse 2.5s ease-in-out 0.5s 3;
}

@keyframes search-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.35); }
    50%  { box-shadow: 0 0 0 8px rgba(255, 102, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 102, 0, 0); }
}

.search-input:focus {
    outline: none;
    border-color: #e55a00;
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.18);
    background-color: #fff;
    transform: scaleY(1.04);
}

.search-input::placeholder {
    color: #b36b2e;
    font-style: italic;
}

/* Products Table */
.products-table {
    width: 100%;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.products-table thead {
    background-color: #1a1a1a;
    color: white;
    border-radius: 12px 12px 0 0;
}

.products-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 2px solid #333;
}

.products-table th:first-child {
    border-top-left-radius: 12px;
}

.products-table th:last-child {
    border-top-right-radius: 12px;
}

.products-table tbody tr {
    border-bottom: 1px solid #eee;
}

.products-table tbody tr:last-child {
    border-bottom: none;
}

.products-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.products-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.products-table td {
    padding: 10px 8px;
    font-size: 16px;
    border-right: 1px solid #eee;
}

.products-table td:last-child {
    border-right: none;
}

.products-table tbody tr:hover {
    background-color: #f9f9f9;
}

.product-sku {
    font-weight: bold;
    color: #666;
    font-size: 14px;
    position: relative;
}

.clearance-sticker {
    display: inline-block;
    background: linear-gradient(135deg, #ff0000 0%, #ff6600 100%);
    color: white;
    font-weight: bold;
    font-size: 7px;
    padding: 2px 4px;
    border-radius: 10px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(255, 0, 0, 0.3);
    vertical-align: middle;
    line-height: 1.2;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.product-subsku {
    font-size: 9px;
    color: #999;
    font-style: italic;
    margin-top: 2px;
}

.product-name {
    cursor: pointer;
    transition: color 0.2s, text-decoration 0.2s;
    font-weight: bold;
    color: #1a1a1a;
    font-size: 11px;
    line-height: 1.4;
}

.product-name:hover {
    color: #ff6600;
    text-decoration: underline;
}

.product-description {
    color: #666;
    font-size: 10px;
}

.product-color {
    font-size: 11px;
    color: #333;
    font-weight: 500;
    text-align: center;
}

.product-price {
    font-weight: bold;
    color: #ff6600;
    font-size: 12px;
}

.price-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}

.price-line {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 9px;
    font-weight: normal;
}

.sale-price {
    color: #ff6600;
    font-size: 11px;
    font-weight: bold;
}

.discount-percent {
    background: linear-gradient(135deg, #ff0000 0%, #ff6600 100%);
    color: white;
    font-weight: bold;
    font-size: 7px;
    padding: 1px 4px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    box-shadow: 0 1px 2px rgba(255, 0, 0, 0.3);
    line-height: 1.2;
}

.stock-info {
    font-size: 9px;
    color: #ff6600;
    font-weight: bold;
    margin-top: 5px;
    font-style: italic;
}

.units-per-pack {
    text-align: center;
    font-size: 11px;
    color: #666;
    font-weight: bold;
}

.product-total {
    font-weight: bold;
    color: #1a1a1a;
    font-size: 12px;
}

.product-total.in-cart {
    color: #4CAF50;
    background-color: #e8f5e9;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: bold;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.qty-btn:hover {
    background-color: #f5f5f5;
    border-color: #ff6600;
}

.qty-btn:active {
    background-color: #e0e0e0;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 11px;
}

.qty-input {
    width: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 4px;
    margin: 0 2px;
}

.qty-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input {
    -moz-appearance: textfield;
}

.add-to-cart-btn {
    padding: 4px 10px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background-color: #e55a00;
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Cart Sidebar */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 998;
}

.cart-overlay.active {
    display: block;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 999;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 16px;
    color: #1a1a1a;
}

.close-cart {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-cart:hover {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.05);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 11px;
}

.cart-item-sku {
    font-size: 10px;
    color: #999;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #ff6600;
    font-weight: bold;
    margin-bottom: 10px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 20px;
    font-size: 18px;
}

.quantity-btn:hover {
    background-color: #f5f5f5;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.remove-item {
    background: none;
    border: none;
    color: #ff0000;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    margin-left: auto;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

.cart-total {
    font-size: 14px;
    margin-bottom: 15px;
    text-align: right;
}

.checkout-btn {
    width: 100%;
    padding: 10px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #e55a00;
}

.checkout-btn.confirm-order-btn {
    background-color: #4CAF50;
    color: white;
}

.checkout-btn.confirm-order-btn:hover {
    background-color: #45a049;
}

/* Checkout Modal */
.checkout-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.checkout-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checkout-modal-content {
    background-color: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.checkout-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    color: white;
    border-radius: 16px 16px 0 0;
}

.checkout-header h2 {
    font-size: 20px;
    margin: 0;
}

.close-checkout {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: white;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-checkout:hover {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
}

.checkout-body {
    padding: 20px;
}

.checkout-section {
    margin-bottom: 25px;
}

.checkout-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #1a1a1a;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 5px;
}

.order-items {
    margin-bottom: 15px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.order-totals {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.order-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
}

.order-total {
    font-weight: bold;
    font-size: 16px;
    color: #ff6600;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.1);
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: #ff6600;
    background-color: #fff5f0;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.payment-option input[type="radio"]:checked + span {
    font-weight: bold;
    color: #ff6600;
}

.payment-option input[type="radio"]:checked ~ .payment-option {
    border-color: #ff6600;
}

.card-details {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 20px;
}

.checkout-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.cancel-btn {
    flex: 1;
    padding: 12px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

.submit-order-btn {
    flex: 2;
    padding: 12px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-order-btn:hover {
    background-color: #e55a00;
}

.submit-order-btn.confirm-order-btn {
    background-color: #4CAF50;
    color: white;
}

.submit-order-btn.confirm-order-btn:hover {
    background-color: #45a049;
}

.shipping-summary {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 1.6;
}

.shipping-summary p {
    margin: 5px 0;
    color: #333;
}

/* Thank You Modal */
.thank-you-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.thank-you-modal.active {
    display: flex;
}

.thank-you-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.thank-you-icon {
    font-size: 64px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.thank-you-modal-content h2 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 24px;
}

.thank-you-modal-content p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.thank-you-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-invoice-btn,
.continue-shopping-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.download-invoice-btn {
    background-color: #4CAF50;
    color: white;
}

.download-invoice-btn:hover {
    background-color: #45a049;
}

.continue-shopping-btn {
    background-color: #ff6600;
    color: white;
}

.continue-shopping-btn:hover {
    background-color: #e55a00;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Upsell Modals */
.upsell-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.upsell-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upsell-modal-content {
    background-color: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.upsell-header {
    padding: 20px;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    color: white;
    border-radius: 16px 16px 0 0;
}

.upsell-header h2 {
    margin: 0;
    font-size: 20px;
    color: white;
}

.close-upsell {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-upsell:hover {
    background: rgba(255, 255, 255, 0.2);
}

.upsell-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.upsell-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 20px;
    margin-bottom: 15px;
    gap: 20px;
}

.upsell-item-info {
    flex: 1;
}

.upsell-item-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.upsell-item-description {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
}

.upsell-item-price {
    font-size: 16px;
    font-weight: bold;
    color: #ff6600;
    margin-top: 8px;
}

.upsell-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.upsell-quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.upsell-quantity-controls .qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upsell-quantity-controls .qty-btn:hover {
    background: #f5f5f5;
}

.upsell-quantity-controls .qty-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.add-to-cart-upsell-btn {
    padding: 10px 20px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
    white-space: nowrap;
}

.add-to-cart-upsell-btn:hover {
    background: #e55a00;
}

.upsell-footer {
    padding: 20px;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.skip-btn {
    padding: 12px 24px;
    background: #666;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

.skip-btn:hover {
    background: #555;
}

.continue-btn {
    padding: 12px 24px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
}

.continue-btn:hover {
    background: #e55a00;
}

@media (max-width: 768px) {
    .upsell-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .upsell-item-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .live-cart-panel {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .products-table {
        font-size: 10px;
    }

    .products-table th,
    .products-table td {
        padding: 6px;
        font-size: 9px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .nav {
        display: none;
    }

    .search-container {
        flex-wrap: wrap;
    }

    .barcode-scanner-btn {
        padding: 8px 16px;
        font-size: 12px;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .search-loading {
        right: 10px;
    }
}

/* Product Photo Styles */
.product-photo-cell {
    width: 80px;
    padding: 8px !important;
    text-align: center;
    vertical-align: middle;
}

.product-photo-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-photo-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-photo-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.product-photo-placeholder:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}

/* Photo Lightbox Modal */
.photo-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    cursor: pointer;
    overflow-y: auto;
    padding: 40px 20px;
}

.photo-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    background: white;
    border-radius: 20px;
    cursor: default;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    margin: auto;
}

.photo-lightbox-container {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Left Side: Image Area */
.photo-lightbox-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    padding: 20px;
    min-width: 0;
}

.photo-lightbox-image-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: white;
    border-radius: 20px;
    margin-bottom: 20px;
}

.photo-lightbox-main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.photo-lightbox-main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    display: block;
}

.photo-lightbox-main-image img[style*="display: none"] {
    display: none !important;
}

.photo-lightbox-prev,
.photo-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 36px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.photo-lightbox-prev:hover,
.photo-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.photo-lightbox-prev {
    left: 10px;
}

.photo-lightbox-next {
    right: 10px;
}

/* Thumbnail Strip */
.photo-lightbox-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.photo-lightbox-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.photo-lightbox-thumbnail:hover {
    transform: scale(1.1);
    border-color: #ff6600;
}

.photo-lightbox-thumbnail.active {
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.3);
}

/* Right Side: Product Info */
.photo-lightbox-right {
    width: 400px;
    background: white;
    padding: 30px;
    overflow-y: auto;
    border-left: 1px solid #eee;
}

.photo-lightbox-info h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #1a1a1a;
    line-height: 1.3;
}

.photo-lightbox-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.photo-lightbox-meta p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.photo-lightbox-meta p:first-child {
    font-weight: bold;
    color: #ff6600;
    font-size: 16px;
}

.photo-lightbox-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #333;
}

.photo-lightbox-description p {
    margin: 10px 0;
}

.photo-lightbox-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.photo-lightbox-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.photo-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 100;
}

.photo-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .photo-lightbox-container {
        flex-direction: column;
    }
    
    .photo-lightbox-right {
        width: 100%;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid #eee;
    }
    
    .photo-lightbox-left {
        min-height: 50vh;
    }
}

@media (max-width: 768px) {
    .photo-lightbox {
        padding: 20px 10px;
    }
    
    .photo-lightbox-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }
    
    .photo-lightbox-prev,
    .photo-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .photo-lightbox-prev {
        left: 5px;
    }

    .photo-lightbox-next {
        right: 5px;
    }

    .photo-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
    
    .photo-lightbox-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .photo-lightbox-right {
        padding: 20px;
    }
    
    .photo-lightbox-info h2 {
        font-size: 20px;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: #666;
    font-size: 12px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e55a00;
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-page {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-page:hover {
    background-color: #f5f5f5;
    border-color: #ff6600;
}

.pagination-page.active {
    background-color: #ff6600;
    color: white;
    border-color: #ff6600;
    font-weight: bold;
}

.pagination-ellipsis {
    padding: 0 5px;
    color: #999;
    font-size: 12px;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .pagination-info {
        text-align: center;
        width: 100%;
    }
}

/* Barcode Scanner Styles */
.barcode-scanner-btn {
    padding: 10px 20px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Prevent button from shrinking */
    z-index: 2; /* Ensure button is above other elements */
}

.barcode-scanner-btn:hover {
    background-color: #e55a00;
}

.barcode-scanner-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.barcode-scanner-modal.active {
    display: flex;
}

.barcode-scanner-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow: hidden;
}

.barcode-scanner-header {
    padding: 20px;
    border-bottom: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    color: white;
    border-radius: 20px 20px 0 0;
}

.barcode-scanner-header h2 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.close-barcode-scanner {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-barcode-scanner:hover {
    background: rgba(255, 255, 255, 0.2);
}

.barcode-scanner-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.barcode-input-section {
    margin-bottom: 20px;
}

.barcode-input-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.barcode-input-wrapper {
    display: flex;
    gap: 10px;
}

.barcode-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
}

.barcode-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.barcode-add-btn {
    padding: 12px 24px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.barcode-add-btn:hover {
    background-color: #e55a00;
}

.barcode-mode-picker {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 10px 0 16px;
}

.barcode-mode-prompt {
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
}

.barcode-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 16px;
    border: 2px solid #ddd;
    border-radius: 14px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    font-size: 22px;
}

.barcode-mode-btn span {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.barcode-mode-btn small {
    font-size: 13px;
    color: #888;
    font-weight: normal;
}

.barcode-mode-btn:hover {
    border-color: #ff6600;
    background: #fff8f3;
    transform: translateY(-2px);
}

.barcode-camera-section {
    margin-bottom: 12px;
}

.barcode-viewfinder {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.barcode-viewfinder video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.barcode-scan-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.barcode-scan-region {
    width: 72%;
    height: 100px;
    border: 2.5px solid #ff6600;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 2000px rgba(0,0,0,0.35);
}

.barcode-scan-line {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6600, transparent);
    animation: barcode-scan 1.8s ease-in-out infinite;
}

@keyframes barcode-scan {
    0%   { top: 0; }
    50%  { top: calc(100% - 2px); }
    100% { top: 0; }
}

.barcode-scan-hint {
    color: white;
    background: rgba(0,0,0,0.55);
    padding: 6px 18px;
    border-radius: 20px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
}

.barcode-result-panel {
    background: #f0faf0;
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.barcode-found {
    margin-bottom: 12px;
}

.barcode-found-label {
    font-size: 13px;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 4px;
}

.barcode-found-name {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.barcode-found-meta {
    font-size: 14px;
    color: #555;
}

.barcode-found-stock {
    color: #c62828;
    font-size: 13px;
    margin-top: 4px;
}

.barcode-not-found {
    text-align: center;
    padding: 8px 0;
}

.barcode-not-found-label {
    font-size: 16px;
    font-weight: bold;
    color: #c62828;
    margin-bottom: 6px;
}

.barcode-not-found-code {
    font-size: 13px;
    color: #888;
    font-family: monospace;
}

.barcode-result-actions {
    display: flex;
    gap: 10px;
}

.barcode-result-actions .barcode-btn {
    flex: 1;
    padding: 14px;
    font-size: 16px;
}

.barcode-manual-section {
    margin-bottom: 12px;
}

.barcode-manual-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.barcode-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.barcode-btn.primary {
    background-color: #ff6600;
    color: white;
}

.barcode-btn.primary:hover {
    background-color: #e55a00;
}

.barcode-btn.secondary {
    background-color: #666;
    color: white;
}

.barcode-btn.secondary:hover {
    background-color: #555;
}

.barcode-status {
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    min-height: 20px;
}

.barcode-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.barcode-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.barcode-status.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.barcode-scanned-items {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.barcode-scanned-items h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

#barcodeItemsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.barcode-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.barcode-item-info {
    flex: 1;
}

.barcode-item-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.barcode-item-sku {
    font-size: 12px;
    color: #666;
}

.barcode-item-price {
    font-weight: bold;
    color: #ff6600;
    margin-right: 15px;
}

.barcode-scanner-footer {
    padding: 20px;
    border-top: 2px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background-color: #f9f9f9;
}

/* ── Brand filter dropdown ── */
.brand-filter-select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
    background: white;
    cursor: pointer;
    min-width: 160px;
}
.brand-filter-select:focus {
    outline: none;
    border-color: #ff6600;
}

/* ── Low stock / out of stock badges ── */
.stock-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.stock-badge.low-stock {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}
.stock-badge.out-of-stock {
    background: #fce4e4;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ── Mobile card layout ── */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    .live-cart-panel {
        width: 100% !important;
        max-width: 100%;
    }

    /* Search bar — each control on its own full-width row */
    .search-container {
        flex-wrap: wrap;
        gap: 8px;
    }
    .brand-filter-select {
        width: 100%;
        order: 1;
        height: 44px;
        font-size: 15px;
    }
    .search-input {
        width: 100%;
        flex: 1 1 100%;
        order: 2;
        font-size: 15px;
        padding: 12px 16px;
    }
    .barcode-scanner-btn {
        width: 100%;
        order: 3;
        justify-content: center;
        padding: 12px;
        font-size: 15px;
    }
    .search-loading { order: 4; }

    /* Product cards — 2-column grid */
    .products-table {
        border: none;
        background: transparent;
        box-shadow: none;
    }
    .products-table thead {
        display: none;
    }
    .products-table tbody {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .products-table tr {
        display: flex;
        flex-direction: column;
        border: 1px solid #eee;
        border-radius: 10px;
        margin-bottom: 0;
        padding: 8px;
        background: white;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        position: relative;
        width: auto;
    }
    .products-table td {
        display: block;
        border: none;
        padding: 2px 0;
        font-size: 12px;
        width: auto;
    }
    .product-photo-cell {
        text-align: center;
        margin-bottom: 6px;
    }
    .product-photo-thumbnail {
        width: 64px !important;
        height: 64px !important;
    }
    .product-sku {
        font-size: 10px;
        color: #999;
    }
    .product-name {
        font-size: 12px;
        font-weight: 600;
        color: #1a1a1a;
        line-height: 1.3;
    }
    .product-price {
        font-size: 13px;
        font-weight: 700;
        color: #ff6600;
    }
    .units-per-pack {
        font-size: 10px;
        color: #888;
    }
    .units-per-pack::before { content: 'Units/Pack: '; }
    .quantity-controls {
        justify-content: flex-start;
        margin-top: 4px;
        gap: 4px;
    }
    .qty-btn { width: 26px; height: 26px; font-size: 14px; }
    .qty-input { width: 40px; font-size: 13px; padding: 2px 4px; }
    .product-total {
        font-size: 12px;
        font-weight: 700;
    }
    .product-total::before { content: 'Total: '; font-weight: 400; color: #666; }
    .brand-filters { flex-wrap: nowrap; }
}

