/* ============================================================
   QR Menu — Modern UI Layer
   Premium, minimal, mobile-first design system
   ============================================================ */

:root {
  --qr-surface: #ffffff;
  --qr-surface-muted: #f7f7f8;
  --qr-text: #1a1a1a;
  --qr-text-muted: #6b7280;
  --qr-border: rgba(0, 0, 0, 0.08);
  --qr-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --qr-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
  --qr-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  --qr-radius-sm: 10px;
  --qr-radius-md: 16px;
  --qr-radius-lg: 24px;
  --qr-radius-pill: 999px;
  --qr-accent: #ffc107;
  /* Panel tema renkleri (--primaryColor / --secondaryColor) ile uyumlu */
  --qr-action: var(--primaryColor);
  --qr-action-hover: var(--primaryHoverColor);
  --qr-bar: var(--secondaryColor);
  --qr-dark: #1a1a1a;
  --qr-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --qr-bottom-nav-h: 4.25rem;
  --qr-bottom-nav-total-h: calc(var(--qr-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  /* Category image design system */
  --qr-category-image-ratio: 4 / 3;
  --qr-category-thumb-width: clamp(5.25rem, 21vw, 6.25rem);
  --qr-category-card-width: calc(var(--qr-category-thumb-width) + 1.35rem);
}

/* ---- Animations ---- */
@keyframes qrFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes qrScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes qrSpinOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes qrDotPulse {
  0%, 80%, 100% { opacity: 0.35; transform: scale(0.55); }
  40% { opacity: 1; transform: scale(1); }
}

@keyframes qrSuccessPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Full-screen layers ---- */
.qrScreen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity var(--qr-transition), visibility var(--qr-transition);
}

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

/* ---- Loading Screen ---- */
.qrLoadingScreen {
  background: var(--qr-surface-muted);
  z-index: 100001;
}

.qrLoadingSpinner {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrLoadingOrbit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 52px;
  height: 52px;
  animation: qrSpinOrbit 1.35s linear infinite;
  will-change: transform;
}

.qrLoadingDot {
  display: block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ffc107;
  background-color: var(--qr-accent, #ffc107);
  animation: qrDotPulse 1.2s ease-in-out infinite;
}

.qrLoadingDot:nth-child(1) { animation-delay: 0s; }
.qrLoadingDot:nth-child(2) { animation-delay: 0.15s; }
.qrLoadingDot:nth-child(3) { animation-delay: 0.3s; }
.qrLoadingDot:nth-child(4) { animation-delay: 0.45s; }

.qrLoadingText {
  font-size: 0.9rem;
  color: var(--qr-text-muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0 2rem;
  animation: qrFadeIn 0.6s ease 0.2s both;
}

/* ---- Cover Page ---- */
.qrCoverPage {
  padding: 0;
  overflow: hidden;
}

.qrCoverPage__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 8s ease;
}

.qrCoverPage.is-active .qrCoverPage__bg {
  transform: scale(1);
}

.qrCoverPage__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.qrCoverPage__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 3rem 1.5rem 2.5rem;
  animation: qrFadeIn 0.8s ease;
}

.qrCoverPage__brand {
  text-align: center;
  margin-top: 8vh;
  animation: qrSlideUp 0.7s ease 0.15s both;
}

.qrCoverPage__brandName {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.qrCoverPage__brandSub {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.qrCoverPage__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(340px, 88vw);
  margin-bottom: 4vh;
}

.qrCoverPage__actions--hidden {
  display: none;
}

.qrCoverPage__actions.is-visible {
  display: flex;
  animation: qrSlideUp 0.5s ease both;
}

.qrBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--qr-radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.qrBtn:active {
  transform: scale(0.97);
}

.qrBtn--white {
  background: #fff;
  color: var(--qr-text);
  box-shadow: var(--qr-shadow-md);
}

.qrBtn--white:hover {
  box-shadow: var(--qr-shadow-lg);
}

.qrBtn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.qrBtn--instagram {
  width: auto;
  min-width: 3rem;
  padding: 0.75rem;
  background: #fff;
  border-radius: var(--qr-radius-sm);
}

.qrBtn--instagram .bx {
  font-size: 1.5rem;
  color: #e1306c;
}

.qrBtn--instagram.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---- App Main ---- */
.appMain {
  min-height: 100vh;
  min-height: 100dvh;
  transition: opacity var(--qr-transition);
}

.appMain--hidden {
  display: none;
}

.appMain.is-entering {
  animation: qrFadeIn 0.5s ease;
}

/* ---- Modern Header ---- */
.header--modern {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  background: var(--qr-bar);
  box-shadow: none;
  padding: 0.65rem 0.85rem;
  height: auto;
  min-height: 3.25rem;
}

.appMain:has(> .header--modern) {
  --qr-header-offset: 3.5rem;
}

.appMain:has(> .header--modern) .section.menus {
  padding-top: calc(var(--qr-header-offset) + 1rem);
}

.appMain:has(> .header--modern) .menuSearchWrap {
  scroll-margin-top: calc(var(--qr-header-offset) + 0.75rem);
}

.header--modern .logoDiv {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 55%;
  padding-right: 0.35rem;
}

.header--modern .logoDiv .logo,
.header--modern .logoDiv .headerLogo {
  max-width: 100%;
}

.header--modern .logoDiv .headerLogo {
  display: block;
  width: auto;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
}

.header--modern .logoDiv .logo {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.header--modern .toggleNav {
  display: none !important;
}

.header--modern .headerActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.header--modern .headerTranslateSlot {
  position: relative;
  flex-shrink: 0;
  min-width: 108px;
  max-width: 142px;
}

.header--modern #google_translate_element {
  flex-shrink: 0;
  margin: 0 !important;
  min-width: 108px !important;
  max-width: 132px !important;
  min-height: 34px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
}

.header--modern #google_translate_element .goog-te-gadget {
  display: block !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: inherit !important;
}

.header--modern #google_translate_element .goog-te-gadget [id*="targetLanguage"] {
  font-size: 12px !important;
  line-height: normal !important;
}

