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

html,
body,
button,
input,
select,
textarea {
  font-family: 'Prompt', sans-serif;
}

html,
body {
  background: #F5F0EB;
  color: #333;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Modal Popup Effect for page-customize when editing */
#page-customize.modal-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#page-customize.modal-mode .customize-hero {
  display: block !important;
  border-radius: 20px 20px 0 0;
  margin: -20px -20px 0 -20px;
  height: 80px;
}

#page-customize.modal-mode .page-body {
  background: #FFF;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  height: auto;
  max-height: 85vh;
  position: relative;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 0;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-customize.modal-mode .page-body > div:nth-child(2) {
  padding: 20px 20px 10px 20px !important;
  overflow-y: auto;
  flex: 1;
}

#page-customize.modal-mode > div:nth-child(2) {
   /* The container wrapping customize-header-card and customize-form */
   padding: 0 !important;
}

#page-customize.modal-mode .customize-header-card {
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin-top: 0;
  margin-bottom: 20px;
  display: block;
  text-align: center;
  min-height: auto;
}

#page-customize.modal-mode .customize-title {
  padding-right: 0;
  font-size: 1.25rem;
  margin-bottom: 15px;
}

#page-customize.modal-mode .customize-floating-img-box {
  position: static;
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border: 2px solid #FFF;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#page-customize.modal-mode .customize-img-wrapper img {
  border-radius: 50%;
}

#page-customize.modal-mode .bottom-actions {
  position: static !important;
  background: #FFF !important; /* Force white background for buttons */
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 12px !important;
  padding: 10px 20px 20px 20px !important;
  box-shadow: 0 -10px 20px rgba(0,0,0,0.03) !important;
  margin-top: auto !important;
  border-radius: 0 0 20px 20px !important;
}

#page-customize.modal-mode .btn-yellow-edit {
  background: #FFC107 !important;
  color: #333 !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  border-radius: 25px !important;
  padding: 16px !important;
  box-shadow: none !important; /* Remove glow */
  border: 2px solid rgba(0, 0, 0, 0.05) !important;
  flex: 1 !important;
  transform: translateY(0);
}

#page-customize.modal-mode .btn-gray-edit {
  background: #E0E0E0 !important;
  color: #666 !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  border-radius: 25px !important;
  padding: 16px !important;
  box-shadow: none !important; /* Remove glow */
  border: 2px solid rgba(0, 0, 0, 0.05) !important;
  flex: 1 !important;
  transform: translateY(0);
}

#page-customize.modal-mode .btn-yellow-edit:active,
#page-customize.modal-mode .btn-gray-edit:active {
  transform: scale(0.98);
}

/* Hide cart summary when edit modal is active to prevent overlap */
#page-customize.active ~ #page-cart .cart-summary-fixed {
  display: none !important;
}

#edit-mode-title {
  color: #FFC107;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  padding-top: 15px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  letter-spacing: 1px;
}

/* ===== PAGE SYSTEM ===== */
.page {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ===== TOP BAR (Hidden) ===== */
.top-bar {
  display: none !important;
}

/* ===== HERO SECTION (Red Theme) ===== */
.hero-section {
  text-align: center;
  padding: 20px 16px 14px;
  background: #C62828;
  /* Red Background */
  color: #fff;
  border-bottom: none;
}

.shop-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shop-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4px;
  font-weight: 400;
}

/* ===== TAB BAR (Yellow Theme) ===== */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #FFE082;
  /* Yellow Background */
  border-bottom: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tab {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ===== ACTIVE TAB (Original Yellow Theme) ===== */
.active-tab {
  background: #fff;
  color: #C62828;
  border: 2px solid #C62828;
  font-weight: 700;
}

.table-selector-wrapper {
  position: relative;
  flex: 1;
}

.table-selector-wrapper select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #C62828;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 30px 8px 16px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.table-selector-wrapper select:focus {
  outline: none;
}

.table-select-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 0.7rem;
  pointer-events: none;
}

/* Red Circle Receipt Button */
.btn-receipt-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #C62828;
  border: 2px solid #fff;
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

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

/* ===== CUSTOMIZE PAGE HEADER (NEW DESIGN) ===== */
.customize-hero {
  position: relative;
  height: 120px;
  background: #C62828;
  /* Red background acting as base */
}

.customize-hero-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
}

.customize-header-card {
  background: #EAE6DF;
  border-radius: 30px 30px 0 0;
  padding: 30px 20px 20px;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
  margin-top: -60px;
  /* Pull it up over the red hero */
  z-index: 10;
}

.customize-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #000;
  margin: 0;
  flex: 1;
  padding-right: 120px;
  /* Space for the floating image */
}

