:root {
  --gold: #d4af37;
  --white: #ffffff;
  --bg: #f6f6f6;
  --bg-soft: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --border: #e7e7e7;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  --bg: #0f0f10;
  --bg-soft: #171719;
  --text: #f5f5f5;
  --muted: #c8c8c8;
  --border: #2b2b2f;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .25s ease, color .25s ease;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.main-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  text-decoration: none;
  color: var(--gold);
  font-weight: 800;
  font-size: 1.05rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 8px;
}

.main-nav a.active,
.main-nav a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

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

.admin-login-link {
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 8px;
}

.admin-login-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.credit-wrap {
  margin-top: 14px;
  text-align: left;
}

.designer-credit {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
}

.designer-credit:hover {
  text-decoration: underline;
}

.hero-simple {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.06));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.slideshow {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: #111;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-caption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .9rem;
}

.restaurant-title {
  margin: 0 0 8px 0;
  color: var(--gold);
  text-align: center;
  width: 100%;
}

.welcome-text {
  margin: 0;
  text-align: center;
}

.floating-category-nav {
  position: fixed;
  right: 14px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.floating-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--bg-soft);
  color: var(--gold);
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
}

.floating-cat-name {
  max-width: 120px;
  text-align: center;
  background: var(--bg-soft);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.floating-btn:hover {
  filter: brightness(1.08);
}

.category-nav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-nav a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
}

.category-section {
  margin-top: 20px;
}

.category-title {
  margin: 0 0 8px 0;
  color: var(--gold);
}

.items-grid {
  margin: 12px 0 20px;
  display: grid;
  grid-template-columns: repeat(var(--desktop-cols, 4), minmax(0, 1fr));
  gap: 14px;
}

.item-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #222;
}

.item-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #222;
}

.item-card h3 {
  margin: 10px 12px 4px;
}

.item-card .price {
  margin: 0 12px 12px;
  color: var(--gold);
  font-weight: 700;
}