.header--modern #google_translate_element .goog-te-gadget > span {
  display: none !important;
}

.header--modern #google_translate_element .goog-te-gadget a[href*="translate.google.com"] {
  display: none !important;
}

.header--modern #google_translate_element .goog-te-gadget .goog-te-combo,
.header--modern #google_translate_element select.goog-te-combo {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-width: 108px !important;
  max-width: 132px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  line-height: normal !important;
  color: var(--whiteColor, #fff) !important;
  background-color: var(--qr-action-hover) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  cursor: pointer;
  -webkit-appearance: menulist;
  appearance: menulist;
}

.header--modern #google_translate_element .goog-te-gadget .goog-te-combo option,
.header--modern #google_translate_element select.goog-te-combo option {
  color: #1a1a1a !important;
  background-color: #ffffff !important;
  font-size: 12px !important;
}
.header--modern .headerCartBtn {
  flex-shrink: 0;
}

.header--modern .headerCartBtn a {
  background: var(--qr-action);
  min-width: 38px;
  min-height: 38px;
  padding: 0.4rem 0.55rem;
}

.header--modern .headerCartBtn a:hover {
  background: var(--qr-action-hover);
}

@media screen and (min-width: 768px) {
  .header--modern {
    padding: 0.75rem 1.25rem;
    gap: 0.75rem;
  }

  .appMain:has(> .header--modern) {
    --qr-header-offset: 5.25rem;
  }

  .header--modern .logoDiv {
    max-width: none;
    flex: 0 1 auto;
    padding-right: 0.75rem;
  }

  .header--modern .logoDiv .headerLogo {
    max-height: 60px;
  }

  .header--modern .headerTranslateSlot,
  .header--modern #google_translate_element {
    min-width: 118px;
    max-width: 142px;
  }
}