/* Back button specific for this header */
.btn-back-floating-sm {
  position: absolute;
  top: -70px;
  left: 15px;
  /* Positioned inside the red hero */
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  /* White back button on red background */
  cursor: pointer;
  z-index: 20;
}

.customize-floating-img-box {
  position: absolute;
  right: 20px;
  top: -50px;
  /* Float up over the card edge */
  width: 100px;
  height: 100px;
  z-index: 100;
}

.customize-img-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: #fff;
  padding: 4px;
  /* Creates the border effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #FDDD5C;
  /* Yellow border */
  z-index: 100;
}

.customize-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  border-radius: 16px;
  /* Inner radius matching the border */
  display: block;
  /* Ensure no image stretching bugs */
}

.customize-price-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  color: #000;
  font-size: 1.1rem;
  font-weight: 700;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  z-index: 20;
}

/* ===== PAGE BODY ===== */
.page-body {
  flex: 1;
  padding: 12px 14px;
  padding-bottom: 90px;
  overflow-y: auto;
}

.page-body-with-bottom {
  padding-bottom: 90px;
}

/* ===== MENU LIST ===== */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-card {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.menu-card:active {
  transform: scale(0.98);
  border-color: #FFC107;
  background: #FFFDE7;
}

.menu-img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid #FFC107;
}

.menu-img-wrap {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #FFC107;
}

.menu-food-img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
}

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

.menu-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 1px;
}

.menu-price-text {
  font-size: 0.82rem;
  color: #C62828;
  font-weight: 600;
}

.menu-desc {
  font-size: 0.72rem;
  color: #888;
  margin-top: 1px;
  width: 105px; /* Increased to accommodate content */
  text-align: left;
  flex-shrink: 0;
  line-height: 1.3;
}

.desc-line {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desc-main {
  width: 50px; /* Fixed width to align "+" */
  display: inline-block;
  flex-shrink: 0;
}

.desc-plus {
  width: 10px;
  text-align: center;
  color: #bbb;
}

.desc-extra {
  flex: 1;
}

/* ===== BOTTOM CART BAR (YELLOW THEME) ===== */
.bottom-cart-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 420px;
  background: #FDD835;
  /* Yellow Background */
  color: #fff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 999;
}

.bottom-cart-bar:active {
  transform: translateX(-50%) scale(0.98);
  background: #FBC02D;
}

.bottom-cart-icon {
  font-size: 1.3rem;
  background: transparent !important;
  color: inherit;
  display: inline-block;
}

.bottom-cart-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.bottom-cart-badge {
  background: #C62828;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

/* ===== CUSTOMIZE FORM ===== */
.customize-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  /* Ensure inner elements conform to border radius */
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.section-header {
  background: linear-gradient(135deg, #FFC107, #FFD54F);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px 12px 0 0;
  /* Match the top corners of section-card */
}

.section-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  width: 100%;
}

.section-header .section-hint {
  font-size: 0.68rem;
  color: #666;
}

.section-body {
  padding: 4px 10px;
}

.option-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 9px 4px;
  border-bottom: 1px solid #F5F5F5;
  cursor: pointer;
  transition: background 0.12s;
  gap: 10px;
}

.option-item:last-child {
  border-bottom: none;
}

.option-item:active {
  background: #FFF8E1;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #C62828;
  cursor: pointer;
  flex-shrink: 0;
}

.option-label {
  flex: 1;
  font-size: 0.85rem;
  color: #333;
}

