/* style.css - Premium Dark POS System Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-panel: rgba(20, 26, 42, 0.65);
  --bg-card: rgba(30, 41, 59, 0.45);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --primary: #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --primary-glow: rgba(99, 102, 241, 0.4);
  
  --success: #10b981; /* Emerald */
  --success-glow: rgba(16, 185, 129, 0.4);
  --danger: #f43f5e; /* Rose */
  --warning: #f59e0b; /* Amber */
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #1f2937;
  
  --font-family: 'Inter', 'Noto Sans KR', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Header */
header {
  height: 64px;
  background-color: var(--bg-panel);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  box-shadow: 0 0 15px var(--primary-glow);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success-glow);
  animation: pulse 2s infinite;
}

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

/* Main Container Layout */
.main-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Left Section: Catalog & Products */
.catalog-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-md), 0 0 15px rgba(99, 102, 241, 0.1);
}

.product-card:active {
  transform: translateY(-2px);
}

.product-image-placeholder {
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  position: relative;
  z-index: 2;
  transition: var(--transition-normal);
}

.product-card:hover .product-image-placeholder {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* Right Section: Cart Sidebar */
.cart-section {
  width: 420px;
  background-color: var(--bg-panel);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-count {
  font-size: 12px;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.clear-cart-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.clear-cart-btn:hover {
  color: var(--danger);
}

/* Cart Items List */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-cart-message {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.4;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  animation: slideIn 0.2s ease-out;
}

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

.item-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.item-price {
  font-size: 13px;
  color: var(--text-muted);
}

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

.quantity-control {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.qty-value {
  width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.remove-item-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--danger);
}

/* Cart Summary & Order Actions */
.cart-summary {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
  margin-top: 4px;
}

.total-price {
  color: var(--primary);
  font-size: 22px;
}

/* QR Payment Button */
.qr-pay-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.qr-pay-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-25deg);
  transition: 0.75s;
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 150%; }
}

.qr-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  filter: brightness(1.1);
}

.qr-pay-btn:active {
  transform: translateY(1px);
}

.qr-pay-btn:disabled {
  background: #272f42;
  color: #5b6880;
  cursor: not-allowed;
  box-shadow: none;
}

.qr-pay-btn:disabled::after {
  animation: none;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.15);
  border-radius: 24px;
  width: 400px;
  max-width: 90%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  color: var(--text-main);
}

/* QR Screen Details */
.qr-amount-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.qr-amount-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
}

/* QR Code Wrapper with Laser Line */
.qr-code-wrapper {
  position: relative;
  width: 336px;
  height: 336px;
  background: white;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scanner-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.8), rgba(168, 85, 247, 0.8), transparent);
  box-shadow: 0 0 12px 2px rgba(99, 102, 241, 0.6);
  animation: laserScan 2.5s linear infinite;
  z-index: 5;
}

@keyframes laserScan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* QR Info Text & Timer */
.qr-instruction {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 12px;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warning);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}

.timer-icon {
  font-size: 14px;
}

/* Simulator Actions */
.simulator-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.sim-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sim-btn.primary {
  background: var(--success);
  color: white;
  border: none;
  box-shadow: 0 4px 15px var(--success-glow);
}

.sim-btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sim-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.sim-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Payment Success State (Hidden by default inside modal or replaces content) */
.success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  font-size: 40px;
  box-shadow: 0 0 20px var(--success-glow);
  margin-bottom: 20px;
  animation: scaleCheckmark 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleCheckmark {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-message {
  font-size: 14px;
  color: var(--text-muted);
}

/* QR Loading Spinner & Real Image styles */
.qr-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: fadeIn 0.4s ease-out;
}

/* Receipt Container Styles */
.receipt-container {
  background: #ffffff;
  color: #1f2937;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.receipt-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.receipt-store-name {
  font-weight: 700;
  font-size: 17px;
  color: #111827;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.receipt-info-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: #6b7280;
  font-size: 11px;
  margin-top: 6px;
}

.receipt-divider {
  border-top: 1px dashed #d1d5db;
  margin: 14px 0;
}

