/* ============================================================
   KKY STYLE
   Tasarım token'ları panelden /kky/data/config.json üzerinden
   JS ile --ds-* CSS değişkenlerine yazılır.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* ---- Layout ---- */
  --header-h:       56px;
  --sidebar-w:      290px;
  --sidebar-closed: 48px;
  --menu-w:         160px;

  /* ---- Marka renkleri (panelden değiştirilmez, sabit) ---- */
  --green: #62b3a1;
  --blue:  #233970;
  --red:   #e53e3e;

  /* ---- Tasarım token'ları (panelden override edilir) ---- */
  --ds-bg:               #f7f7f8;        /* sayfa arka planı */
  --ds-card-bg:          #ffffff;        /* kart arka planı */
  --ds-card-border:      1.5px solid #e8e8ea;  /* kart çerçevesi */
  --ds-card-radius:      10px;           /* kart köşe yuvarlaklığı */
  --ds-card-shadow:      none;           /* kart gölgesi */
  --ds-thumb-bg:         transparent;   /* görsel alanı arka planı */
  --ds-accent:           #62b3a1;        /* vurgu rengi (butonlar) */
  --ds-text:             #111111;
  --ds-muted:            #888888;
  --ds-line:             #e8e8ea;
  --ds-grid-min:         150px;          /* kart min genişliği */
  --ds-grid-gap:         10px;           /* kartlar arası boşluk */
  --ds-sidebar-speed:    0.28s;          /* sepet açılma hızı */
  --ds-font:             'Segoe UI', system-ui, -apple-system, sans-serif;

  /* ---- Buton & Modal token'ları ---- */
  --ds-btn-radius:       8px;
  --ds-btn-padding:      11px 16px;
  --ds-btn-font-size:    13px;
  --ds-modal-radius:     14px;
  --ds-modal-img-ratio:  4/3;       /* modal görsel oranı */
  --ds-thumb-size:       100%;      /* kart görsel yüksekliği (aspect-ratio ile) */

  /* ---- Menü token'ları ---- */
  --ds-menu-bg:          #ffffff;   /* sol menü arka planı */
  --ds-menu-text:        #444444;   /* pasif kategori yazı rengi */
  --ds-menu-active-bg:   #eef8f6;   /* aktif kategori arka planı */
  --ds-menu-active-text: #62b3a1;   /* aktif kategori yazı rengi */
  --ds-menu-hover-bg:    #f0f7f5;   /* hover arka planı */
  --ds-menu-border:      #e8e8ea;   /* menü sağ kenarlık */
  --ds-menu-style:       light;     /* light | dark */

  /* Kısayollar */
  --bg:   var(--ds-bg);
  --card: var(--ds-card-bg);
  --text: var(--ds-text);
  --muted: var(--ds-muted);
  --line: var(--ds-line);
  --rc:   var(--ds-card-radius);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ds-font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--ds-header-bg, #ffffff);
  border-bottom: 1px solid var(--ds-header-border, #e8e8ea);
  z-index: 100;
  display: flex;
  align-items: center;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 100%;
  width: 100%;
}

.site-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header-logo img {
  height: var(--ds-header-logo-h, 32px);
  width: auto;
  object-fit: contain;
}

.site-header-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--ds-header-logo-color, #111111);
  letter-spacing: -0.3px;
}

.site-header-divider {
  width: 1px;
  height: 20px;
  background: var(--ds-header-border, #e8e8ea);
  flex-shrink: 0;
}

.site-header-tagline {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-header-tagline-color, #888888);
}

/* ============================================================
   SOL MENÜ
   ============================================================ */

.left-menu {
  position: fixed;
  top: var(--header-h); left: 0; bottom: 0;
  width: var(--menu-w);
  background: var(--ds-menu-bg);
  border-right: 1px solid var(--ds-menu-border);
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.left-menu::-webkit-scrollbar { width: 3px; }
.left-menu::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.left-menu-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 16px 13px 8px;
}

.left-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  padding: 9px 12px 9px 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ds-menu-text);
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.left-menu-item:hover {
  background: var(--ds-menu-hover-bg);
  color: var(--ds-menu-active-text);
}

.left-menu-item.active {
  border-left-color: var(--ds-menu-active-text);
  background: var(--ds-menu-active-bg);
  color: var(--ds-menu-active-text);
  font-weight: 700;
}

