/* static/cart.css - Styles for AgroScan Smart Cart */

.cart-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 12px 48px;
}

.cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cart-title-block h1 {
  margin: 0 0 6px 0;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-count-pill {
  font-size: 14px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 4px 10px;
  border-radius: 999px;
}

.cart-header-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.4;
}

.cart-clear-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-clear-btn:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Duplicate items alert banner and card highlight */
.cart-duplicate-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
}

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

.duplicate-banner-text {
  font-size: 13.5px;
  color: #92400e;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-card.is-duplicate-card {
  border-color: #f59e0b;
  background: #fffdfa;
  box-shadow: 0 0 0 1.5px rgba(245, 158, 11, 0.2);
}

.badge-duplicate-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

/* Smart Delivery / Compact Optimizer Bar */
.cart-optimizer-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: none;
}

.cart-optimizer-banner.is-single-store {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.optimizer-compact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.optimizer-compact-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.optimizer-compact-badge.is-amber {
  background: #fef3c7;
  color: #b45309;
}

.optimizer-compact-title {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

.optimizer-compact-title b {
  color: #0f172a;
  font-weight: 700;
}

.optimizer-compact-warning {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 4px;
}

.optimizer-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-compact-change,
.btn-compact-optimize {
  background: #16a34a;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-compact-change:hover,
.btn-compact-optimize:hover {
  background: #15803d;
}

.btn-compact-reset {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-compact-reset:hover {
  background: #f8fafc;
  color: #dc2626;
  border-color: #fecaca;
}

/* Cart Grid Layout */
.cart-layout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .cart-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Items List */
.cart-items-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cart-item-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-item-card.is-missing {
  background: #fffbeb;
  border-color: #fde68a;
}

.cart-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #f1f5f9;
}

.cart-item-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item-details {
  min-width: 0;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-name:hover {
  color: #16a34a;
}

.cart-item-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cart-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.cart-badge.badge-pack {
  background: #e0f2fe;
  color: #0369a1;
}

.cart-item-store-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #15803d;
  font-weight: 600;
}

.cart-item-store-chip.is-unavailable {
  color: #d97706;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Stepper */
.cart-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.stepper-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.stepper-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.stepper-val {
  width: 34px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Price & Delete */
.cart-item-price-block {
  text-align: right;
  min-width: 90px;
}

.cart-item-total-price {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.cart-item-unit-price {
  font-size: 12px;
  color: #94a3b8;
}

.cart-item-remove-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1;
}

.cart-item-remove-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

@media (max-width: 640px) {
  .cart-item-card {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }
  .cart-item-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed #f1f5f9;
  }
}

/* Right Column: Summary & Checkout */
.cart-sidebar-sticky {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart-summary-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.cart-summary-box h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14.5px;
  color: #475569;
  margin-bottom: 10px;
}

.summary-row.is-savings {
  color: #16a34a;
  font-weight: 700;
  background: #f0fdf4;
  padding: 6px 10px;
  border-radius: 8px;
  margin-top: 4px;
}

.summary-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 14px 0;
}

.summary-shipping-note {
  font-size: 11.5px;
  color: #64748b;
  margin-top: -6px;
  margin-bottom: 8px;
  line-height: 1.35;
}

.summary-post-note {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
  margin-top: 8px;
  line-height: 1.35;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-total-label {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.summary-total-value {
  font-size: 26px;
  font-weight: 900;
  color: #16a34a;
}

.btn-sidebar-optimizer {
  width: 100%;
  background: #f0fdf4;
  color: #15803d;
  border: 1.5px solid #86efac;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 16px;
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  margin-top: 16px;
}

.btn-sidebar-optimizer:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
  transform: translateY(-1px);
}

.btn-sidebar-optimizer.is-change {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.btn-sidebar-optimizer.is-change:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.btn-item-change-store {
  background: transparent;
  border: none;
  color: #16a34a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: underline;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.btn-item-change-store:hover {
  color: #15803d;
  background: #f0fdf4;
}

/* 1-Click Checkout Box */
.cart-checkout-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.cart-checkout-box h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.checkout-form-group {
  margin-bottom: 12px;
}

.checkout-form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.checkout-form-group input,
.checkout-form-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  font-size: 14.5px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.checkout-form-group input:focus,
.checkout-form-group textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.checkout-btn-submit {
  width: 100%;
  background: #16a34a;
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.checkout-btn-submit:hover:not(:disabled) {
  background: #15803d;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
  transform: translateY(-1px);
}

.checkout-btn-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.checkout-guarantee {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Empty State */
.cart-empty-state {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  max-width: 640px;
  margin: 30px auto;
}

.cart-empty-icon {
  font-size: 54px;
  margin-bottom: 12px;
}

.cart-empty-state h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.cart-empty-state p {
  color: #64748b;
  font-size: 15px;
  margin: 0 0 24px 0;
}

.cart-empty-cats {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================================
   Optimizer Modal Popup
   ========================================================================= */
.agro-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.agro-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.agro-modal-container {
  background: #ffffff;
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.agro-modal-backdrop.is-open .agro-modal-container {
  transform: translateY(0) scale(1);
}

.agro-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
}

.agro-modal-header h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.agro-modal-header p {
  margin: 0;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.4;
}

.agro-modal-close-btn {
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.agro-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.agro-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

/* Store Option Cards in Modal */
.store-option-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.15s ease;
}

.store-option-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.store-option-card.is-best-deal {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
  background: #fafffb;
}

.store-option-card.is-selected-store {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.store-card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-card-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.store-card-name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.badge-match-full {
  font-size: 12px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-match-partial {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-best-price {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  background: #16a34a;
  padding: 2px 7px;
  border-radius: 4px;
}

.store-card-missing-note {
  font-size: 12.5px;
  color: #b45309;
  background: #fffbeb;
  border: 1px dashed #fde68a;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.35;
}

.store-card-meta-notes {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-card-pricing-action {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 170px;
}

.store-card-total {
  font-size: 21px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.store-card-shipping-note {
  font-size: 12px;
  color: #64748b;
}

.store-card-savings-pill {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.btn-choose-store {
  background: #16a34a;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-choose-store:hover {
  background: #15803d;
}

.btn-choose-store.is-active {
  background: #e2e8f0;
  color: #475569;
  cursor: default;
}

@media (max-width: 600px) {
  .store-option-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .store-card-pricing-action {
    align-items: flex-start;
    text-align: left;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
  }
}

/* Order History Button in Header */
.cart-history-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-history-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Enhanced Receipt Card */
.order-receipt-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 680px;
  margin: 30px auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.receipt-badge-top {
  text-align: center;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.receipt-success-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.receipt-badge-top h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.receipt-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.receipt-order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.meta-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.meta-value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.order-id-highlight {
  font-family: monospace;
  color: #16a34a;
  font-size: 15px;
}

.meta-badge-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 2px;
}

/* Telegram & Print Actions Bar */
.receipt-actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-receipt-tg {
  flex: 1;
  min-width: 220px;
  background: #229ed9;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
  transition: all 0.18s ease;
}

.btn-receipt-tg:hover {
  background: #1b8fc5;
  transform: translateY(-1px);
}

.btn-receipt-action {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 13.5px;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-receipt-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Receipt Items */
.receipt-items-container {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-bottom: 20px;
}

.receipt-items-container h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
}

.receipt-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-item-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
}

.receipt-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.receipt-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.receipt-item-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
}

.receipt-item-sub {
  font-size: 12px;
  color: #64748b;
}

.receipt-item-price {
  font-weight: 800;
  font-size: 15px;
  color: #0f172a;
  text-align: right;
  white-space: nowrap;
}

/* Receipt Summary Footer */
.receipt-summary-footer {
  border-top: 1px dashed #cbd5e1;
  padding-top: 16px;
  margin-bottom: 20px;
}

.receipt-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #475569;
  margin-bottom: 8px;
}

.sum-bold {
  font-weight: 700;
  color: #0f172a;
}

.receipt-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 12px 0;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.receipt-grand-total {
  font-size: 24px;
  font-weight: 900;
  color: #16a34a;
}

.receipt-post-note {
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
  margin-top: 8px;
}

.receipt-customer-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.receipt-bottom-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* History Modal Items */
.history-order-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #ffffff;
  transition: all 0.15s ease;
}

.history-order-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history-card-id {
  font-family: monospace;
  font-weight: 800;
  color: #16a34a;
  font-size: 14.5px;
}

.history-card-date {
  font-size: 12px;
  color: #64748b;
}

.history-card-body {
  font-size: 13px;
  color: #334155;
  margin-bottom: 10px;
  line-height: 1.4;
}

.history-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@media print {
  body * {
    visibility: hidden;
  }
  #orderReceiptBox, #orderReceiptBox * {
    visibility: visible;
  }
  #orderReceiptBox {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .receipt-actions-bar, .receipt-bottom-nav, .cart-header, .breadcrumbs, .site-header, .site-footer {
    display: none !important;
  }
}