.contact-card,
.map-wrap {
  margin-top: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.main-footer {
  border-top: 1px solid var(--border);
  margin-top: 22px;
  background: var(--bg-soft);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.main-footer p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.footer-designer-credit {
  white-space: nowrap;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  font-size: 0.95rem;
  line-height: 1.4;
}

.alert-ok {
  background: rgba(46, 160, 67, 0.13);
  color: #4ad86a;
}

.alert-err {
  background: rgba(198, 52, 52, 0.13);
  color: #ff7d7d;
}

.admin-card {
  margin-top: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.admin-card h2 {
  margin-top: 0;
}

.admin-card label {
  display: block;
  margin: 10px 0 6px;
}

.admin-card input,
.admin-card select,
.admin-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
}

.admin-image-preview-wrap {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  margin: 8px 0 12px;
}

.admin-image-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

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

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.btn-primary {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-danger {
  border-color: #c63434;
  color: #ff7d7d;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: right;
  vertical-align: top;
}

.categories-grid-section {
  margin-top: 20px;
}

.categories-grid {
  margin: 12px 0 20px;
  display: grid;
  grid-template-columns: repeat(var(--desktop-cols, 3), minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.category-card-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #222;
}

.category-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.category-card-body {
  padding: 10px 12px 12px;
}

.category-card-body h3 {
  margin: 0 0 6px;
}

.category-card-cta {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
}

.category-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.item-card-interactive {
  cursor: pointer;
}

.item-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 100;
}

.item-overlay.is-open {
  display: block;
}

.item-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.item-overlay-card {
  position: relative;
  width: min(900px, 92vw);
  margin: 5vh auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 2;
}

.item-overlay-close {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.item-overlay-flip {
  position: relative;
  min-height: 72vh;
  transform-style: preserve-3d;
  transition: transform .5s ease;
}

.item-overlay-flip.is-flipped {
  transform: rotateY(180deg);
}

.item-overlay-face {
  position: absolute;
  inset: 0;
  padding: 16px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  direction: ltr;
}

.item-overlay-back {
  transform: rotateY(180deg) scaleX(-1);
}

.item-overlay-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #222;
}

.item-overlay-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.event-banner-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}

.event-banner-overlay.is-open {
  display: block;
}

.event-banner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.event-banner-card {
  position: relative;
  width: min(560px, 92vw);
  margin: 8vh auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 2;
  padding: 14px;
}

.event-banner-close {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.event-banner-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #222;
}

.event-banner-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.event-banner-text {
  margin: 12px 4px 4px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  white-space: pre-wrap;
}

.event-banner-inline-card {
  border: 1px solid var(--gold);
}

.event-banner-inline-text {
  white-space: normal;
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(var(--tablet-cols, 2), minmax(0, 1fr));
  }

  .items-grid {
    grid-template-columns: repeat(var(--tablet-cols, 2), minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .slideshow {
    height: 190px;
  }

  .categories-grid {
    grid-template-columns: repeat(var(--mobile-cols, 1), minmax(0, 1fr));
  }

  .items-grid {
    grid-template-columns: repeat(var(--mobile-cols, 1), minmax(0, 1fr));
  }

  .category-items-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .item-overlay-card {
    width: 96vw;
    margin: 2vh auto;
  }

  .item-overlay-flip {
    min-height: 82vh;
  }

  .event-banner-card {
    width: 96vw;
    margin: 4vh auto;
    padding: 12px;
  }

  .event-banner-text {
    font-size: 0.95rem;
  }

  .main-nav {
    gap: 6px;
  }

  .main-nav a {
    padding: 7px 10px;
    font-size: .92rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .floating-category-nav {
    right: 10px;
    bottom: 12px;
  }

  .floating-btn {
    width: 38px;
    height: 38px;
  }

  .floating-cat-name {
    max-width: 102px;
    font-size: 0.72rem;
    padding: 7px 8px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 680px;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .categories-grid {
    grid-template-columns: repeat(var(--mobile-cols, 1), minmax(0, 1fr)) !important;
  }

  .items-grid {
    grid-template-columns: repeat(var(--mobile-cols, 1), minmax(0, 1fr)) !important;
  }
}

/* Survey banner (popup/card) */
.survey-banner {
  direction: rtl;
  text-align: right;
  animation: surveyBannerIn .28s ease both;
}

.survey-banner[aria-hidden="true"] {
  display: none !important;
}

.survey-banner[aria-hidden="false"] {
  display: block;
}

.survey-banner.popup {
  position: fixed;
  inset: 0;
  z-index: 130;
}

.survey-banner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.survey-banner-modal {
  position: relative;
  width: min(640px, 94vw);
  margin: 6vh auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 2;
}

.survey-banner.card {
  position: relative;
  margin-top: 12px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.survey-banner-image-link,
.survey-banner-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.survey-banner-image {
  width: 100%;
  display: block;
  max-height: min(62vh, 520px);
  object-fit: cover;
  object-position: center;
  background: #111;
}

.survey-banner-content {
  padding: 12px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.survey-banner-content h3 {
  margin: 0;
  color: var(--gold);
}

.survey-banner-card-text {
  display: block;
  padding: 10px 12px;
  font-weight: 700;
  color: var(--gold);
}

.survey-banner-close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 3;
}

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

/* Survey floating actions */
.survey-floating-container {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.survey-floating-hint {
  max-width: 240px;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .82rem;
  box-shadow: var(--shadow);
  opacity: .95;
}

.survey-floating-main {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, var(--bg-soft), rgba(212, 175, 55, 0.12));
  color: var(--gold);
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  animation: surveyPulse 2.2s infinite ease-in-out;
}

@keyframes surveyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
}

.survey-floating-menu {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  transform: translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.survey-floating-container.open .survey-floating-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.survey-floating-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
  min-width: 132px;
}

.survey-floating-item-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: .82rem;
}

.survey-floating-item-label {
  font-size: .88rem;
}

html[data-theme="dark"] .survey-banner-modal,
html[data-theme="dark"] .survey-banner.card,
.dark .survey-banner-modal,
.dark .survey-banner.card {
  border-color: #3a3a41;
}

@media (max-width: 768px) {
  .survey-banner-modal {
    width: 96vw;
    margin: 4vh auto;
  }

  .survey-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .survey-floating-container {
    left: .75rem;
    bottom: .75rem;
  }

  .survey-floating-main {
    width: 48px;
    height: 48px;
  }
}