.left-menu-item.active::after {
  content: "›";
  font-size: 14px;
  font-weight: 700;
  color: var(--ds-menu-active-text);
  margin-left: auto;
}

.left-menu-item img {
  width: 20px; height: 20px;
  object-fit: contain; flex-shrink: 0;
}

.left-menu-item span {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
}

.menu-icon-placeholder {
  width: 20px; height: 20px;
  border-radius: 4px; background: #eee; flex-shrink: 0;
}

.menu-loader {
  padding: 10px 13px;
  font-size: 11px; color: var(--muted);
}


/* ============================================================
   ANA İÇERİK
   ============================================================ */

.products {
  margin-left: var(--menu-w);
  margin-right: var(--sidebar-closed);
  min-height: 100vh;
  padding: 24px 20px 100px;
  padding-top: calc(var(--header-h) + 24px);
  transition: margin-right var(--ds-sidebar-speed) ease;
}

body.sidebar-open .products {
  margin-right: var(--sidebar-w);
}

.products-head { margin-bottom: 18px; }
.products-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.products-head p  { margin: 0; font-size: 13px; color: var(--muted); }

.summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--rc);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.summary-line {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 13px; font-weight: 600; color: var(--text);
}

.summary-item { white-space: nowrap; }

/* ============================================================
   ÜRÜN GRİDİ
   ============================================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--ds-grid-min), 1fr));
  gap: var(--ds-grid-gap);
}

.category-head {
  grid-column: 1 / -1;
  padding: 0 0 10px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}

.category-head:first-child { margin-top: 0; }
.category-head h2 { margin: 0 0 3px; font-size: 18px; font-weight: 700; }
.category-head p  { margin: 0; font-size: 13px; color: var(--muted); }

/* ============================================================
   ÜRÜN KARTI
   Çerçeve ve arka plan panelden kontrol edilir.
   PNG görseller için "frameless" modu: border yok, bg şeffaf.
   ============================================================ */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ds-card-bg);
  border: var(--ds-card-border);
  border-radius: var(--rc);
  box-shadow: var(--ds-card-shadow);
  overflow: visible;           /* dekupe görseller taşabilsin */
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

/* overflow:visible ile köşe yuvarlama için clip-path yerine pseudo */
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--rc);
  pointer-events: none;
}

.product-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

/* Çerçeveli mod (varsayılan) */
body:not(.frameless-cards) .product-card:hover {
  border-color: #ccc;
}

/* Çerçevesiz mod — panelden aktif edilince */
body.frameless-cards .product-card {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.frameless-cards .product-card:hover {
  transform: translateY(-3px);
  box-shadow: none !important;
}

body.frameless-cards .product-bottom {
  border-top: none;
  background: transparent;
  text-align: center;
}

.product-card.selected-box {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

/* Görsel */
.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--ds-thumb-bg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 12px; font-weight: 600;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  border-radius: var(--rc) var(--rc) 0 0;
  overflow: hidden;
}

/* Çerçevesiz modda görsel taşabilir */
body.frameless-cards .product-thumb {
  overflow: visible;
  background-color: transparent;
  border-radius: 0;
}

.product-card:hover .product-thumb { transform: scale(1.04); }

/* Alt bilgi */
.product-bottom {
  padding: 8px 9px 10px;
  border-top: 1px solid #f0f0f0;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--ds-card-bg);
  border-radius: 0 0 var(--rc) var(--rc);
}

.product-title-bottom {
  font-size: 11.5px; font-weight: 500; line-height: 1.35; color: var(--text);
}

.product-price-bottom {
  font-size: 12px; font-weight: 700; color: var(--blue);
}

/* Eklendi rozet */
.added-badge {
  position: absolute; top: 7px; left: 7px; z-index: 5;
  background: var(--blue); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  pointer-events: none;
  animation: badgePop 0.2s ease;
}

@keyframes badgePop {
  from { opacity: 0; transform: scale(0.75); }
  to   { opacity: 1; transform: scale(1); }
}

/* Hover ekle butonu */
.card-quick-add {
  position: absolute;
  top: 6px; right: 6px; z-index: 5;
  border: none; border-radius: 20px;
  padding: 3px 8px;
  font-size: 10px; font-weight: 700;
  background: var(--ds-accent); color: #fff;
  cursor: pointer;
  opacity: 0; transform: translateY(-3px);
  transition: opacity 0.16s, transform 0.16s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.14);
  white-space: nowrap; line-height: 1.4;
}

