/* =========================
   Base
========================= */
:root {
  --bg-card: #ffffff;
  --bg-soft: #f5f5f5;
  --text-main: #2c3e50;
  --text-soft: #7f8c8d;
  --brand: #920e0e;
  --brand-dark: #571d10;
  --accent: #ff7a18;
  --header-height: 75px;
  --controls-height: 180px;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: url(image/الخلفية\ الأساسية\ 2.webp);
  background-attachment: fixed;
  background-repeat: repeat;
  color: var(--text-main);
  font-family: "Segoe UI", "Cairo", "Tajawal", system-ui, sans-serif;
}

body.is-loading,
body.sidebar-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

/* =========================
   Loaders
========================= */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000000001;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255,255,255,0.98), rgba(255,245,245,0.96));
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--brand);
  font-weight: 800;
}

.page-loader__spinner,
.global-loader::before {
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.page-loader__spinner {
  width: 66px;
  height: 66px;
  border: 6px solid rgba(146, 14, 14, 0.14);
  border-top-color: var(--brand);
  border-right-color: #cf2d20;
  box-shadow: 0 0 0 10px rgba(146, 14, 14, 0.05);
}

.global-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
}

.global-loader-overlay.active {
  display: flex;
}

.global-loader {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7a0b0b, #ff3b3b);
  box-shadow: 0 8px 30px rgba(122,11,11,0.35);
}

.global-loader::before {
  content: "";
  width: 48px;
  height: 48px;
  border: 5px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.95);
}

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

/* =========================
   Header
========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header a {
  color: inherit;
}

header button {
  position: relative;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #ffffff;
  color: #333;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

header button:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(146, 14, 14, 0.3);
}

header img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

header img:hover {
  transform: scale(1.05);
}

header h1 {
  margin: 0;
  color: var(--brand);
  font-size: 22px;
  font-weight: 800;
}

.menu-btn,
.cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-btn {
  min-width: 48px;
  padding-inline: 12px;
}

.cart-btn i {
  font-size: 20px;
}

.cart-count-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff3b3b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* =========================
   Sidebar
========================= */
.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  z-index: 1000000;
  width: 320px;
  max-width: calc(100vw - 36px);
  height: 100vh;
  padding: 30px 20px;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  border-left: 4px solid var(--brand);
  box-shadow: -6px 0 25px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.sidebar.active {
  right: 0;
  transform: translateX(0);
}

.sidebar h3 {
  margin: 15px 0 25px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
}

.sidebar .cat,
.cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar .cat {
  margin-bottom: 8px;
  padding: 16px 18px;
  border-left: 3px solid transparent;
  border-radius: 12px;
  color: #555;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sidebar .cat:hover {
  background: #f0f0f0;
  color: var(--text-main);
  border-left-color: var(--brand);
}

.sidebar .cat.active {
  background: linear-gradient(90deg, rgba(146,14,14,0.12), rgba(146,14,14,0));
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 800;
}

.cat-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.cat .arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.cat.open .arrow {
  transform: rotate(180deg);
}

.sub-categories {
  display: none;
  width: 100%;
  margin-top: 6px;
  padding-right: 20px;
}

.cat.open .sub-categories {
  display: block;
}

