/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Cambria', serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Overlay */
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

.bg-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Main Page Styles */
.main-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}


.contact-info {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.45);
  padding: 8px 16px;
  border-radius: 8px;
}

.contact-info a {
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.main-title {
  font-size: 6rem;
  color: #f4d03f;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.7), 3px 3px 6px rgba(0, 0, 0, 0.8);
  -webkit-text-stroke: 1.5px #8a5a10;
  margin-bottom: 0.5rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.location-text {
  font-size: 1.6rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.9);
  margin-bottom: 2rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.main-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.btn {
  padding: 18px 60px;
  font-size: 1.8rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  min-width: 280px;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  color: #2c1810;
  border: 2px solid #b8960f;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
  color: #ffffff;
  border: 2px solid #6b3410;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Content Card */
.content-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  margin: 40px auto;
  max-width: 900px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.page-title {
  font-size: 2.5rem;
  color: #2c1810;
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 3px solid #d4af37;
  padding-bottom: 1rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 1.1rem;
  color: #2c1810;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: #ffffff;
  color: #2c1810;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #b8960f;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.form-group input.error,
.form-group select.error {
  border-color: #dc3545;
}

/* Square Web Payments SDK card field container (checkout) */
#card-container {
  padding: 12px 16px;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: #ffffff;
  min-height: 40px;
}

/* Discount Code (Checkout) */
.discount-code-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.discount-code-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1.1rem;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: #ffffff;
  color: #2c1810;
  transition: border-color 0.3s ease;
}

.discount-code-input:focus {
  outline: none;
  border-color: #b8960f;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.btn-discount {
  padding: 12px 32px;
  font-size: 1.1rem;
  min-width: 0;
  border-radius: 8px;
}

.error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: block;
}

.required {
  color: #dc3545;
}

/* Product Selection */
.product-selector {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 2rem;
}

.product-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1.5fr auto;
  gap: 15px;
  align-items: end;
  margin-bottom: 1rem;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.product-row > div {
  /* Grid items default to min-width: auto, which blocks shrinking below the select's content size */
  min-width: 0;
}

.product-row select {
  width: 100%;
  min-width: 0;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: white;
  color: #2c1810;
}

.product-row select:disabled {
  background: #f8f9fa;
  cursor: not-allowed;
}

/* Price select is read-only display only, so hide the native dropdown arrow */
#priceDisplay,
#cateringPriceDisplay {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.add-to-cart-hint {
  color: #dc3545;
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
}

.add-btn, .remove-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.add-btn {
  background: #28a745;
  color: white;
}

.add-btn:hover {
  background: #218838;
  transform: scale(1.1);
}

.remove-btn {
  background: #dc3545;
  color: white;
}

.remove-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* Cart */
.cart {
  background: #ffffff;
  border-radius: 15px;
  padding: 25px;
  margin-top: 2rem;
  border: 3px solid #d4af37;
}

.cart-title {
  font-size: 1.8rem;
  color: #2c1810;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #d4af37;
  padding-bottom: 0.5rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #d4af37;
}

.cart-item:hover {
  background: #e9ecef;
}

.cart-empty {
  text-align: center;
  color: #6c757d;
  padding: 2rem;
  font-style: italic;
}

.cart-total {
  border-top: 3px solid #2c1810;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  font-weight: bold;
  color: #2c1810;
  margin-bottom: 0.5rem;
}

/* Alert Messages */
.alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 2px solid #ffc107;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #dc3545;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 2px solid #28a745;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 2px solid #17a2b8;
}

/* Calendar */
.calendar {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-top: 2rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #d4af37;
}

.calendar-header h3 {
  font-size: 1.5rem;
  color: #2c1810;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-nav button {
  padding: 8px 15px;
  background: #d4af37;
  color: #2c1810;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.calendar-nav button:hover {
  background: #b8960f;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.calendar-day-header {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  color: #2c1810;
  background: #f8f9fa;
  border-radius: 5px;
}

.calendar-day {
  aspect-ratio: 1;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  position: relative;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
  border-color: #d4af37;
  background: #fff9e6;
  transform: scale(1.05);
}

.calendar-day.selected {
  background: #4a90e2;
  color: white;
  border-color: #2e5f99;
  font-weight: bold;
}

.calendar-day.disabled {
  background: #e9ecef;
  color: #adb5bd;
  cursor: not-allowed;
}

.calendar-day.other-month {
  color: #ced4da;
  background: #f8f9fa;
  cursor: default;
}