.product-card:hover .card-quick-add { opacity: 1; transform: translateY(0); }
.card-quick-add:disabled { background: #bbb; cursor: not-allowed; }

/* Mobilde hover çalışmaz — hızlı ekle butonunu gizle, karta tıklayınca modal açılır */
@media (hover: none), (max-width: 768px) {
  .card-quick-add { display: none !important; }
}

/* Inline qty kontrolü */
.inline-qty-controls {
  position: absolute;
  bottom: 44px;
  left: 50%; transform: translateX(-50%);
  z-index: 6;
  display: flex; align-items: center; gap: 2px;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 24px;
  padding: 2px 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  white-space: nowrap;
}

.qty-btn {
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0; line-height: 1;
  transition: background 0.15s;
}

.qty-btn:hover { background: var(--green); }

.qty-btn[data-action="remove"] {
  background: #f5f5f5; color: #aaa;
  border: 1px solid #ddd; font-size: 11px;
}

.qty-btn[data-action="remove"]:hover {
  background: #fee2e2; color: var(--red); border-color: #fca5a5;
}

.qty-count {
  min-width: 18px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--text);
}

/* Kilitli ürün */
.product-locked { opacity: 0.5; }

.product-lock-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.45);
  color: var(--blue); font-size: 11px; font-weight: 700;
  pointer-events: none; text-align: center; padding: 8px;
  border-radius: var(--rc);
}

/* Boş kategori */
.category-empty {
  grid-column: 1 / -1;
  padding: 28px; text-align: center;
  color: var(--muted); font-size: 13px;
  background: #fff; border-radius: var(--rc);
  border: 1.5px dashed #ddd;
}

/* Skeleton */
.product-card.skeleton {
  pointer-events: none;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border: 1.5px solid var(--line) !important;
  background: #fff !important;
}

.skeleton-thumb { width: 100%; aspect-ratio: 1/1; background: #ebebeb; }
.skeleton-line  { height: 10px; background: #ebebeb; border-radius: 4px; margin: 5px 9px; }
.skeleton-line.short { width: 50%; }

@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ============================================================
   SAĞ SEPET
   ============================================================ */

.sidebar {
  position: fixed;
  top: var(--header-h); right: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 90;
  display: flex; flex-direction: column;
  box-shadow: -3px 0 14px rgba(0,0,0,0.05);
  transform: translateX(calc(100% - var(--sidebar-closed)));
  transition: transform var(--ds-sidebar-speed) ease;
}

.sidebar:not(.collapsed)    { transform: translateX(0); }
.sidebar.collapsed          { cursor: pointer; }

.sidebar.collapsed::before {
  content: ""; position: absolute;
  left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--green);
}

.sidebar.collapsed .sidebar-body,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .sidebar-title-text {
  opacity: 0; pointer-events: none;
}

/* Mobilde alttan yukarı çıkar */
@media (max-width: 768px) {
  .sidebar {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 85vh;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    transform: translateY(100%);
  }
  .sidebar:not(.collapsed) { transform: translateY(0); }
  .sidebar.collapsed {
    transform: translateY(100%);
    cursor: default;
  }
  .sidebar.collapsed::before { display: none; }
  .sidebar.collapsed .sidebar-body,
  .sidebar.collapsed .sidebar-footer,
  .sidebar.collapsed .sidebar-title-text {
    opacity: 1; pointer-events: auto;
  }
}

.sidebar-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px; border-bottom: 1px solid var(--line);
  min-height: 62px; flex-shrink: 0;
}

.sidebar-title { display: flex; align-items: center; gap: 10px; }

.gift-icon { font-size: 24px; position: relative; flex-shrink: 0; line-height: 1; }

.gift-count {
  position: absolute; right: -10px; bottom: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #dbeafe; color: #1d4ed8;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

.sidebar-title-text { font-size: 15px; font-weight: 700; }

.toggle-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #f5f5f7; cursor: pointer;
  font-size: 15px; color: #555;
  display: flex; align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0; transition: background 0.15s;
}