@media screen and (min-width: 480px) and (max-width: 767px) {
  .header--modern .logoDiv .headerLogo {
    max-height: 52px;
  }
}

@media screen and (min-width: 600px) and (max-width: 767px) {
  .header--modern .logoDiv {
    max-width: 65%;
  }
}

@media screen and (max-width: 380px) {
  .header--modern {
    padding: 0.55rem 0.65rem;
    gap: 0.3rem;
  }

  .appMain:has(> .header--modern) {
    --qr-header-offset: 3.25rem;
  }

  .header--modern .logoDiv {
    max-width: 48%;
  }

  .header--modern .logoDiv .headerLogo {
    max-height: 38px;
  }

  .header--modern .headerTranslateSlot,
  .header--modern #google_translate_element {
    min-width: 96px;
    max-width: 110px;
  }
}

/* ---- Menu Toolbar ---- */
.menuToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 0.5rem;
  gap: 1rem;
}

.menuToolbar__title {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--qr-text);
  margin: 0;
}

.menuToolbar__views {
  display: flex;
  gap: 0.35rem;
  background: var(--qr-surface-muted);
  padding: 0.25rem;
  border-radius: var(--qr-radius-sm);
}

.menuViewBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--qr-text-muted);
  cursor: pointer;
  margin: 0;
  padding: 0;
  width: 2.25rem;
  transition: background 0.2s, color 0.2s;
}

.menuViewBtn.is-active {
  background: var(--qr-action);
  color: #fff;
}

.menuViewBtn .bx {
  font-size: 1.15rem;
}

/* ---- Category Carousel ---- */
.categoryCarousel {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding: 0.75rem 0 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.categoryCarousel::-webkit-scrollbar {
  display: none;
}

.categoryCarousel .option {
  flex: 0 0 auto;
  scroll-snap-align: start;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: var(--qr-category-card-width);
  min-width: var(--qr-category-card-width);
  max-width: var(--qr-category-card-width);
  min-height: calc(var(--qr-category-thumb-width) / 3 * 4 + 2.65rem);
  padding: 0.7rem 0.65rem 0.75rem;
  border-radius: var(--qr-radius-md);
  background: var(--qr-surface);
  border: 2px solid transparent;
  box-shadow: var(--qr-shadow-sm);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-sizing: border-box;
}

.categoryCardThumb {
  width: var(--qr-category-thumb-width);
  max-width: 100%;
  aspect-ratio: var(--qr-category-image-ratio);
  border-radius: var(--qr-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--qr-surface-muted);
  border: 1px solid var(--qr-border);
}

.categoryCardThumb__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.categoryCardThumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qr-text-muted);
}

.categoryCardThumb--empty .bx {
  font-size: clamp(1.65rem, 5vw, 2rem);
}

