/**
 * MEATIOWA Point of Sale - Stylesheet
 * Mobile-first, touch-optimized design
 * Follows MEATIOWA rustic farmhouse design system
 */

/* ============================================
   CSS VARIABLES - MEATIOWA DESIGN SYSTEM
   ============================================ */
:root {
    /* Primary Colors */
    --barn-red: #8B2323;
    --barn-red-dark: #6B1A1A;
    --barn-red-light: #A52A2A;
    --cream: #FDF5E6;
    --cream-dark: #F5ECD5;
    --hay: #D4A84B;
    --hay-dark: #B8923F;
    --sage: #6B8E6B;
    --sage-dark: #5A7A5A;
    --wood-brown: #654321;

    /* Neutral Colors */
    --charcoal: #2C2C2C;
    --slate: #4A4A4A;
    --medium-gray: #6B6B6B;
    --light-gray: #E8E8E8;
    --off-white: #FAFAFA;
    --white: #FFFFFF;

    /* Status Colors */
    --success: #4A7C4A;
    --warning: #D4A84B;
    --danger: #C53030;
    --info: #3182CE;

    /* Typography */
    --font-heading: 'Bitter', Georgia, serif;
    --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-handwritten: 'Caveat', cursive;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --header-height: 60px;
    --cart-width: 380px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--charcoal);
    background-color: var(--cream);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* Prevent pull-to-refresh on touch devices */
body {
    overscroll-behavior: none;
}

a {
    color: var(--barn-red);
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, select {
    font-family: inherit;
    font-size: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   SCREEN MANAGEMENT
   ============================================ */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

.screen.active {
    display: flex;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
    background: linear-gradient(135deg, var(--barn-red) 0%, var(--barn-red-dark) 100%);
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
}

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-logo img {
    width: 80px;
    height: auto;
    margin-bottom: var(--space-md);
}

.login-logo h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--barn-red);
    letter-spacing: 2px;
}

.login-logo .tagline {
    font-family: var(--font-handwritten);
    font-size: 1.25rem;
    color: var(--medium-gray);
}

.login-form .form-group {
    margin-bottom: var(--space-lg);
}

.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--slate);
}

.login-form input,
.login-form select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: var(--barn-red);
}

.login-form input[type="password"] {
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    text-align: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
}

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

.btn-primary {
    background: var(--barn-red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--barn-red-dark);
}

.btn-secondary {
    background: var(--slate);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--charcoal);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--barn-red);
    color: var(--barn-red);
}

.btn-outline:hover {
    background: var(--barn-red);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
    min-height: 56px;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--slate);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--light-gray);
    color: var(--charcoal);
}

.btn-icon.btn-danger:hover {
    background: var(--danger);
    color: var(--white);
}

/* ============================================
   POS HEADER
   ============================================ */
.pos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.locker-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.locker-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--barn-red);
}

.terminal-name {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.current-time {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
}

/* ============================================
   POS MAIN LAYOUT
   ============================================ */
#pos-screen {
    flex-direction: column;
}

.pos-main {
    display: flex;
    flex-direction: column;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
}

/* Mobile: Stack vertically */
.products-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--cream);
}

.cart-section {
    background: var(--white);
    border-top: 3px solid var(--barn-red);
    display: flex;
    flex-direction: column;
    max-height: 45vh;
}

/* ============================================
   CATEGORY TABS
   ============================================ */
.category-tabs {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.category-tab:hover {
    border-color: var(--barn-red);
}

.category-tab.active {
    background: var(--barn-red);
    color: var(--white);
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

.search-bar i {
    color: var(--medium-gray);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: var(--space-sm);
}

.search-bar input::placeholder {
    color: var(--medium-gray);
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-sm);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    min-height: 120px;
    border: 2px solid transparent;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--hay);
}

.product-card:active {
    transform: scale(0.98);
    background: var(--cream);
}