.toggle-btn:hover { background: #e9e9eb; }

.sidebar-body { flex: 1; overflow-y: auto; padding: 10px; }
.sidebar-body::-webkit-scrollbar { width: 3px; }
.sidebar-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.sidebar-list { display: flex; flex-direction: column; gap: 8px; }

.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff;
}

.sidebar-thumb {
  width: 46px; height: 46px; border-radius: 7px;
  background: #f5f5f5;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #bbb;
  flex-shrink: 0; border: 1px solid #eee;
}

.sidebar-info { flex: 1; min-width: 0; }
.sidebar-info strong { display: block; font-size: 11.5px; line-height: 1.35; margin-bottom: 2px; }
.sidebar-info .price { font-size: 12px; font-weight: 700; color: var(--blue); }

.sidebar-qty-controls { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }

.mini-btn {
  width: 22px; height: 22px;
  border: 1px solid var(--line); border-radius: 5px;
  background: #f5f5f7; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background 0.12s, color 0.12s;
}

.mini-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.mini-btn[data-action="remove"] { font-size: 11px; color: #ccc; }
.mini-btn[data-action="remove"]:hover { background: #fee2e2; color: var(--red); border-color: #fca5a5; }

.mini-count { min-width: 16px; text-align: center; font-size: 12px; font-weight: 700; }

.sidebar-footer { border-top: 1px solid var(--line); padding: 12px; flex-shrink: 0; }

.totals { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 8px; }

.capacity-line { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.progress { height: 5px; background: #eee; border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.progress-bar { height: 100%; width: 0%; background: var(--green); transition: width 0.3s ease; }

.shipping-nudge {
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 8px; padding: 7px 10px;
  font-size: 11.5px; color: #9a3412;
  margin-bottom: 10px; line-height: 1.5;
}
.shipping-nudge strong { color: #c2410c; }

.checkout-btn {
  width: 100%; border: none; border-radius: 8px;
  padding: 12px; background: var(--ds-accent); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.checkout-btn:hover { filter: brightness(0.9); }

/* ============================================================
   MODAL
   ============================================================ */

.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.52);
  display: none; align-items: flex-start; justify-content: center;
  padding: 16px; z-index: 120;
  overflow-y: auto;
  touch-action: none;
}
.modal.show { display: flex; }

.modal-card {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: var(--ds-modal-radius);
  overflow: visible; box-shadow: 0 24px 56px rgba(0,0,0,0.22);
  margin: auto;
}

.modal-image {
  width: 100%; aspect-ratio: var(--ds-modal-img-ratio);
  background: #f5f5f5;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 13px; font-weight: 600;
}

.modal-body { padding: 18px; }
.modal-body h3 { margin: 0 0 7px; font-size: 18px; font-weight: 700; }
.modal-body p  { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }

.modal-price { font-size: 20px; font-weight: 700; color: var(--blue); margin-bottom: 14px; }

.modal-actions { display: flex; gap: 10px; }
.modal-actions button { flex: 1; border: none; border-radius: var(--ds-btn-radius); padding: var(--ds-btn-padding); font-size: var(--ds-btn-font-size); font-weight: 700; cursor: pointer; transition: background 0.15s; }
.btn-secondary { background: #f0f0f2; color: #333; }
.btn-secondary:hover { background: #e5e5e7; }
.btn-primary   { background: var(--ds-accent); color: #fff; }
.btn-primary:hover { filter: brightness(0.9); }

.summary-modal-card { max-width: 520px; }
.summary-box { background: #f7f7f9; border: 1px solid #eee; border-radius: 9px; padding: 12px; margin-bottom: 10px; }
.summary-box h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.5; padding: 3px 0; }

/* ---- Adım uyarısı (kutu/kırpık zorunlu) ---- */
.step-warning {
  position: fixed;
  top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 500;
  background: #1a1a2e;
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  border-left: 4px solid #f5a623;
  display: flex; align-items: center; gap: 10px;
  animation: warningSlide 0.25s ease;
  white-space: nowrap;
}

@keyframes warningSlide {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* Mobilde sidebar açıkken arka planı kilitle — sadece mobil */
@media (max-width: 768px) {
  body.sidebar-open {
    overflow: hidden;
    touch-action: none;
  }
  body.sidebar-open .products,
  body.sidebar-open #productGrid {
    pointer-events: none;
  }
}
body.dark-menu .left-menu { background: var(--ds-menu-bg); border-right-color: rgba(255,255,255,0.08); }
body.dark-menu .left-menu-title { color: rgba(255,255,255,0.4); }
body.dark-menu .left-menu-item { color: rgba(255,255,255,0.7); }
body.dark-menu .left-menu-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
body.dark-menu .left-menu-item.active { color: var(--ds-menu-active-text); }
/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  :root { --sidebar-w: 260px; --menu-w: 140px; }
}

@media (max-width: 768px) {
  :root { --menu-w: 0px; --sidebar-w: 250px; --sidebar-closed: 36px; --header-h: 48px; }

  .site-header-divider,
  .site-header-tagline { display: none; }

  /* Menü üste yatay tab bar */
  .left-menu {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: auto;
    width: 100%; height: 44px;
    flex-direction: row;
    overflow-x: auto; overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid var(--ds-menu-border);
    background: var(--ds-menu-bg);
    z-index: 80;
    padding: 0;
    gap: 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  .left-menu::-webkit-scrollbar { display: none; }

  .left-menu-title { display: none; }

  .left-menu-item {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    height: 44px;
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.55;
  }

  .left-menu-item img { width: 18px; height: 18px; }
  .left-menu-item span { display: inline; }
  .left-menu-item .menu-icon-placeholder { display: none; }
  .left-menu-item img[src=""] { display: none; }
  .left-menu-item.active::after { display: none; }

  .left-menu-item.active {
    border-bottom: 3px solid var(--green);
    border-left: none;
    color: var(--ds-menu-active-text);
    font-weight: 700;
    opacity: 1;
  }

  /* İçerik alanı — üstteki menü + header kadar boşluk */
  .products {
    margin-left: 0;
    margin-right: 0;
    padding: 12px 10px 80px;
    padding-top: calc(var(--header-h) + 44px + 12px);
  }

  /* Mobilde sidebar alttan çıkıyor — sağ margin gerekmez */
  body.sidebar-open .products {
    margin-right: 0;
  }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 7px; }
}

@media (max-width: 480px) {
  :root { --menu-w: 46px; --sidebar-w: min(80vw, 260px); --sidebar-closed: 30px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
}

/* ============================================================
   KİŞİSELLEŞTİRME ALANLARI (modal içi)
   ============================================================ */
.modal-personalization-wrap {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff8f0;
  border: 1px solid #f0e0c8;
  border-radius: 10px;
}

.modal-personalization-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-bottom: 10px;
}

.modal-pers-field {
  margin-bottom: 10px;
}

.modal-pers-field:last-child {
  margin-bottom: 0;
}

.modal-pers-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 5px;
}

.modal-pers-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
  color: #333;
  outline: none;
  transition: border-color 0.15s;
}

.modal-pers-field textarea:focus {
  border-color: var(--ds-accent);
}

.modal-photo-drop {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal-photo-drop:hover,
.modal-photo-drop.drag-over {
  border-color: var(--ds-accent);
  background: #f0faf8;
}

.modal-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #999;
  font-size: 12px;
}

.modal-photo-placeholder span:first-child {
  font-size: 22px;
}

.modal-photo-remove {
  margin-top: 6px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 11px;
  color: #888;
  cursor: pointer;
}

.modal-photo-remove:hover {
  background: #fee;
  border-color: #f99;
  color: #c00;
}

/* ============================================================
   MOBİL SEPET BARI
   ============================================================ */
.mobile-cart-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  padding: 8px 12px 12px;
  background: transparent;
}

@media (max-width: 768px) {
  .mobile-cart-bar { display: block; }
}

.mobile-cart-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  background: var(--ds-accent); color: #fff;
  border: none; border-radius: 14px;
  padding: 13px 18px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.mobile-cart-btn-icon { font-size: 18px; }
.mobile-cart-btn-text { flex: 1; text-align: left; }
.mobile-cart-badge {
  background: #fff; color: var(--ds-accent);
  border-radius: 20px; padding: 2px 8px;
  font-size: 12px; font-weight: 800;
}
.mobile-cart-total { font-size: 14px; font-weight: 700; }

/* Modal açıkken mobil cart bar'ı gizle */
.modal.show ~ * .mobile-cart-bar,
body:has(.modal.show) .mobile-cart-bar {
  display: none !important;
}
