* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: #f5f5f5; }
#app { min-height: 100vh; padding: 1rem; }
.header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.header h1 { margin: 0; font-size: 1.25rem; }
.back { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }
.lang-toggle { margin-inline-start: auto; background: none; border: 1px solid rgba(0,0,0,0.15); border-radius: 6px; padding: 0.25rem 0.625rem; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: #555; white-space: nowrap; flex-shrink: 0; }
.lang-toggle:hover { background: rgba(0,0,0,0.05); color: #333; }
.categories { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.category-card { display: flex; flex-direction: row; align-items: center; gap: 1rem; padding: 1rem; background: #fff; border: none; border-radius: 8px; cursor: pointer; text-align: start; text-decoration: none; color: inherit; }
/* pointer-events: none so clicks always hit the card; card is clickable before image loads */
.category-thumb { width: 64px; height: 64px; flex-shrink: 0; object-fit: cover; border-radius: 4px; background: #e8e8e8; pointer-events: none; }
.category-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.category-name { font-weight: 600; }
.category-desc { color: #666; font-size: 0.9rem; }
/* L:/M:/H: tier counts — same gate as image-level dots (?debugLevel=1 / VITE_DEBUG_IMAGE_LEVELS) */
body:not(.debug-image-levels) .prefetch-stats {
  display: none !important;
}
.prefetch-stats { flex-shrink: 0; font-size: 0.7rem; color: #888; min-width: 8rem; visibility: visible; }
.items { display: flex; flex-direction: column; gap: 1rem; }
.items-error { justify-content: center; align-items: center; min-height: 12rem; text-align: center; gap: 1rem; }
.items-error .error-message { margin: 0; color: #666; }
.retry-items { padding: 0.5rem 1rem; font-size: 1rem; font-weight: 600; cursor: pointer; background: #333; color: #fff; border: none; border-radius: 6px; }
.retry-items:hover { background: #555; }
.item { display: flex; gap: 1rem; background: #fff; padding: 1rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.item-img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #e8e8e8; }
/* Div placeholder until real image loads: same size, solid background, no img request */
.item-img-placeholder { display: block; min-width: 80px; min-height: 80px; }
.item-body { flex: 1; min-width: 0; }
.item-name { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.item-desc { margin: 0; color: #555; font-size: 0.875rem; line-height: 1.45; }
.item-hint-line { margin: 0.35rem 0 0; color: #888; font-size: 0.85rem; line-height: 1.3; }
.item-price { margin: 0.35rem 0 0; font-weight: 600; font-size: 0.9rem; color: #222; }
.item-sizes { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.item-size-row { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 600; }
.item-size-label { color: #333; font-weight: 500; }
.item-size-price { color: #111; white-space: nowrap; }
.item-hint { font-weight: 400; color: #888; font-size: 0.85em; }
.loading, .error { text-align: center; padding: 2rem; color: #666; }
/* Typing caret animation */
@keyframes blink-caret {
  0%, 100% { border-color: currentColor; }
  50% { border-color: transparent; }
}
.typing-caret {
  display: inline-block;
  border-right: 3px solid;
  padding-right: 2px;
  animation: blink-caret 0.7s step-end infinite;
}

/* Skeleton / shimmer placeholders */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-text {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  color: transparent !important;
  min-width: 140px;
  display: inline-block;
}
.skeleton-card { }
.skeleton-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
/* Match final category thumb size so placeholder doesn't appear massive before content loads */
.category-card .skeleton-thumb {
  width: 64px;
  height: 64px;
  min-width: 64px;
  flex-shrink: 0;
  aspect-ratio: unset;
}
.skeleton-name {
  display: block;
  margin-top: 0.5rem;
  height: 1em;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.error { color: #c00; }

/* Image level debug indicator (L1=red, L2=blue, L3=green); visible only when .debug-image-levels on body */
.img-level-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.img-level-dot {
  display: none;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  border: 1px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.65);
}
.img-level-dot[data-level="L1"] { background: red; }
.img-level-dot[data-level="L2"] { background: blue; }
.img-level-dot[data-level="L3"] { background: green; }
/* Enable with ?debugLevel=1 in URL or VITE_DEBUG_IMAGE_LEVELS=true at build */
body.debug-image-levels .img-level-dot { display: block; }
#lightbox .img-level-dot {
  width: clamp(16px, 1.8vw, 30px);
  height: clamp(16px, 1.8vw, 30px);
  top: clamp(6px, 0.8vw, 14px);
  left: clamp(6px, 0.8vw, 14px);
  border-width: 2px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.75);
}

/* Analytics panel: only when body.debug-image-levels (see main.ts / bandwidth). */
body:not(.debug-image-levels) #debug-panel {
  display: none !important;
}
#debug-panel:not(.visible) {
  display: none;
}

/* ── Menu v2 (ZOOX-style) ─────────────────────────────────────────────────── */
:root {
  --v2-bg: #f4f6fb;
  --v2-card: #ffffff;
  --v2-text: #0f172a;
  --v2-muted: #64748b;
  --v2-accent: #4f46e5;
  --v2-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --v2-radius: 18px;
  --v2-ring: 0 0 0 4px rgba(79, 70, 229, 0.14);
  --menu-card-width: 170px;
  --menu-card-img-height: 128px;
}

body { background: var(--v2-bg); }

.v2-header { padding: 0; margin-bottom: 14px; }
.venue-banner-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.venue-banner {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(79,70,229,0.18), rgba(2,132,199,0.10));
  box-shadow: var(--v2-shadow);
}
.venue-banner:has(.venue-banner-img) {
  min-height: 0;
  line-height: 0;
  background: transparent;
}
.venue-banner--empty {
  display: block;
  min-height: clamp(148px, 38vw, 220px);
}
.venue-banner-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.venue-banner-tools {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
}
.venue-banner-tools .lang-toggle {
  margin: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.venue-head {
  display: flex;
  align-items: center;
  padding: 12px 6px 0;
  gap: 12px;
}
.venue-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.venue-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8e8ff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}
.venue-titles { min-width: 0; }
.venue-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--v2-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.venue-tagline {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--v2-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.venue-actions { padding: 12px 6px 0; }
.search-wrap { display: flex; }
.search-input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 0.95rem;
  outline: none;
}
.search-input:focus { border-color: rgba(79,70,229,0.35); box-shadow: 0 0 0 4px rgba(79,70,229,0.10); }
.lang-toggle:focus-visible,
.cat-row-seeall:focus-visible,
.heart-btn:focus-visible,
.load-more:focus-visible,
.back:focus-visible,
.search-input:focus-visible {
  outline: none;
  box-shadow: var(--v2-ring);
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.v2-main { display: flex; flex-direction: column; gap: 18px; padding-top: 10px; }
.cat-row { }
.cat-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px;
}
.cat-row-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--v2-text); }
.cat-row-seeall {
  background: transparent;
  border: none;
  color: var(--v2-accent);
  font-weight: 700;
  cursor: pointer;
  padding: 6px 8px;
}
.cat-row-seeall:hover { text-decoration: underline; }

.cat-row-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--menu-card-width);
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 6px 6px;
  scroll-snap-type: x mandatory;
}
.cat-row-cards::-webkit-scrollbar { height: 10px; }
.cat-row-cards::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.15); border-radius: 999px; }

.menu-item-card {
  width: var(--menu-card-width);
  background: var(--v2-card);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.menu-item-card__media { position: relative; flex-shrink: 0; }
.menu-item-card__img,
.menu-item-card__img--empty {
  width: 100%;
  height: var(--menu-card-img-height);
  display: block;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(2,132,199,0.08));
}
.menu-item-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 10px 12px 12px;
}
.menu-item-card__name {
  font-weight: 800;
  color: var(--v2-text);
  font-size: 0.95rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-item-card__desc {
  margin-top: 4px;
  color: var(--v2-muted);
  font-size: 0.85rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}
.menu-item-card__price {
  margin-top: 8px;
  color: var(--v2-accent);
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.2;
}
.menu-item-card__sizes {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.menu-item-card__size-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.2;
}
.menu-item-card__size-label {
  color: var(--v2-muted);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-item-card__size-price {
  color: var(--v2-accent);
  font-weight: 800;
  flex-shrink: 0;
}

.heart-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.88);
  cursor: pointer;
}
[dir=rtl] .heart-btn { left: auto; right: 10px; }
.heart-btn::before {
  content: '♡';
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(15,23,42,0.65);
  font-size: 18px;
  line-height: 1;
}
.heart-btn.is-fav::before { content: '♥'; color: #e11d48; }

.empty-state { padding: 30px 10px; text-align: center; color: var(--v2-muted); }

/* See All */
.v2-seeall-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 6px;
}
.seeall-title-wrap { flex: 1; min-width: 0; }
.seeall-venue { color: var(--v2-muted); font-size: 0.85rem; font-weight: 700; }
.seeall-category { margin: 2px 0 0; font-size: 1.15rem; font-weight: 900; color: var(--v2-text); }
.v2-seeall-main { padding-top: 6px; }
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--menu-card-width), var(--menu-card-width)));
  justify-content: start;
  align-items: stretch;
  gap: 12px;
  padding: 6px;
}
.load-more {
  width: calc(100% - 12px);
  margin: 10px 6px 24px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.92);
  font-weight: 800;
  cursor: pointer;
}
.load-more:disabled { opacity: 0.6; cursor: default; }

@media (min-width: 820px) {
  :root {
    --menu-card-width: 220px;
    --menu-card-img-height: 156px;
  }
  #app { max-width: 980px; margin: 0 auto; }
}


#debug-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  min-width: 200px;
  min-height: 60px;
  max-width: 360px;
  max-height: 50vh;
  overflow: auto;
  background: #1a1a1a;
  color: #e0e0e0;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 8px 0 0 0;
  border: 1px solid #444;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: max-height 0.15s ease-out, transform 0.15s ease-out, opacity 0.15s ease-out;
}
#debug-panel.collapsed {
  max-height: 28px;
  overflow: hidden;
  cursor: pointer;
}
#debug-panel .debug-panel-inner strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 13px;
}
#debug-panel .debug-panel-inner pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, monospace;
}
/* Header + toggle affordance */
#debug-panel .debug-panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
#debug-panel .debug-panel-title {
  flex: 1;
}
#debug-panel .debug-panel-copy {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 12px;
  margin-right: 6px;
  padding: 0 4px;
}
#debug-panel .debug-panel-copy:hover {
  color: #fff;
}
#debug-panel .debug-panel-toggle {
  background: transparent;
  border: none;
  color: #bbb;
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  line-height: 1;
}
#debug-panel .debug-panel-toggle:hover {
  color: #fff;
}
#debug-panel.collapsed .debug-panel-body,
#debug-panel.collapsed .debug-cache-progress,
#debug-panel.collapsed .debug-panel-actions {
  display: none;
}
#debug-panel .debug-panel-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #333;
}
#debug-panel #debug-show-language {
  background: rgba(255,255,255,0.1);
  border: 1px solid #555;
  border-radius: 4px;
  color: #ccc;
  font-size: 0.75rem;
  padding: 4px 8px;
  cursor: pointer;
}
#debug-panel #debug-show-language:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Cache progress bar in debug panel */
#debug-panel .debug-cache-progress {
  margin-bottom: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #333;
}
#debug-panel .debug-cache-progress-header {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 4px;
}
#debug-panel .debug-cache-progress-bar {
  display: flex;
  flex-direction: row;
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
#debug-panel .debug-cache-progress-fill {
  height: 100%;
  min-width: 0;
  transition: width 0.2s ease-out;
}
#debug-panel .debug-cache-progress-cached {
  background: linear-gradient(90deg, #2a7a3e 0%, #3d9b52 100%);
  border-radius: 4px 0 0 4px;
}
#debug-panel .debug-cache-progress-failed {
  background: linear-gradient(90deg, #8b2e2e 0%, #b53d3d 100%);
  border-radius: 0 4px 4px 0;
}
#debug-panel .debug-cache-progress-text {
  font-size: 11px;
  color: #888;
  font-family: ui-monospace, monospace;
}