.product-card.out-of-stock {
    opacity: 0.5;
    pointer-events: none;
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-bottom: var(--space-sm);
    background: var(--cream);
}

.product-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    font-size: 1.5rem;
    color: var(--barn-red);
}

.product-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--barn-red);
}

.product-unit {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.product-stock {
    font-size: 0.7rem;
    color: var(--sage);
    margin-top: var(--space-xs);
}

.product-stock.low {
    color: var(--warning);
}

.product-stock.out {
    color: var(--danger);
}

/* Quick Key styling */
.product-card.quick-key {
    background: linear-gradient(135deg, var(--hay) 0%, var(--hay-dark) 100%);
    color: var(--white);
}

.product-card.quick-key .product-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.product-card.quick-key .product-name {
    color: var(--white);
}

.product-card.quick-key .product-price {
    color: var(--white);
}

/* Loading state */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xxl);
    color: var(--medium-gray);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: var(--space-md);
    color: var(--barn-red);
}

/* ============================================
   CART SECTION
   ============================================ */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--light-gray);
}

.cart-header h2 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-sm);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    color: var(--medium-gray);
    text-align: center;
}

.cart-empty i {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.cart-empty p {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.cart-empty span {
    font-size: 0.875rem;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--cream);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.cart-item-qty {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--barn-red);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-details {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.cart-item-price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--barn-red);
    white-space: nowrap;
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.cart-item-remove:hover {
    background: var(--danger);
    color: var(--white);
}

/* Cart Totals */
.cart-totals {
    padding: var(--space-md);
    border-top: 1px solid var(--light-gray);
    background: var(--off-white);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    font-size: 0.875rem;
    color: var(--slate);
}

.total-row.total-grand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
    border-top: 2px solid var(--light-gray);
}

.total-row.weight-row {
    color: var(--sage);
    font-size: 0.75rem;
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-top: 1px solid var(--light-gray);
}

.cart-actions .btn-large {
    grid-column: 1 / -1;
}

/* ============================================
   SIDE MENU
   ============================================ */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.side-menu.open {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--barn-red);
    color: var(--white);
}

.menu-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.menu-header .btn-icon {
    color: var(--white);
}

.menu-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-list {
    list-style: none;
    padding: var(--space-md) 0;
}

.menu-list li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--charcoal);
    transition: all var(--transition-fast);
}

.menu-list li a:hover {
    background: var(--cream);
    color: var(--barn-red);
}

.menu-list li a i {
    width: 24px;
    text-align: center;
    color: var(--barn-red);
}

.menu-list .divider {
    height: 1px;
    background: var(--light-gray);
    margin: var(--space-sm) var(--space-lg);
}

.badge {
    background: var(--barn-red);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: auto;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition-fast);
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-content.modal-small {
    max-width: 360px;
}

.modal-content.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--charcoal);
}

.modal-body {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--light-gray);
}

.modal-footer .btn {
    flex: 1;
}

/* ============================================
   PAYMENT MODAL
   ============================================ */
.payment-summary {
    text-align: center;
    padding-bottom: var(--space-lg);
    border-bottom: 2px dashed var(--light-gray);
    margin-bottom: var(--space-lg);
}

.payment-total {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.payment-total span:first-child {
    font-size: 0.875rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.payment-total span:last-child {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--barn-red);
}

.payment-customer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    color: var(--sage);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--cream);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.payment-method i {
    font-size: 1.5rem;
    color: var(--barn-red);
}

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

.payment-method:hover {
    border-color: var(--barn-red);
}

.payment-method.active {
    background: var(--barn-red);
    color: var(--white);
}

.payment-method.active i {
    color: var(--white);
}

.payment-panel {
    display: none;
}

.payment-panel.active {
    display: block;
}

