/* 
 * BROMODIS - Modern Toko Baju Application
 * Design System & Styles
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Design Tokens */
:root {
    /* Colors */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --danger: #EF4444;
    --danger-dark: #DC2626;
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Neutral colors */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: white;
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    border-right: 1px solid var(--gray-200);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background: white;
    padding: var(--space-3) var(--space-4);
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-nav-toggle {
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-brand {
    flex: 1;
    margin-left: var(--space-4);
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.mobile-branch-badge {
    padding: var(--space-1) var(--space-3);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

/* Sidebar Branch Panel (Admin) */
.sidebar-branch-panel {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--gray-100);
}

.panel-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: var(--space-2);
    letter-spacing: 1px;
}

.branch-selector {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.branch-selector:hover {
    border-color: var(--primary);
    background: white;
}

.branch-current-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
}

.branch-caret {
    font-size: 0.7rem;
    color: var(--gray-400);
}

.branch-list-dropdown {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.branch-list-dropdown.active {
    display: flex;
}

.branch-item {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branch-item:hover {
    background: white;
    color: var(--primary);
}

.branch-item.active {
    background: var(--primary);
    color: white;
}

/* Sidebar Branch Info (Kasir) */
.sidebar-branch-info {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.65rem;
    color: var(--gray-400);
    font-weight: 700;
}

.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

.sidebar-header {
    padding: var(--space-8) var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    text-align: center;
}

.sidebar-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-logo:hover {
    transform: scale(1.1) rotate(2deg);
}

/* Sidebar User Section */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-6);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gray-900);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4) 0;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 0.25rem 0.75rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.sidebar-menu a:hover {
    background: var(--gray-50);
    color: var(--gray-900);
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: var(--gray-900);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-menu a.active:hover {
    transform: translateX(5px);
    background: #000;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-100);
}

.sidebar-logout {
    display: block;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.05);
    color: #EF4444;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar-logout:hover {
    background: #EF4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
}

/* Content Wrapper */
.content-wrapper {
    padding: var(--space-8) var(--space-10);
    max-width: 1400px;
    width: 100%;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 15px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 1000;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    .content-wrapper {
        padding: var(--space-4);
    }

    .page-title {
        font-size: 1.5rem;
    }

    .pos-layout {
        grid-template-columns: 2fr 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card.secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.stat-card.danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--space-2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-subtext {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: var(--space-2);
}

/* Buttons */
.btn {
    padding: var(--space-3) var(--space-5);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* Touch Device Adjustments */
@media (hover: none) {
    .btn:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--gray-700);
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

/* Search & Filter Bar */
.filter-bar {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--gray-100);
}

.table th {
    padding: var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.img-preview {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    overflow: hidden;
}

.img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
    max-height: 70vh;
    overflow-y: auto;
    padding: var(--space-2);
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.product-image {
    width: 100%;
    height: 150px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: var(--space-3);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-2);
    color: var(--gray-900);
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: var(--space-2);
}

.product-stock {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: var(--space-3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-900);
}

/* POS Layout */
.pos-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.pos-products {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.pos-cart {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(70px + var(--space-6));
    height: fit-content;
}

/* Cart Items */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: var(--space-6);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
}

.cart-item-info h4 {
    font-size: 0.875rem;
    margin-bottom: var(--space-1);
}

.cart-item-info p {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--gray-200);
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.cart-item-quantity button:hover {
    background: var(--primary);
    color: white;
}

.cart-item-quantity input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: var(--space-1);
}

/* Cart Total */
.cart-total {
    border-top: 2px solid var(--gray-300);
    padding-top: var(--space-4);
    margin-bottom: var(--space-6);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.cart-total-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Payment Method */
.payment-methods {
    margin-bottom: var(--space-6);
}

.payment-option {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--primary);
}

.payment-option input[type="radio"] {
    margin-right: var(--space-3);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Badges */
.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-success {
    background: #D1FAE5;
    color: var(--secondary-dark);
}

.badge-danger {
    background: #FEE2E2;
    color: var(--danger-dark);
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

/* Alerts */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.alert-success {
    background: #D1FAE5;
    color: var(--secondary-dark);
    border-left: 4px solid var(--secondary);
}

.alert-danger {
    background: #FEE2E2;
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-12);
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .pos-cart {
        position: static;
    }

    .navbar-menu {
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Thermal Printer Font Smoothing */
.receipt * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide print template from screen but keep it in DOM for layout prep */
#receipt-template {
    position: absolute;
    left: -9999px;
    top: 0;
    visibility: hidden;
}

/* Receipt Styling */
.receipt {
    font-family: 'Courier New', Courier, monospace;
    width: 300px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    font-size: 14px;
    color: black;
    line-height: 1.2;
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.receipt-logo {
    max-height: 60px;
    width: auto;
    margin-bottom: 5px;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.receipt-header h2 {
    font-size: 1.25rem;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.receipt-info {
    margin-bottom: 10px;
    font-size: 12px;
}

.receipt-info p {
    margin: 2px 0;
}

.receipt-divider {
    border-bottom: 1px dashed #000;
    margin: 8px 0;
}

.receipt-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
}

.receipt-item-name {
    font-weight: 500;
}

.receipt-item-details {
    font-size: 11px;
    color: #333;
}

.receipt-total {
    margin-top: 10px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.total-row.grand-total {
    font-size: 16px;
    font-weight: 900;
    border-top: 1px solid #000;
    padding-top: 5px;
    margin-top: 5px;
}

.receipt-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 11px;
    border-top: 1px dashed #000;
    padding-top: 10px;
}

/* Print Only Styles */
@media print {
    @page {
        margin: 0;
    }

    body>*:not(#receipt-template) {
        display: none !important;
    }

    #receipt-template {
        display: block !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        visibility: visible !important;
    }

    .receipt {
        width: 100% !important;
        max-width: 80mm !important;
        /* Standard Thermal Size */
        padding: 10px 15px !important;
        box-shadow: none !important;
    }

    /* Prevent page breaks inside receipt */
    .receipt-item {
        page-break-inside: avoid;
    }
}

/* Additional Responsive Tweaks */
@media (max-width: 480px) {
    .btn-lg {
        padding: var(--space-3) var(--space-4);
        font-size: 0.875rem;
    }

    .cart-item-quantity input {
        width: 40px;
    }

    .payment-option {
        padding: var(--space-3);
    }

    .product-grid {
        gap: var(--space-2);
        padding: var(--space-1);
    }

    .product-card {
        padding: var(--space-2);
    }

    .product-image {
        height: 100px;
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }

    .product-name {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 0.875rem;
    }
}