/* Lightbox for full-size image with zoom */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex-direction: column;
}
#lightbox.open { display: flex; }
#lightbox .lightbox-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  min-height: 0;
  width: 100%;
}
/* Zoom applies to .img-level-wrap in JS so the level dot stays above the image (transform on img hid the dot). */
#lightbox .lightbox-image-wrap .img-level-wrap {
  transform-origin: center center;
  transition: transform 0.1s ease-out;
}
#lightbox .lightbox-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 0;
}
#lightbox .lightbox-image-wrap .img-level-dot {
  z-index: 50;
}
#lightbox .lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
#lightbox .lightbox-close:hover { background: rgba(255,255,255,0.35); }
#lightbox .lightbox-zoom-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.6);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}
#lightbox .lightbox-zoom-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
#lightbox .lightbox-zoom-btn:hover { background: rgba(255,255,255,0.35); }
#lightbox .lightbox-zoom-value {
  min-width: 3rem;
  text-align: center;
  color: #fff;
  font-size: 0.9rem;
}

/* ── Splash screen ────────────────────────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  padding: 1.5rem;
}
.splash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
}
.splash-name {
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  min-height: 1.2em;
}
.splash-loading {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
}
.splash-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
}
.splash-lang-buttons {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}
.splash-lang-btn {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.splash-lang-btn:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.45);
}
.splash-lang-btn:active {
  transform: scale(0.97);
}
.splash-lang-btn:disabled,
.splash-lang-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}
.splash-lang-btn:disabled:hover,
.splash-lang-btn[aria-disabled="true"]:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}
.splash-blocked-message {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
  line-height: 1.45;
}
.splash-blocked-message strong {
  color: #fff;
  font-size: 1rem;
}
@keyframes splash-btn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
.splash-card--venue-pending .splash-lang-btn {
  animation: splash-btn-pulse 1.35s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .splash-card--venue-pending .splash-lang-btn {
    animation: none;
  }
}
.splash-lang-btn-ar {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  direction: rtl;
}
@keyframes splash-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
#splash.splash-exit {
  animation: splash-fade-out 0.25s ease-out forwards;
  pointer-events: none;
}

/* ── RTL layout overrides ─────────────────────────────────────────────────── */
/* text-align: start on .category-card handles LTR/RTL text direction automatically. */
/* flex-direction: row with direction:rtl moves the thumbnail to the right side naturally. */
[dir=rtl] .item-body { text-align: right; }
[dir=rtl] .lightbox-details { text-align: right; }

/* Item details below the image in lightbox */
#lightbox .lightbox-details {
  display: none;
  flex-shrink: 0;
  max-height: 40vh;
  overflow-y: auto;
  padding: 1rem 2rem 2rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  text-align: left;
}
#lightbox .lightbox-details.lightbox-details-visible {
  display: block;
}
#lightbox .lightbox-detail-name {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}
#lightbox .lightbox-detail-desc {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
}
#lightbox .lightbox-detail-price {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}