.receipt-items-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.receipt-table-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #4b5563;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.receipt-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #374151;
  font-size: 13px;
}

.receipt-item-row .col-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 12px;
  font-weight: 500;
}

.receipt-item-row .col-qty {
  width: 40px;
  text-align: center;
  color: #6b7280;
}

.receipt-item-row .col-price {
  width: 80px;
  text-align: right;
  font-weight: 500;
}

.receipt-summary-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.receipt-summary-row {
  display: flex;
  justify-content: space-between;
  color: #4b5563;
  font-size: 13px;
}

.receipt-summary-row.total {
  color: #111827;
  font-weight: 700;
  font-size: 16px;
  margin-top: 4px;
}

.receipt-summary-row.total span:last-child {
  color: #4f46e5;
  font-size: 18px;
}

.receipt-barcode-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.barcode-lines {
  display: flex;
  height: 32px;
  align-items: stretch;
}

.barcode-lines .bar {
  background-color: #111827;
  margin-right: 2px;
}

.barcode-lines .bar.thin { width: 1px; }
.barcode-lines .bar.medium { width: 2px; }
.barcode-lines .bar.thick { width: 4px; }

.barcode-text {
  font-size: 9px;
  color: #6b7280;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
}

/* Mobile Responsive Media Query */
.cart-header-summary {
  display: none;
}

@media (max-width: 768px) {
  /* Layout modifications */
  header {
    height: 56px;
    padding: 0 16px;
  }
  
  .logo-text {
    font-size: 17px;
  }

  .main-container {
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
  }

  .catalog-section {
    padding: 16px;
    padding-bottom: 86px; /* Space for collapsed bottom sheet (70px + 16px padding) */
    overflow-y: auto;
    flex: 1;
  }

  .category-tabs {
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding-bottom: 20px;
  }

  .product-card {
    padding: 12px;
    border-radius: 12px;
    gap: 8px;
  }

  .product-image-placeholder {
    height: 90px;
    font-size: 32px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-price {
    font-size: 14px;
  }

  /* Bottom Sheet Cart Layout */
  .cart-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Collapsed Height */
    max-height: 85vh;
    border-left: none;
    border-top: 1px solid var(--border-color);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 90;
    background-color: rgba(20, 26, 42, 0.95);
  }

  .cart-section.expanded {
    height: 70%; /* Expanded Height */
  }

  .cart-header {
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    min-height: 70px;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background: rgba(26, 36, 57, 0.98);
  }

  /* Slide indicator bar */
  .cart-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    transition: var(--transition-fast);
  }

  .cart-section.expanded .cart-header::before {
    background: rgba(255, 255, 255, 0.3);
  }

  .cart-header-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
  }

  .cart-header-summary-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 15px;
  }

  /* Display/Hide state adjustments */
  .cart-section.expanded .cart-header-summary {
    display: none;
  }

  .cart-section:not(.expanded) .clear-cart-btn {
    display: none;
  }

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

  .cart-summary {
    padding: 16px 20px;
    background: rgba(12, 17, 30, 0.98);
  }

  .qr-pay-btn {
    padding: 14px;
    font-size: 15px;
  }

  /* Backdrop Layer */
  .cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(4px);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .cart-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Modal responsiveness */
  .modal-container {
    width: 90%;
    padding: 24px;
    border-radius: 20px;
  }

  .qr-code-wrapper {
    width: 260px;
    height: 260px;
    padding: 8px;
    margin-bottom: 16px;
  }

  /* Adjust canvas scale inside the scaled wrapper */
  #qr-canvas {
    width: 236px !important;
    height: 236px !important;
  }

  .qr-amount-value {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .qr-instruction {
    font-size: 12px;
  }

  .timer-box {
    margin-bottom: 20px;
    padding: 5px 10px;
  }

  /* Receipt Modal sizing */
  #qr-success-view.modal-container {
    width: 92%;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .receipt-container {
    padding: 16px;
  }

  .receipt-store-name {
    font-size: 15px;
  }

  .receipt-items-table {
    max-height: 120px;
  }
}