.option-price {
  font-size: 0.75rem;
  color: #C62828;
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 18px;
  padding: 14px 24px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.btn-add {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: #fff;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.btn-add.disabled {
  background: #ccc;
  color: #888;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-cancel {
  background: linear-gradient(135deg, #C62828, #B71C1C);
  color: #fff;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.2);
}

.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px 20px;
  background: #fff;
  display: flex;
  gap: 12px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.bottom-actions .btn {
  flex: 1;
  padding: 14px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 0.82rem;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10000;
  white-space: nowrap;
  pointer-events: none;
  /* Prevent blocking clicks when hidden */
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== CART PAGE STYLES (New) ===== */
.cart-table-wrapper {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cart-table thead tr {
  background: #E0E0E0;
}

.cart-table th {
  padding: 10px;
  font-size: 0.9rem;
  color: #333;
  font-weight: 600;
}

.cart-table-row td {
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.cart-table-row:last-child td {
  border-bottom: none;
}

.td-item {
  width: 72%;
}

.item-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
}

.item-index {
  position: absolute;
  top: -4px;
  left: -4px;
  background: #fff;
  color: #333;
  font-size: 0.85rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  border: 1px solid #eee;
  z-index: 2;
}

.item-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.item-edit-tag {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFA000;
  text-align: center;
  margin-top: 4px;
  display: block;
  width: 56px;
}

@keyframes highlightRow {
  0% { background: #FFF9C4; }
  100% { background: transparent; }
}

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

.item-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #222;
  margin-bottom: 4px;
  line-height: 1.25;
}

.cart-row-details {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.3;
}

.td-price {
  text-align: right;
  width: 28%;
  font-weight: 600;
  font-size: 0.9rem;
}

.td-qty {
  text-align: center;
  width: 25%;
}

.qty-control-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f5f5f5;
  margin-bottom: 8px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.qty-control-pill button {
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-control-pill span {
  width: 24px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}

.btn-trash-red {
  background: #C62828;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin: 0 auto;
  box-shadow: 0 2px 5px rgba(198, 40, 40, 0.3);
}

.btn-back-circle-red {
  background: #C62828;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-summary-fixed {
  position: fixed;
  bottom: 22px;
  width: calc(100% - 40px);
  max-width: 360px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 1050;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

.cart-summary-fixed > * {
  pointer-events: auto;
}

.summary-box-white {
  background: #fff;
  border-radius: 30px;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #333;
}

.btn-green-full {
  background: #4CAF50;
  /* Green */
  color: #fff;
  width: 100%;
  padding: 15px;
  border-radius: 50px;
  border: none;
  font-size: 1.1rem;
  font-weight: 800 !important; /* Force extra bold */
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.35);
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  text-align: center;
}

.btn-yellow-cart-more {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 800 !important; /* Force extra bold */
  border: none;
  border-radius: 50px;
  background: #FFC107;
  color: #333;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.25);
  transition: all 0.2s;
  display: block;
  text-align: center;
}

.btn-green-full:active, .btn-yellow-cart-more:active {
  transform: scale(0.97);
}

.red-footer-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: #C62828;
  z-index: 1001;
}

/* ===== RECEIPT PAGE STYLE ===== */
.receipt-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 16px;
}

.receipt-header-info {
  margin-bottom: 12px;
  color: #333;
}

.receipt-header-info div {
  margin-bottom: 2px;
}

.receipt-label-box {
  background: #fff;
  color: #333;
  font-weight: 700;
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.receipt-items-table {
  width: 100%;
}

.receipt-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-col-img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  margin-right: 10px;
  flex-shrink: 0;
  overflow: hidden;
  background: #fce4ec;
}

.receipt-col-info {
  flex: 1;
}

.receipt-col-price {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
  min-width: 60px;
}

.receipt-col-qty {
  font-weight: 700;
  font-size: 1.1rem;
  margin-left: 12px;
  min-width: 24px;
  text-align: center;
}

.receipt-item-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.receipt-item-detail {
  font-size: 0.72rem;
  color: #888;
}

.receipt-total-box {
  background: #E3F2FD;
  color: #1976D2;
  border-radius: 30px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-back-floating {
  position: fixed;
  bottom: 30px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: #C62828;
  border: 2px solid #C62828;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 1000;
  padding-bottom: 4px;
  /* Adjust arrow center */
}

.btn-back-floating:active {
  background: #FFEBEE;
}

/* ===== ALERT MODAL ===== */
.alert-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.alert-modal.show {
  display: flex;
}

.alert-modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 90%;
  width: 360px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: bounce 0.5s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Alert Modal Styles (Kept) */

.alert-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #C62828;
  margin-bottom: 15px;
}

.alert-message {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 30px;
}

.alert-btn {
  background: linear-gradient(135deg, #C62828, #B71C1C);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
  font-family: 'Prompt', sans-serif;
  transition: all 0.2s;
}

.alert-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}


/* Legacy responsive block removed */

/* ===== LANDING PAGE PREMIUM ===== */
.landing-page-bg {
  background: #F9F9F9;
}

.landing-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #F9F9F9 0%, #F5F0EB 100%);
}

.landing-brand {
  text-align: center;
  margin-bottom: 20px;
}

.landing-card {
  background: #D7CCC8;
  /* Light Brownish */
  border-radius: 24px;
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.landing-header {
  background: #C62828;
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(198, 40, 40, 0.3);
  position: relative;
  z-index: 2;
}

.landing-body {
  padding: 24px 20px;
  background: #E8DDDA;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.landing-btn {
  background: transparent;
  border: 2px solid #fff;
  border-radius: 50px;
  padding: 8px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Prompt', sans-serif;
  position: relative;
  overflow: hidden;
}

.landing-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.landing-btn:active {
  background: #fff;
  transform: scale(0.95);
  color: #C62828;
}

.btn-takeaway {
  margin-top: 25px;
  background: #fff;
  color: #C62828;
  border: 2px solid #C62828;
  border-radius: 50px;
  padding: 12px 40px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(198, 40, 40, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Prompt', sans-serif;
}

.btn-takeaway:active {
  transform: scale(0.95);
  background: #FFEBEE;
}

.landing-footer {
  margin-top: 30px;
  color: #aaa;
  font-size: 0.8rem;
  font-weight: 300;
}

/* ===== INGREDIENT ICONS ===== */
.ing-icon {
  width: 4em;
  height: 4em;
  vertical-align: middle;
  border-radius: 8px;
  object-fit: cover;
}

.custom-select-option .ing-icon {
  width: 75px;
  /* Huge size to fill the block */
  height: 75px;
  margin-right: 18px;
}

/* ===== DESKTOP RESPONSIVE SYSTEM ===== */
@media (min-width: 768px) {
  /* 1. Body and General Layout */
  body {
    max-width: none;
    margin: 0;
    background-color: #F9F9F9;
    box-shadow: none;
    overflow-x: hidden;
  }

  /* 2. Container for main content */
  .cart-header-sticky,
  .customer-header-fixed,
  .tab-bar {
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    max-width: none !important;
    position: static !important; /* Make static so they don't block content */
  }

  /* Reset padding-top for page-body since headers are static now */
  .page-body {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 20px !important;
    padding-bottom: 280px !important; /* INCREASED: Prevent large bottom bar from covering content, allowing user to scroll past it */
  }

  /* Force eliminate the gap in the cart page specifically */
  #page-cart .page-body {
    padding-top: 15px !important;
  }

  .hero-section > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* section-bar and cart-info-section are now full width */
  .section-bar,
  .cart-info-section {
    max-width: none !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  
  .tab-bar {
    justify-content: center;
  }

  .table-selector-wrapper {
    flex: 0 1 auto;
    min-width: 200px;
  }

  /* 4. Menu List (Grid Layout) */
  .menu-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
  }

  .menu-card {
    margin: 0 !important;
    width: 100% !important;
  }

  /* 5. Edit Item Modal (Larger & Vertically Stacked Categories) */
  #page-customize.modal-mode .page-body {
    max-width: 700px !important;
    max-height: 90vh !important;
    padding-bottom: 0 !important; /* Override the 120px padding for modal */
  }
  
  .customize-form {
    display: grid;
    grid-template-columns: 1fr; /* Categories stacked vertically */
    gap: 20px;
  }

  /* Two columns for radio/checkbox options inside each category */
  .section-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  /* Ensure the container stacks vertically */
  #page-customize.modal-mode .bottom-actions {
    position: static !important;
    background: #FFF !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
    padding: 10px 20px 20px 20px !important;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.03) !important;
    margin-top: auto !important;
    border-radius: 0 0 20px 20px !important;
    transform: none !important; /* Fix translation issue */
  }

  /* Force Cancel button to look right and be on the left */
  #page-customize.modal-mode #btn-cancel-cust {
    display: flex !important;
    flex: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    background: #E0E0E0 !important;
    color: #666 !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    border-radius: 25px !important;
    padding: 16px !important;
    border: 2px solid rgba(0, 0, 0, 0.05) !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 1 !important; /* Force to be left */
  }

  /* Force Save button to look right and be on the right */
  #page-customize.modal-mode #btn-add-cust {
    display: flex !important;
    flex: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    background: #FFC107 !important;
    color: #333 !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    border-radius: 25px !important;
    padding: 16px !important;
    border: 2px solid rgba(0, 0, 0, 0.05) !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 2 !important; /* Force to be right */
  }

  /* Force X button to overlap cleanly */
  #page-customize.modal-mode .page-body {
    overflow: visible !important; /* Allow X to overflow */
  }
  
  #page-customize.modal-mode .btn-close-modal-hero {
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #FFF !important;
    color: #D32F2F !important;
    border: none !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    z-index: 9999 !important;
  }

  /* 6. Bottom Cart Bar (Floating) */
  .bottom-cart-bar {
    width: max-content !important;
    min-width: 320px;
    max-width: 500px !important;
    bottom: 30px !important;
    padding: 14px 40px !important;
    border-radius: 50px !important;
  }

  /* 7. Cart & Checkout Layout */
  .cart-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
  }

  .cart-summary-fixed {
    max-width: 500px !important;
    bottom: 30px !important;
    border-radius: 20px !important;
  }

  .bottom-actions {
    max-width: 700px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 0 0 20px 20px !important;
  }

  .red-footer-strip {
    width: 100% !important;
    max-width: none !important;
    left: 0 !important;
    transform: none !important;
  }

  /* Adjust padding for sticky headers on cart page */
  #page-cart .page-body {
    padding-top: 150px !important;
  }
}