.categoryCarousel .option small {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  margin-top: 0.55rem;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.categoryCarousel .option.categoryActive {
  border-color: var(--primaryColor);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.categoryCarousel .option.categoryActive small {
  color: var(--primaryColor);
}

.categoryCarousel .option:hover {
  background: var(--qr-surface);
}

.categoryCarousel .option:hover small {
  color: var(--primaryColor);
}

@media (min-width: 768px) {
  :root {
    --qr-category-thumb-width: clamp(5.75rem, 11vw, 7rem);
  }

  .categoryCarousel {
    gap: 1rem;
  }

  .categoryCarousel .option small {
    font-size: 0.75rem;
    margin-top: 0.6rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --qr-category-thumb-width: 7rem;
  }
}

/* Override legacy main.css 25px category img rule */
.menus .clientMenu .optionMenu.categoryCarousel .option .categoryCardThumb__img,
.menus .clientMenu .categoryCarousel .option .categoryCardThumb__img {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  flex-shrink: 0;
}

/* ---- Product Grid View ---- */
.menuItems.viewMode-grid .categoryWrapper {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.menuItems.viewMode-grid .item {
  max-width: none;
  border: 1px solid var(--qr-border);
  box-shadow: var(--qr-shadow-sm);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: qrSlideUp 0.4s ease both;
}

.menuItems.viewMode-grid .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--qr-shadow-md);
}

.menuItems.viewMode-grid .item .imgDiv {
  height: 180px;
  border-radius: var(--qr-radius-md);
}

.menuItems.viewMode-grid .item .price {
  font-size: 1.1rem !important;
}

.menuItems.viewMode-grid .item .cartBtn {
  width: 100%;
  margin: 0;
}

.menuItems.viewMode-grid .item .cartBtn a {
  width: 100%;
  justify-content: center;
  padding: 0.65rem;
  border-radius: var(--qr-radius-pill);
  background: var(--qr-action);
  font-size: 0.85rem;
}

.menuItems.viewMode-grid .item .cartBtn a:hover {
  background: var(--qr-action-hover);
}

/* Product description: clamp in listings, full text in modal (#productModalDesc) */
.menuItems .item .itemInfor .description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.menuItems.viewMode-grid .categoryWrapper {
  align-items: stretch;
}

.menuItems.viewMode-grid .categoryWrapper .item {
  height: 100%;
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}

.menuItems.viewMode-grid .item .itemInfor {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.menuItems.viewMode-grid .item .description {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.menuItems.viewMode-grid .item .qty_btn {
  margin-top: auto;
  padding-top: 0.35rem;
}

/* ---- Product meta: badges, calories, allergens ---- */
.productBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.productBadges--card {
  margin-bottom: 0.45rem;
}

.menuItems.viewMode-grid .productBadges--card {
  display: none;
}

.menuItems.viewMode-list .itemBadgesOverlay {
  display: none;
}

.itemBadgesOverlay {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  pointer-events: none;
}

.menuItems .item .imgDiv {
  position: relative;
}

.productBadge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--qr-radius-pill);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.92);
  color: var(--qr-text);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.productBadges--cardOverlay .productBadge {
  font-size: 0.58rem;
  box-shadow: var(--qr-shadow-sm);
}

.productBadge--popular { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.productBadge--chef { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.productBadge--new { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.productBadge--bestseller { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.productBadge--glutenfree { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.productBadge--vegan { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.productBadge--vegetarian { background: #f0fdf4; color: #166534; border-color: #86efac; }
.productBadge--spicy { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.productBadge--organic { background: #f7fee7; color: #3f6212; border-color: #d9f99d; }
.productBadge--promo { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.productBadge--default { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }

.productCalories {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--qr-text-muted);
}

.productCalories .bx {
  font-size: 1rem;
  color: #f97316;
}

.productAllergens {
  margin-top: 0.35rem;
}

.productAllergens__title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--qr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.productAllergens__list {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--qr-text-muted);
}

.productAllergens--card {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
}

.productBadges--modal {
  justify-content: center;
  margin-bottom: 0.65rem;
}

.productCalories--modal {
  justify-content: center;
  margin-bottom: 0.75rem;
}

.productAllergens--modal {
  text-align: center;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--qr-radius-sm);
  background: var(--qr-surface-muted);
}

.menuItems.viewMode-list .productAllergens--card {
  margin-bottom: 0.5rem;
}

/* ---- Product List View ---- */
.menuItems.viewMode-list .categoryWrapper {
  grid-template-columns: 1fr !important;
  gap: 0.85rem;
  justify-content: stretch;
  width: 100%;
}

.menuItems.viewMode-list .categoryWrapper .item {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  border-radius: var(--qr-radius-md);
  overflow: hidden;
  border: 1px solid var(--qr-border);
  box-shadow: var(--qr-shadow-sm);
  cursor: pointer;
  animation: qrSlideUp 0.4s ease both;
  transition: box-shadow 0.3s ease;
  min-width: 0;
}

.menuItems.viewMode-list .item:hover {
  box-shadow: var(--qr-shadow-md);
  transform: none;
}

.menuItems.viewMode-list .item .itemInfor {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 0.75rem 0.85rem 1rem;
  order: 1;
  align-content: center;
}

.menuItems.viewMode-list .item .imgDiv {
  flex: 0 0 clamp(88px, 28vw, 140px);
  width: clamp(88px, 28vw, 140px);
  height: auto;
  min-height: 96px;
  border-radius: 0;
  margin: 0;
  padding: 0;
  order: 2;
}

.menuItems.viewMode-list .item .imgDiv img {
  width: 100%;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
}

.menuItems.viewMode-list .item .itemNamePriceDiv {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.menuItems.viewMode-list .item .itemNamePriceDiv .price {
  font-size: 1.05rem !important;
  text-align: left;
}

.menuItems.viewMode-list .item .description {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.menuItems.viewMode-list .item .qty_btn {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}

.menuItems.viewMode-list .item .qty_btn .cartBtn,
.menuItems.viewMode-list .item .qty_btn .cartBtn button {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.menuItems.viewMode-list .item .qty_btn .cartBtn a {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  border-radius: var(--qr-radius-pill);
  background: var(--qr-action);
  justify-content: center;
}

@media (min-width: 768px) {
  .menuItems.viewMode-list .item .imgDiv {
    flex-basis: 160px;
    width: 160px;
    min-height: 120px;
  }

  .menuItems.viewMode-list .item .imgDiv img {
    min-height: 120px;
  }

  .menuItems.viewMode-list .item .itemInfor {
    padding: 1rem 1rem 1rem 1.25rem;
  }
}

/* ---- Product Modal ---- */
.qrModal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.qrModal[hidden] {
  display: none;
}

.qrModal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: qrFadeIn 0.3s ease;
}

.qrModal__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: 92vh;
  background: var(--qr-surface);
  border-radius: var(--qr-radius-lg) var(--qr-radius-lg) 0 0;
  overflow-y: auto;
  animation: qrSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--qr-shadow-lg);
}

@media (min-width: 640px) {
  .qrModal {
    align-items: center;
    padding: 1rem;
  }

  .qrModal__panel {
    border-radius: var(--qr-radius-lg);
    max-height: 88vh;
  }

  .qrModal__image {
    max-height: min(50vh, 380px);
  }
}

@media (min-width: 768px) {
  #productModal.qrModal .qrModal__panel {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: min(920px, calc(100vw - 2.5rem));
    max-height: min(88vh, 720px);
    overflow: hidden;
  }

  #productModalImageWrap {
    flex: 0 0 min(44%, 400px);
    width: min(44%, 400px);
    max-width: 400px;
    min-height: 0;
    max-height: none;
    padding: 0.85rem;
    border-right: 1px solid var(--qr-border);
  }

  #productModal .qrModal__image {
    width: 100%;
    max-width: 100%;
    max-height: min(calc(88vh - 1.7rem), 640px);
    height: auto;
    object-fit: contain;
    border-radius: var(--qr-radius-md);
  }

  #productModal .qrModal__imagePlaceholder {
    width: 100%;
    max-height: min(calc(88vh - 1.7rem), 640px);
    min-height: 220px;
    aspect-ratio: auto;
  }

  #productModal .qrModal__body {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: min(88vh, 720px);
    padding: 1.35rem 1.5rem 1.5rem;
  }

  #productModal .qrModal__close {
    top: 0.85rem;
    right: 0.85rem;
  }
}

.qrModal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--qr-action);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  width: 2.25rem;
  box-shadow: var(--qr-shadow-sm);
}

