:root {
  --primary: #e42d4c;
  --primary-dark: #c9203c;
  --primary-rgb: 228, 45, 76;
  --ink: #1b1b1b;
  --ink-soft: #2b2b2b;
  --muted: #8f8f8f;
  --card-bg: #ececec;
  --page-bg: #f7f5f3;
  --border: #ececec;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1080px;
  --header-h: 82px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 104px; /* leave room for the fixed action bar */
}

button {
  font-family: inherit;
}

a {
  color: inherit;
}

/* ---------- Header ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 41;
  background: #fff;
  box-shadow: 0 6px 16px -14px rgba(0, 0, 0, 0.25);
}

.app-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
  box-shadow: 0 10px 18px -8px rgba(var(--primary-rgb), 0.55);
}

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

.brand-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand-tag {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-btn {
  flex: 0 0 auto;
  border: none;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.qr-btn:hover {
  background: rgba(var(--primary-rgb), 0.16);
}

.qr-btn:active {
  transform: scale(0.92);
}

/* ---------- Header actions (dil + menü) ---------- */

.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Dil seçici ---------- */

.lang-switch {
  position: relative;
  flex: 0 0 auto;
}

.lang-toggle {
  border: none;
  background: transparent;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.lang-toggle:active {
  transform: scale(0.92);
}

.lang-toggle .lang-flag {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
  padding: 6px;
  list-style: none;
  margin: 0;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li {
  margin: 0;
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.lang-menu a:hover {
  background: var(--card-bg);
}

.lang-menu li.active a {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-weight: 600;
}

.lang-menu .lang-flag {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ---------- Categories ---------- */

.cat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 39;
  background: var(--page-bg);
}

.cat-nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 24px 4px;
}

.cat-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  /* overflow-x:auto, overflow-y'yi de auto yapar; aktif pill'in alt gölgesi
     kırpılmasın diye alta pay bırakılıyor */
  padding: 8px 5px 10px 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cat-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: 0 0 auto;
  border: none;
  background: var(--card-bg);
  color: #6b6b6b;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.cat-pill:hover {
  background: #e9e6e2;
}

.cat-pill:active {
  transform: scale(0.96);
}

.cat-pill.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 10px -8px rgba(var(--primary-rgb), 0.6);
}

.cat-pill.active:hover {
  background: var(--primary-dark);
}

/* ---------- Menu list ---------- */

.menu-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
}

.menu-section {
  scroll-margin-top: 150px;
}

.menu-section + .menu-section {
  margin-top: 34px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.menu-grid {
  display: grid;
  /* minmax(0, 300px): sabit, içerik uzunluğundan (uzun açıklama vb.) etkilenmeyen kart genişliği.
     "1fr" veya "auto" minimum kullanılsaydı, açıklaması uzun bir kart kendi sütununu diğerlerinden
     daha geniş yapıp satırdaki kart genişliklerini bozardı. */
  grid-template-columns: repeat(auto-fill, minmax(0, 300px));
  gap: 16px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  animation: item-in 0.25s ease both;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.menu-item:hover {
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

@keyframes item-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.item-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  object-fit: cover;
}

.item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.feature-badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.feature-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}

.item-name {
  margin: 0 0 2px;
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-price {
  flex: 0 0 auto;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Bottom social bar ---------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.action-bar-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 460px;
  background: var(--ink);
  border-radius: 999px;
  padding: 10px 10px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.45);
}

.comment-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.comment-btn i {
  color: var(--primary);
  font-size: 16px;
}

.comment-btn:hover {
  opacity: 0.85;
}

.comment-btn:active {
  transform: scale(0.96);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.social-btn:hover {
  background: var(--primary);
  color: #fff;
}

.social-btn:active {
  transform: scale(0.92);
}

/* ---------- Toast ---------- */

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

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

.app-toast i {
  color: var(--primary);
}

/* ---------- Offcanvas (hamburger menü) ---------- */

/* Bootstrap offcanvas-end varsayılan 400px; en fazla 300px olsun
   (çok dar ekranlarda 90vw ile taşmayı önle) */
#gizlimenu.offcanvas {
  width: 300px;
  max-width: 90vw;
}

.offcanvas .offcanvas-title {
  font-weight: 700;
}

.gizlimenu_ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gizlimenu_ul li a {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}

.gizlimenu_ul li a:hover {
  color: var(--primary);
}

.gizlimenu_footer {
  padding: 18px 20px;
}

.social_ul2 {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social_ul2 .ico {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.social_ul2 a:hover .ico {
  background: var(--primary);
  color: #fff;
}

/* ---------- Ürün detay modal (Bootstrap) ---------- */

#productModal .modal-content {
  border-radius: var(--radius-lg);
  border: none;
}

#productModal .modal-header {
  border: none;
  padding-bottom: 0;
}

#productModal .modal-body {
  padding: 0 24px 24px;
  text-align: center;
}

.modal-product-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.modal-product-name {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.feature-badges-modal {
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.feature-badge-lg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.feature-badge-lg img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.modal-product-desc {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 14px;
  text-align: left;
}

.modal-product-options {
  text-align: left;
  margin-bottom: 14px;
}

.option-group h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 6px;
}

.option-group ul li {
  font-size: 13.5px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.option-price {
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.modal-product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Yorum modal (Bootstrap) ---------- */

.comment-modal-card {
  border-radius: var(--radius-lg);
  border: none;
  position: relative;
  padding: 32px 28px;
}

.comment-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

#commentForm {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.star-picker {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
}

.comment-submit {
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.comment-submit:hover {
  background: var(--primary-dark);
}

.comment-submit:active {
  transform: scale(0.97);
}

.qr-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive tweaks ---------- */

@media (max-width: 560px) {
  :root {
    --header-h: 74px;
  }
  .app-header-inner {
    padding: 14px 14px;
  }
  .cat-nav-inner {
    padding: 0px 0px;
  }
  .menu-shell {
    padding: 16px 16px 100px 16px;
  }
  .menu-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .brand-tag {
    max-width: 55vw;
  }
}