.sub-cat {
  margin-bottom: 5px;
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.sub-cat:hover {
  background: linear-gradient(135deg, #a0522d, #cd853f);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================
   Menu Tools
========================= */
.menu-tools-shell {
  position: fixed;
  top: var(--header-height);
  left: 50%;
  z-index: 11000;
  width: min(1400px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(240px, 1fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(146,14,14,0.12);
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,246,244,0.98));
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.menu-tools-head {
  min-width: 0;
}

.menu-tools-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(146,14,14,0.08);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.categories-wrapper {
  min-width: 0;
}

.categories-horizontal {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(134,29,8,0.95), rgba(146,14,14,0.95));
  white-space: nowrap;
}

.categories-horizontal::-webkit-scrollbar {
  height: 6px;
}

.categories-horizontal::-webkit-scrollbar-track {
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
}

.categories-horizontal::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
}

.cat-card {
  min-width: max-content;
  width: max-content;
  max-width: none;
  flex: 0 0 auto;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  color: #1f1f1f;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  touch-action: manipulation;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.cat-card span {
  white-space: nowrap;
}

.cat-card:hover {
  background: linear-gradient(135deg, var(--accent), #ff6b00);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(255,122,24,0.3);
}

.cat-card.active {
  background: linear-gradient(135deg, #000000, #2c2c2c);
  color: #ffffff;
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.cat-dropdown {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
}

.dropdown-head .arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.cat-dropdown.open .arrow {
  transform: rotate(180deg);
}

.dropdown-list {
  position: fixed;
  z-index: 13000;
  display: none;
  min-width: 200px;
  max-width: min(280px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - var(--header-height) - 24px));
  overflow: hidden;
  overflow-y: auto;
  border: 2px solid var(--brand);
  border-radius: 12px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cat-dropdown.open .dropdown-list {
  display: block;
}

.dropdown-item {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  color: #000000;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.dropdown-item:hover {
  background: #7a2e2e;
  color: #ffffff;
}

.search-bar--embedded {
  min-width: 0;
}

.search-bar--embedded .filters {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(146,14,14,0.1);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.search-bar--embedded .filters > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.search-input,
.filter-input {
  outline: none;
  transition: transform 0.18s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.search-input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  background: #fafafa;
  color: var(--text-main);
  font-size: 15px;
}

#clearSearchBtn {
  flex: 0 0 auto;
  min-height: 42px;
  background: #f1f1f1;
  color: #777777;
  box-shadow: none;
}

#clearSearchBtn:hover {
  background: var(--brand);
  color: #ffffff;
}

.price-filters {
  direction: ltr;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.price-filters .dash {
  padding: 0 2px;
  color: #9aa3a8;
  font-weight: 800;
}

.filter-input.small {
  width: 82px;
  padding: 8px;
  border: 0;
  background: transparent;
  text-align: center;
}

.filter-input.small::-webkit-outer-spin-button,
.filter-input.small::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.search-input:focus,
.price-filters:focus-within {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(146,14,14,0.15);
  transform: translateY(-2px);
}

/* =========================
   Menu Grid & Cards
========================= */
.menu {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: 1400px;
  margin: calc(var(--header-height) + var(--controls-height) + 12px) auto 0;
  padding: 30px;
  animation: fadeInGrid 0.6s ease-in;
}

@keyframes fadeInGrid {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card,
.menu-item {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

.card:hover,
.menu-item:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: #5f0e0e;
  box-shadow: 0 20px 40px rgba(146,14,14,0.2);
}

.card:active,
.card.touch-active {
  transform: translateY(-2px) scale(0.995);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.card:hover::before {
  opacity: 1;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.08);
}

.card-content {
  position: relative;
  z-index: 1;
  padding: 18px;
}

.card h3 {
  margin-bottom: 8px;
  color: #263341;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.card .price,
.modal-side-price {
  color: #c94a2f;
  font-weight: 800;
}

.card .price {
  margin-bottom: 12px;
  background: linear-gradient(135deg, #6b2718, var(--brand));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 22px;
}

.unavailable-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(68,8,8,0.7);
  color: #ffffff;
  font-weight: 800;
}

.counter {
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f5f5f5;
}

.counter button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-size: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.counter button:hover:not(:disabled) {
  background: #5f1919;
  transform: scale(1.08);
}

.counter button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.counter span {
  min-width: 35px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.btn-primary:hover {
  background: linear-gradient(135deg, #851900, var(--brand));
  box-shadow: 0 8px 20px rgba(146,14,14,0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.btn-secondary:hover {
  box-shadow: 0 8px 20px rgba(56,189,248,0.3);
}

.btn-danger {
  background: #5a150d;
}

.add-btn {
  display: block;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.26s cubic-bezier(.2,.8,.2,1), transform 0.26s cubic-bezier(.2,.8,.2,1);
}

.add-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* =========================
   Modal
========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  animation: slideUp 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

.modal-header h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 24px;
  font-weight: 800;
}

.modal-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #671108, #6b140a);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}

.modal-close:hover {
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 6px 16px rgba(231,76,60,0.4);
}

.modal-body {
  padding: 20px;
}

.modal-product-img {
  width: 100%;
  max-height: 60vh;
  display: block;
  margin: 0 auto 20px;
  border-radius: 12px;
  object-fit: contain;
}

.modal-product-price {
  margin-bottom: 18px;
  background: linear-gradient(135deg, #11840d, #0fa302);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 28px;
  font-weight: 800;
}

.modal-product-desc {
  margin-bottom: 25px;
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

.modal-sides-title {
  margin-bottom: 15px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
}

.modal-sides-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f5f5f5;
}

.modal-side-add {
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.modal-side-add:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 16px rgba(46,204,113,0.4);
}

.modal-suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.suggest-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.suggest-media {
  position: relative;
}

.suggest-media img {
  width: 70px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

.suggest-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggest-name {
  color: #263341;
  font-size: 14px;
  font-weight: 800;
}

.suggest-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(0,0,0,0.7);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  transform: translateX(-50%);
  animation: modalBounce 1.6s infinite;
}

.modal-scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: 0.18s ease;
}

@keyframes modalBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* =========================
   Cart Page
========================= */
body.cart-page {
  padding: calc(var(--header-height) + 30px) 30px 30px;
}

h2,
h3 {
  color: var(--text-main);
  font-weight: 800;
  text-align: center;
}

h2 {
  margin-bottom: 40px;
  font-size: 32px;
}

h3 {
  margin-top: 20px;
  color: var(--brand);
  font-size: 24px;
}

#list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cart-item:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 20px rgba(146,14,14,0.15);
}

.cart-item .price {
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
}

.item-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#delivery {
  width: 90px;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

#delivery:focus {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(146,14,14,0.2);
  outline: none;
}

#total {
  padding: 24px !important;
  border-radius: 14px;
  background: linear-gradient(135deg, #401313, #a62e2e);
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 20px rgba(146,14,14,0.25);
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37,211,102,0.3) !important;
}

.whatsapp-btn i {
  font-size: 20px;
}

.whatsapp-btn:hover {
  background: linear-gradient(135deg, #128c7e, #0f7c5a) !important;
  box-shadow: 0 10px 28px rgba(37,211,102,0.4) !important;
}

.menu-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.menu-item .info {
  padding: 14px;
}

.menu-item .info h4 {
  color: var(--text-main);
  font-size: 16px;
}

.menu-item .info span {
  color: #38bdf8;
  font-weight: 800;
}

body.cart-page #suggestions.menu {
  margin-top: 0;
}

/* =========================
   Notices & Footer
========================= */
.toast {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 10000;
  min-width: 220px;
  padding: 16px 26px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  box-shadow: 0 12px 35px rgba(46,204,113,0.35);
  transform: translateY(30px) scale(0.9);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.welcome-notice {
  position: fixed;
  top: calc(var(--header-height) + var(--controls-height) + 12px);
  left: 50%;
  z-index: 1000000001;
  padding: 14px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #19a85d, #2ecc71);
  color: #ffffff;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 40px rgba(46,204,113,0.28);
  transform: translate(-50%, -12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.welcome-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer {
  margin-top: 60px;
  padding: 40px 20px 20px;
  border-top: 3px solid var(--brand);
  background: linear-gradient(135deg, #120505 0%, #431003 50%, #421108 100%);
  color: #ffffff;
}

.footer-content {
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  margin: auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img {
  width: 100px;
  height: 100px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.3s ease;
}

.footer-logo img:hover {
  border-color: rgba(255,255,255,0.6);
  transform: scale(1.08) rotateZ(5deg);
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  color: #ffffff;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.35s ease, background 0.35s ease;
}

.footer-social a:hover {
  background: linear-gradient(135deg, var(--accent), #ff3c3c);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 8px 20px rgba(255,122,24,0.4);
  transform: translateY(-6px) scale(1.1) rotateZ(10deg);
}

.footer-copy {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
  text-align: center;
}

/* =========================
   Scrollbars
========================= */
::-webkit-scrollbar {
  width: 10px;
  height: 6px;
}

::-webkit-scrollbar-track {
  border-radius: 20px;
  background: rgba(0,0,0,0.08);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  background: linear-gradient(135deg, #861d08, #ff3c3c);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5d1111, #ff0303);
}

#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-thumb {
  border: 0;
  background: var(--brand);
}

/* =========================
   Responsive
========================= */
@media (max-width: 1100px) {
  .menu-tools-shell {
    grid-template-columns: 1fr;
  }

  .menu-tools-head {
    display: none;
  }

  .search-bar--embedded .filters {
    flex-wrap: wrap;
  }

  .search-bar--embedded .filters > div:first-child {
    flex-basis: 100%;
  }

  .price-filters {
    width: 100%;
    justify-content: center;
  }

  .filter-input.small {
    width: min(42vw, 160px);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  header {
    gap: 12px;
    padding: 0 15px;
  }

  header img {
    width: 55px;
    height: 55px;
  }

  header h1 {
    font-size: 16px;
  }

  header button {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 14px;
  }

  .sidebar {
    width: 280px;
  }

  .menu-tools-shell {
    width: calc(100% - 16px);
    padding: 10px;
    border-radius: 0 0 16px 16px;
  }

  .categories-horizontal {
    min-height: 50px;
    gap: 8px;
    padding: 7px 8px;
  }

  .cat-card {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    padding: 20px;
  }

  .card-content {
    padding: 15px;
  }

  .modal-content {
    max-width: 95%;
  }

  h2 {
    margin-bottom: 32px;
    font-size: 26px;
  }

  h3 {
    font-size: 20px;
  }

  #list {
    padding: 18px;
    gap: 12px;
  }

  .cart-item {
    padding: 16px 18px;
  }

  #total {
    padding: 20px !important;
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .cart-btn {
    width: 54px;
    height: 44px;
  }

  .search-bar--embedded .filters {
    gap: 8px;
    padding: 8px;
  }

  .search-input {
    padding: 11px 12px;
    font-size: 14px;
  }

  #clearSearchBtn {
    padding: 8px 10px !important;
  }

  .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
  }

  .card img {
    height: 120px;
    aspect-ratio: auto;
  }

  .card h3 {
    font-size: 16px;
  }

  .card .price {
    font-size: 20px;
  }

  body.cart-page {
    padding: calc(var(--header-height) + 16px) 12px 16px;
  }

  #list {
    padding: 16px 14px;
    gap: 10px;
  }

  .cart-item {
    flex-wrap: wrap;
    padding: 14px 12px;
  }

  .cart-item .price {
    width: 100%;
    text-align: center;
  }

  .item-actions {
    width: 100%;
    justify-content: center;
  }

  .whatsapp-btn {
    margin: 16px 0 !important;
  }

  .modal-suggestions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .suggest-item {
    padding: 10px;
  }

  .suggest-media img {
    width: 60px;
    height: 44px;
  }

  .welcome-notice {
    width: calc(100% - 20px);
    max-width: 360px;
    font-size: 14px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .menu-tools-shell {
    width: calc(100% - 10px);
    padding: 8px;
  }

  .categories-horizontal {
    min-height: 46px;
    gap: 6px;
    padding: 6px;
  }

  .cat-card {
    min-width: 60px;
    height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }

  .filter-input.small {
    width: 40vw;
  }

  h2 {
    margin-bottom: 24px;
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  #list {
    padding: 14px 12px;
  }

  .cart-item {
    flex-direction: column-reverse;
    align-items: flex-start;
    border-width: 1px;
  }

  #total {
    padding: 16px 12px !important;
    font-size: 20px;
  }

  .toast {
    left: 12px;
    right: 12px;
    min-width: 0;
  }
}

@media (max-width: 350px) {
  .menu {
    grid-template-columns: 1fr;
  }
}