.qrModal__close:hover {
  background: var(--qr-action-hover);
}

#productModalImageWrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--qr-surface-muted);
  overflow: hidden;
}

.qrModal__image {
  width: 100%;
  height: auto;
  max-height: min(46vh, 340px);
  object-fit: contain;
  object-position: center;
  display: block;
}

.qrModal__imagePlaceholder {
  width: 100%;
  min-height: 180px;
  max-height: min(46vh, 340px);
  aspect-ratio: 4 / 3;
  background: var(--qr-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qr-text-muted);
}

.qrModal__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.qrModal__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--qr-text);
  text-align: center;
  margin: 0 0 0.75rem;
}

.qrModal__desc {
  font-size: 0.875rem;
  color: var(--qr-text-muted);
  line-height: 1.6;
  margin: 0 0 1rem;
  text-align: center;
}

.qrModal__noteLabel {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--qr-text);
  margin-bottom: 0.4rem;
}

.qrModal__note {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--qr-border);
  border-radius: var(--qr-radius-sm);
  background: var(--qr-surface-muted);
  font-size: 16px;
  line-height: 1.4;
  resize: none;
  min-height: 3.5rem;
  margin-bottom: 1rem;
}

.qrModal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.qrQtyControl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qrQtyBtn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: var(--qr-action);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  width: 2.25rem;
  font-size: 1.1rem;
}

.qrQtyBtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.qrQtyValue {
  font-size: 1rem;
  font-weight: 700;
  min-width: 1.5rem;
  text-align: center;
}

.qrModal__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--qr-text);
}

.qrModal__addBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: var(--qr-radius-pill);
  background: var(--qr-action);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin: 0;
  transition: opacity 0.2s;
}

.qrModal__addBtn:hover {
  background: var(--qr-action-hover);
  color: #fff;
}

.cartFooter__submit:hover {
  background: var(--qr-action-hover);
}

.cartCard__qtyBtn:hover {
  background: var(--qr-action-hover);
  color: #fff;
}

.cartHeader__btn--close {
  background: var(--qr-action);
  color: #fff;
}

.cartHeader__btn--close:hover {
  background: var(--qr-action-hover);
}

.orderSuccessScreen__btn:hover {
  background: var(--qr-action-hover);
  color: #fff;
}

.qrQtyBtn:hover:not(:disabled) {
  background: var(--qr-action-hover);
}

/* ---- Google Translate: okunabilir dil seçici ---- */
#google_translate_element .goog-te-combo {
  color: var(--whiteColor, #fff) !important;
  background-color: var(--qr-action-hover) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#google_translate_element .goog-te-combo option {
  color: #1a1a1a !important;
  background-color: #ffffff !important;
}

.header--modern #google_translate_element .goog-te-combo {
  color: var(--whiteColor, #fff) !important;
  background-color: var(--qr-action-hover) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  width: 100% !important;
  max-width: 142px !important;
  font-size: 12px !important;
  padding: 6px 8px !important;
  cursor: pointer;
  line-height: normal !important;
}

.header--modern #google_translate_element .goog-te-combo option {
  color: #1a1a1a !important;
  background-color: #ffffff !important;
}

/* ---- Feedback Modal ---- */
.feedbackModal__icon {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  font-size: 2.5rem;
  color: var(--qr-action);
}

.feedbackModal__links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.feedbackModal__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--qr-radius-sm);
  background: var(--qr-surface-muted);
  color: var(--qr-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.feedbackModal__link:hover {
  background: #eee;
  color: var(--qr-text);
}

.feedbackForm {
  margin-top: 0.5rem;
}

.feedbackForm__input,
.feedbackForm__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--qr-border);
  border-radius: var(--qr-radius-sm);
  background: var(--qr-surface-muted);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  font-family: inherit;
}

.feedbackForm__textarea {
  resize: vertical;
  min-height: 5rem;
}

.feedbackForm__status {
  min-height: 1.25rem;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  color: var(--qr-text-muted);
}

.feedbackForm__status--success {
  color: #15803d;
}

.feedbackForm__status--error {
  color: #b91c1c;
}