.calendar-day.past {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.day-number {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.day-availability {
  font-size: 0.7rem;
  color: #28a745;
  margin-top: 5px;
  line-height: 1.2;
  word-wrap: break-word;
}

.day-availability.limited {
  color: #ffc107;
}

.day-availability.full {
  color: #dc3545;
}

.day-availability.day-off {
  color: #adb5bd;
  font-style: italic;
}

/* Override the status colors with white when the day is selected, since the blue background makes them unreadable */
.calendar-day.selected .day-availability,
.calendar-day.selected .day-availability.limited,
.calendar-day.selected .day-availability.full,
.calendar-day.selected .day-availability.day-off {
  color: #ffffff;
}

/* Mobile-friendly calendar alternative: a date dropdown + availability caption, shown in place of the grid on small screens */
.calendar-mobile-select {
  display: none;
  text-align: center;
}

.calendar-mobile-select label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c1810;
}

.calendar-mobile-select select {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: block;
  padding: 12px;
  font-size: 1rem;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: white;
  color: #2c1810;
}

.calendar-mobile-select .day-availability {
  margin-top: 0.75rem;
  font-size: 1rem;
}

/* Delivery Type Selection */
.delivery-type-selector {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin: 2rem 0;
  text-align: center;
}

.delivery-type-selector h3 {
  font-size: 1.8rem;
  color: #2c1810;
  margin-bottom: 1.5rem;
}

.delivery-options {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.delivery-option {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 30px;
  border: 3px solid #d4af37;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.delivery-option:hover {
  background: #fff9e6;
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.delivery-option.selected {
  background: #d4af37;
  color: white;
  border-color: #b8960f;
}

.delivery-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.delivery-option input[type="radio"] {
  display: none;
}

.delivery-option-label {
  font-size: 1.5rem;
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

.delivery-option-description {
  font-size: 0.95rem;
  opacity: 0.9;
}

.delivery-min-notice {
  color: #dc3545;
  font-weight: bold;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.delivery-radius-notice {
  color: #dc3545;
  font-weight: bold;
  font-size: 1.15rem;
  margin-top: 1rem;
}

.min-delivery-notice {
  color: #dc3545;
  font-weight: bold;
  margin-bottom: 1rem;
}

/* Order Summary */
.order-summary {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 2rem;
}

.summary-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;
}

.summary-section:last-child {
  border-bottom: none;
}

.summary-section h3 {
  font-size: 1.5rem;
  color: #2c1810;
  margin-bottom: 1rem;
  color: #d4af37;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 1.1rem;
}

.summary-row strong {
  color: #2c1810;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.summary-table th,
.summary-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.summary-table th {
  background: #f8f9fa;
  color: #2c1810;
  font-weight: bold;
}

.summary-table tr:hover {
  background: #f8f9fa;
}

/* Admin Dashboard */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-header .page-title {
  margin-bottom: 0;
}

.admin-header #logoutBtn {
  min-width: 0;
  padding: 10px 24px;
}

.add-product-form {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 1.5rem;
}

.admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-form-row > div {
  flex: 1;
  min-width: 160px;
}

.admin-form-row label {
  display: block;
  font-size: 1.05rem;
  color: #2c1810;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.admin-form-row input,
.admin-form-row select {
  width: 100%;
  padding: 10px;
  border: 2px solid #d4af37;
  border-radius: 8px;
  font-size: 1.05rem;
  color: #2c1810;
  background: #ffffff;
}

.admin-form-row select {
  cursor: pointer;
}

.admin-form-row input:focus,
.admin-form-row select:focus {
  outline: none;
  border-color: #b8960f;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.admin-total-highlight {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: #fff9e6;
  font-size: 1.3rem;
  font-weight: bold;
  color: #b8860b;
  margin-bottom: 1.25rem;
}

.add-product-form .btn {
  min-width: 0;
  padding: 10px 24px;
  font-size: 1rem;
}

.admin-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-tab-btn {
  min-width: 0;
  padding: 10px 24px;
}

.admin-tab-btn.active {
  background: #d4af37;
  color: white;
}

.admin-tab-panel.hidden {
  display: none;
}

.admin-table input[type="number"] {
  padding: 6px 8px;
  border: 2px solid #d4af37;
  border-radius: 6px;
}

/* Admin dashboard needs a much wider canvas so the Orders & Refunds table can fit */
.admin-page-container {
  max-width: 1700px;
}

.admin-content-card {
  max-width: 1700px;
  width: 100%;
}

.table-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table-scroll-top {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
}

.table-scroll-top > div {
  height: 1px;
}

/* Toggle switch used for enabling/disabling individual calendar dates in the admin schedule tab */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #dc3545;
  transition: 0.3s;
  border-radius: 24px;
}

.switch .slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #28a745;
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Payment Section */
.payment-section {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-top: 2rem;
}

.payment-section h3 {
  font-size: 1.8rem;
  color: #2c1810;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #d4af37;
  padding-bottom: 0.5rem;
}

.card-element {
  padding: 15px;
  border: 2px solid #d4af37;
  border-radius: 8px;
  background: white;
  margin-bottom: 1rem;
}

/* Button Groups */
.button-group {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-success {
  background: #28a745;
  color: white;
  border: 2px solid #1e7e34;
}

.btn-success:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-2px);
}

.btn-danger {
  background: #dc3545;
  color: white;
  border: 2px solid #bd2130;
}

.btn-danger:hover {
  background: #c82333;
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-back {
  background: #6c757d;
  color: white;
  border: 2px solid #545b62;
}

.btn-back:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

/* Loading Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #d4af37;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  text-align: center;
}

.loading-content p {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #2c1810;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fefefe;
  padding: 40px;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  font-size: 1.8rem;
  color: #2c1810;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #d4af37;
  padding-bottom: 0.5rem;
}

.modal-body {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: #495057;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-footer .btn {
  min-width: 100px;
  flex-shrink: 0;
}

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.time-slot {
  padding: 15px 10px;
  background-color: #fff;
  border: 2px solid #d4af37;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  color: #2c1810;
  text-align: center;
}

.time-slot:hover:not(.unavailable) {
  background-color: #d4af37;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.time-slot.unavailable {
  background-color: #f5f5f5;
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.time-slot small {
  font-size: 0.75rem;
  font-style: italic;
}

/* Address Suggestions */
.address-suggestion {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
  background: white;
  transition: all 0.2s ease;
}

.address-suggestion:hover {
  background-color: #f0f0f0;
  border-color: #d4af37;
  transform: translateX(5px);
}

/* Textarea Styles */
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: #2c1810;
  background: white;
  resize: vertical;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #d4af37;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-title {
    font-size: 3.5rem;
    padding: 0 20px;
  }

  .location-text {
    font-size: 1.3rem;
  }

  .btn {
    font-size: 1.5rem;
    padding: 15px 40px;
    min-width: 240px;
  }
  
  .time-slots {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .time-slot {
    padding: 12px 8px;
    font-size: 0.9rem;
  }

  .content-card {
    padding: 25px;
    margin: 20px 10px;
  }

  .page-title {
    font-size: 2rem;
  }

  /* Prevent Previous/Next + month title from overflowing narrow screens (flex items don't shrink by default) */
  .calendar-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }

  .product-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-row > div {
    text-align: center;
  }

  .product-row select {
    max-width: 280px;
    margin: 0 auto;
    display: block;
    font-size: 0.9rem;
  }

  /* Stack filter fields so a wrapping label can't crowd the field beside it */
  .admin-form-row {
    flex-direction: column;
  }

  .admin-form-row > div {
    min-width: 0;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
  }

  .calendar-day {
    padding: 5px;
    font-size: 0.85rem;
  }

  .day-number {
    font-size: 1rem;
  }

  .day-availability {
    font-size: 0.6rem;
  }

  .delivery-options {
    flex-direction: column;
    align-items: center;
  }

  .delivery-option {
    max-width: 100%;
  }

  .summary-row {
    flex-direction: column;
    gap: 5px;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
  }

  .modal-content {
    width: 95%;
    padding: 25px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

@media (max-width: 653px) {
  /* Swap the calendar grid for a dropdown + caption once days no longer fit legibly; keep month navigation */
  .calendar-grid {
    display: none;
  }

  .calendar-mobile-select {
    display: block;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
  }
}

@media (max-width: 638px) {
  .discount-code-row {
    flex-direction: column;
  }

  .btn-discount {
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Hero photos are wide/landscape; on tall narrow screens "cover" crops in tight,
     so re-center on each photo's food cluster instead of the geometric middle */
  .bg-catering,
  .bg-checkout {
    background-position: 25% center;
  }

  .bg-calendar {
    background-position: 72% center;
  }

  .main-title {
    font-size: 2.75rem;
  }

  .location-text {
    font-size: 1.1rem;
  }

  .btn {
    font-size: 1.25rem;
    padding: 12px 30px;
    min-width: 200px;
  }

  .content-card {
    padding: 20px;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .product-row select {
    font-size: 0.8rem;
    padding: 8px;
  }

  .calendar-day {
    padding: 3px;
    font-size: 0.75rem;
  }

  .day-number {
    font-size: 0.9rem;
  }

  .day-availability {
    display: none;
  }

  .calendar-mobile-select .day-availability {
    display: block;
  }
}

/* Print Styles */
@media print {
  .btn, .button-group, .calendar-nav {
    display: none;
  }

  .content-card, .order-summary {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}