/* Card Payment */
.card-reader-status {
    text-align: center;
    padding: var(--space-xl);
    background: var(--cream);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.card-reader-status i {
    font-size: 3rem;
    color: var(--sage);
    margin-bottom: var(--space-md);
    animation: pulse 2s infinite;
}

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

.card-reader-status p {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.card-reader-status span {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

/* Cash Payment */
.cash-input {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.cash-input label {
    display: block;
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-sm);
}

.cash-display {
    width: 100%;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--charcoal);
    background: var(--cream);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.cash-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.cash-keypad .key {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.cash-keypad .key:hover {
    border-color: var(--barn-red);
    background: var(--cream);
}

.cash-keypad .key:active {
    background: var(--barn-red);
    color: var(--white);
    border-color: var(--barn-red);
}

.cash-keypad .key-clear {
    color: var(--danger);
}

.quick-cash {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.change-display {
    text-align: center;
    padding: var(--space-lg);
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius-lg);
}

.change-display span:first-child {
    display: block;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.change-display span:last-child {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

/* Gift Card */
.gift-card-input {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.gift-card-input label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.gift-card-input input {
    flex: 1;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 1.125rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gift-card-balance {
    text-align: center;
    padding: var(--space-lg);
    background: var(--cream);
    border-radius: var(--radius-lg);
}

.gift-card-balance span:first-child {
    display: block;
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-xs);
}

.gift-card-balance span:last-child {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sage);
}

/* ============================================
   QUANTITY MODAL
   ============================================ */
.quantity-product {
    text-align: center;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: var(--space-lg);
}

.qty-product-name {
    display: block;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.qty-product-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--barn-red);
}

.quantity-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.qty-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--barn-red);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background: var(--barn-red-dark);
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-input input {
    width: 80px;
    height: 56px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.weight-input {
    text-align: center;
}

.weight-input label {
    display: block;
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-sm);
}

.weight-input input {
    width: 150px;
    padding: var(--space-md);
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
}

/* ============================================
   CUSTOMER MODAL
   ============================================ */
.customer-search {
    margin-bottom: var(--space-lg);
}

.customer-search input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.customer-search input:focus {
    outline: none;
    border-color: var(--barn-red);
}

.customer-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
}

.customer-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.customer-item:hover {
    background: var(--cream);
}

.customer-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--barn-red);
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 700;
}

.customer-info {
    flex: 1;
}

.customer-name {
    font-weight: 600;
    color: var(--charcoal);
}

.customer-email {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.customer-loyalty {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--hay);
}

.customer-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ============================================
   RECEIPT MODAL
   ============================================ */
.receipt-success {
    text-align: center;
    padding: var(--space-xl);
}

.receipt-success i {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: var(--space-md);
}

.receipt-success h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--charcoal);
    margin-bottom: var(--space-md);
}

.receipt-total {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--barn-red);
}

.receipt-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-md);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

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

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--charcoal);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

/* ============================================
   TABLET/DESKTOP BREAKPOINTS
   ============================================ */
@media (min-width: 768px) {
    .pos-main {
        flex-direction: row;
    }

    .products-section {
        flex: 1;
    }

    .cart-section {
        width: var(--cart-width);
        max-height: none;
        border-top: none;
        border-left: 3px solid var(--barn-red);
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .product-card {
        min-height: 140px;
        padding: var(--space-lg);
    }

    .product-image,
    .product-icon {
        width: 70px;
        height: 70px;
    }
}

@media (min-width: 1024px) {
    :root {
        --cart-width: 420px;
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
    }

    .pos-header,
    .category-tabs,
    .search-bar,
    .cart-actions,
    .side-menu,
    .menu-overlay,
    .modal {
        display: none !important;
    }
}

/* ============================================
   DARK MODE (optional, triggered by class)
   ============================================ */
body.dark-mode {
    --cream: #1A1A1A;
    --cream-dark: #2A2A2A;
    --white: #252525;
    --off-white: #1F1F1F;
    --charcoal: #F0F0F0;
    --slate: #CCCCCC;
    --medium-gray: #888888;
    --light-gray: #404040;
}