/* ---- Bottom Navigation ---- */
.qrBottomNav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  box-sizing: border-box;
  align-items: stretch;
  justify-content: space-around;
  height: var(--qr-bottom-nav-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: var(--qr-bar);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

body.has-bottom-nav .qrBottomNav {
  display: flex;
}

.qrBottomNav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.qrBottomNav__item .bx {
  font-size: 1.35rem;
}

.qrBottomNav__item.is-active,
.qrBottomNav__item:hover {
  color: #fff;
}

.qrBottomNav__badge {
  position: absolute;
  top: 0.35rem;
  right: calc(50% - 1.25rem);
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 1rem;
  height: 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

.qrBottomNav__itemWrap {
  position: relative;
  flex: 1;
  display: flex;
}

body.has-bottom-nav {
  padding-bottom: var(--qr-bottom-nav-total-h);
}

body.has-bottom-nav .scrollTop {
  bottom: calc(var(--qr-bottom-nav-total-h) + 1rem);
}

/* ---- Modern Cart Page ---- */
.cartPage--modern {
  background: var(--qr-surface-muted);
  min-height: 100vh;
}

.cartPage--modern .cartSection {
  padding-top: 5rem;
  padding-bottom: 2rem;
}

.cartHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--qr-border);
  margin-bottom: 1rem;
}

.cartHeader__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--qr-text);
  margin: 0;
}

.cartHeader__actions {
  display: flex;
  gap: 0.5rem;
}

.cartHeader__btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--qr-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  width: 2.25rem;
  text-decoration: none;
}

.cartCard {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  background: var(--qr-surface);
  border: 1px solid var(--qr-border);
  border-radius: var(--qr-radius-md);
  margin-bottom: 0.75rem;
  animation: qrSlideUp 0.35s ease both;
}

.cartCard__image {
  width: 72px;
  height: 72px;
  border-radius: var(--qr-radius-sm);
  overflow: hidden;
  background: var(--qr-surface-muted);
}

.cartCard__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cartCard__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--qr-text);
  margin: 0 0 0.5rem;
}

.cartCard__qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cartCard__qtyBtn {
  width: 1.85rem;
  height: 1.85rem;
  border: none;
  border-radius: 6px;
  background: var(--qr-action);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  width: 1.85rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.cartCard__qtyValue {
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
}

.cartCard__price {
  font-weight: 800;
  font-size: 1rem;
  color: var(--qr-text);
  white-space: nowrap;
}

.cartFooter {
  position: sticky;
  bottom: 0;
  background: var(--qr-surface);
  border-top: 1px solid var(--qr-border);
  padding: 1.25rem 0 0;
  margin-top: 1rem;
}

.cartFooter__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--qr-text-muted);
}

.cartFooter__total strong {
  font-size: 1.35rem;
  color: var(--qr-text);
}

.cartFooter__submit {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: var(--qr-radius-pill);
  background: var(--qr-action);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin: 0 auto;
  max-width: 100%;
}

.cartCheckoutForm {
  padding: 1rem 0;
}

.cartCheckoutForm label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--qr-text);
}

.cartCheckoutForm input[type="text"],
.cartCheckoutForm textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--qr-border);
  border-radius: var(--qr-radius-sm);
  background: var(--qr-surface-muted);
  margin-bottom: 0.85rem;
  font-size: 16px;
  line-height: 1.4;
}

.cartCheckoutForm__note {
  resize: vertical;
  min-height: 4.5rem;
  font-family: inherit;
}

.cartCard__note {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--qr-text-muted);
  font-style: italic;
}

.cartEmpty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--qr-text-muted);
}

.cartEmpty .bx {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* ---- Order Confirm Modal ---- */
.orderConfirmModal .qrModal__panel {
  padding: 1.5rem;
  width: min(400px, 92vw);
}

.orderConfirmModal__icon {
  text-align: center;
  font-size: 2rem;
  color: var(--qr-action);
  margin-bottom: 0.75rem;
}

.orderConfirmModal__title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
}

.orderConfirmModal__desc {
  font-size: 0.85rem;
  color: var(--qr-text-muted);
  text-align: center;
  margin: 0 0 1.25rem;
}

.orderConfirmModal__items {
  border-top: 1px solid var(--qr-border);
  border-bottom: 1px solid var(--qr-border);
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
}

.orderConfirmModal__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 0.35rem 0;
}

.orderConfirmModal__total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.orderConfirmModal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.orderConfirmModal__btn {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: var(--qr-radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0;
}

.orderConfirmModal__btn--primary {
  background: var(--qr-action);
  color: #fff;
}

.orderConfirmModal__btn--primary:hover {
  background: var(--qr-action-hover);
}

.orderConfirmModal__btn--secondary {
  background: var(--qr-surface-muted);
  color: var(--qr-text);
}

/* ---- Order Success Screen ---- */
.orderSuccessScreen {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--qr-surface);
  padding: 2rem;
  animation: qrFadeIn 0.4s ease;
}

.orderSuccessScreen__icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--qr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: qrSuccessPop 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.orderSuccessScreen__icon .bx {
  font-size: 2rem;
  color: #fff;
}

.orderSuccessScreen__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--qr-text);
  margin: 0 0 0.75rem;
  animation: qrSlideUp 0.5s ease 0.25s both;
}

.orderSuccessScreen__message {
  font-size: 0.95rem;
  color: var(--qr-text-muted);
  text-align: center;
  line-height: 1.6;
  max-width: 320px;
  margin: 0 0 2rem;
  animation: qrSlideUp 0.5s ease 0.35s both;
}

.orderSuccessScreen__btn {
  width: min(320px, 88vw);
  padding: 1rem;
  border: none;
  border-radius: var(--qr-radius-pill);
  background: var(--qr-action);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  animation: qrSlideUp 0.5s ease 0.45s both;
}

/* ---- Toast notifications ---- */
.menus .success,
.menus .fail,
.cartPage--modern .success,
.cartPage--modern .fail {
  border-radius: var(--qr-radius-sm);
  margin-bottom: 1rem;
  animation: qrSlideUp 0.35s ease;
}

/* ---- Hide old hero when using cover flow ---- */
.appMain .sectionIntro {
  display: none;
}

.menus {
  background: var(--qr-surface-muted);
}

.menus .clientMenu {
  padding-top: 1rem;
}

/* ---- Responsive: taşma ve grid düzeltmeleri ---- */
.menus,
.menus .clientMenu .menuItems {
  max-width: 100%;
  overflow-x: clip;
}

.menus .clientMenu {
  max-width: 100%;
}

.menuToolbar {
  flex-wrap: wrap;
  gap: 0.65rem;
}

.menuToolbar__title {
  flex: 1 1 12rem;
  min-width: 0;
}

.menuToolbar__views {
  flex-shrink: 0;
}

.categoryCarousel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Grid görünüm: main.css sabit 290px kolonlarını ez */
.menus .clientMenu .menuItems.viewMode-grid .categoryWrapper {
  grid-template-columns: 1fr !important;
  justify-content: stretch;
  width: 100%;
}

@media (min-width: 560px) {
  .menus .clientMenu .menuItems.viewMode-grid .categoryWrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 900px) {
  .menus .clientMenu .menuItems.viewMode-grid .categoryWrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.menus .clientMenu .menuItems.viewMode-grid .categoryWrapper .item {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  min-width: 0;
}

/* Liste görünüm: tüm breakpoint'lerde tek kolon */
@media (min-width: 560px),
       (min-width: 860px),
       (min-width: 1024px),
       (min-width: 1240px) {
  .menus .clientMenu .menuItems.viewMode-list .categoryWrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Sepete ekle butonu: global button { width: 80% } taşmasını önle */
.menus .clientMenu .menuItems .categoryWrapper .item .itemInfor .qty_btn {
  width: 100%;
}

.menus .clientMenu .menuItems .categoryWrapper .item .itemInfor .qty_btn .cartBtn,
.menus .clientMenu .menuItems .categoryWrapper .item .itemInfor .qty_btn .cartBtn button,
.menus .clientMenu .menuItems .categoryWrapper .item .itemInfor button {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.menus .clientMenu .menuItems.viewMode-grid .item .cartBtn a {
  box-sizing: border-box;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
