
/* ── Image Clear Button ──────────────────────────────────────── */
.img-clear-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(24,14,7,.72);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
  z-index: 5;
  backdrop-filter: blur(4px);
}
.img-clear-btn:hover { background: var(--c-error); }

/* ── Rich Text Editor (contenteditable) ─────────────────────── */
.rich-editor {
  min-height: 200px;
  padding: .8rem 1rem;
  border: 1.5px solid var(--c-cream-3);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--c-ink);
  background: #fff;
  outline: none;
  cursor: text;
  transition: border-color var(--t-fast);
  overflow-y: auto;
}
.rich-editor:focus { border-color: var(--c-orange); }
.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--c-ink-4);
  pointer-events: none;
}
.rich-editor h2 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  margin: 1.1rem 0 .4rem; color: var(--c-ink);
}
.rich-editor h3 {
  font-size: 1.1rem; font-weight: 700;
  margin: .9rem 0 .35rem; color: var(--c-ink);
}
.rich-editor p  { margin: .5rem 0; }
.rich-editor ul, .rich-editor ol { padding-left: 1.5rem; margin: .5rem 0; }
.rich-editor li { margin: .2rem 0; }
.rich-editor blockquote {
  border-left: 3px solid var(--c-orange);
  padding: .5rem 1rem; margin: .75rem 0;
  color: var(--c-ink-3); background: var(--c-cream-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.rich-editor hr { border: none; border-top: 2px solid var(--c-cream-3); margin: 1rem 0; }
.rich-editor img { max-width: 100%; border-radius: var(--r-sm); margin: .5rem 0; display: block; }
.rich-editor strong { font-weight: 700; }
.rich-editor em { font-style: italic; }
.rich-editor a { color: var(--c-orange); }

/* ── Editor Toolbar ──────────────────────────────────────────── */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .6rem;
  background: var(--c-cream-2);
  border: 1px solid var(--c-cream-3);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: none;
}
.editor-toolbar button {
  padding: .3rem .65rem;
  border: 1.5px solid var(--c-cream-3);
  border-radius: 6px;
  background: #fff;
  font-size: .78rem;
  cursor: pointer;
  color: var(--c-ink-2);
  font-family: var(--font-body);
  transition: border-color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.editor-toolbar button:hover {
  border-color: var(--c-orange);
  background: var(--c-orange-pale);
}
.rich-editor-wrap .rich-editor {
  border-radius: 0 0 var(--r-md) var(--r-md);
}

/* ── Group Cards ─────────────────────────────────────────────── */
.group-card {
  border: 1.5px solid var(--c-cream-3);
  border-radius: var(--r-md);
  padding: 1.1rem 1.2rem;
  margin-bottom: .85rem;
  background: #fff;
  position: relative;
}
.group-card-header {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .75rem; flex-wrap: wrap;
}
.group-name-input {
  flex: 1; min-width: 160px;
  border: 1.5px solid var(--c-cream-3);
  border-radius: var(--r-sm);
  padding: .45rem .75rem;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--c-ink-2); font-family: var(--font-body);
  background: var(--c-cream); transition: border-color .15s;
}
.group-name-input:focus { outline: none; border-color: var(--c-orange); background: #fff; }
.group-remove-btn {
  padding: .35rem .7rem;
  border: 1.5px solid var(--c-cream-3);
  border-radius: var(--r-sm);
  background: #fff; color: var(--c-ink-4);
  font-size: .78rem; cursor: pointer;
  transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.group-remove-btn:hover { border-color: var(--c-error); color: var(--c-error); background: #FEF2F2; }
.group-textarea {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--c-cream-3);
  border-radius: var(--r-sm);
  padding: .65rem .85rem;
  font-size: var(--fs-sm); line-height: 1.65;
  font-family: var(--font-body); color: var(--c-ink);
  resize: vertical; transition: border-color .15s;
}
.group-textarea:focus { outline: none; border-color: var(--c-orange); }
.add-group-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border: 1.5px dashed var(--c-orange);
  border-radius: var(--r-sm);
  background: var(--c-orange-pale);
  color: var(--c-orange); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
  width: 100%; justify-content: center; margin-top: .25rem;
}
.add-group-btn:hover { background: var(--c-orange-pale2); border-style: solid; }

/* ── Group Name Suggestions dropdown ─────────────────────────── */
.group-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1.5px solid var(--c-orange);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-md);
  margin-top: .2rem;
  overflow: hidden;
  max-height: 210px;
  overflow-y: auto;
}
.group-sug-item {
  padding: .48rem .8rem;
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
  cursor: pointer;
  transition: background .1s, color .1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-sug-item:hover,
.group-sug-item.active {
  background: var(--c-orange-pale);
  color: var(--c-orange);
  font-weight: var(--fw-semibold);
}

/* ── Image Drop Zone - drag-over state ───────────────────────── */
.img-drop-zone.drag-over {
  border-color: var(--c-orange) !important;
  background: var(--c-orange-pale) !important;
  transform: scale(1.015);
  box-shadow: 0 0 0 3px rgba(212,85,10,.15);
}
.img-drop-zone.drag-over #img_drop_ph::before {
  content: 'Bırakın!';
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-orange);
  text-align: center;
  margin-bottom: .4rem;
}

/* ── Flash / Toast Bildirimleri ─────────────────────────────── */
.flash-container {
  position: fixed;
  top: calc(var(--nav-h) + 1rem);
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 420px;
  width: calc(100vw - 2.5rem);
  pointer-events: none;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1.5;
  pointer-events: auto;
  animation: flashSlideIn .32s var(--ease-out) both;
}

.flash--success { background: #F0FDF4; border-left: 4px solid var(--c-success); color: #14532D; }
.flash--error   { background: #FEF2F2; border-left: 4px solid var(--c-error);   color: #7F1D1D; }
.flash--warning { background: #FFFBEB; border-left: 4px solid var(--c-warning); color: #78350F; }
.flash--info    { background: #EFF6FF; border-left: 4px solid var(--c-info);    color: #1E3A5F; }

.flash-icon { flex-shrink: 0; margin-top: .1rem; align-self: center;}
.flash-msg  { flex: 1; }

.flash-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: .45;
  padding: 0;
  color: inherit;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}
.flash-close:hover { opacity: 1; }

.flash--out { animation: flashSlideOut .3s var(--ease-in) forwards; }

@keyframes flashSlideIn {
  from { opacity: 0; transform: translateX(2rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes flashSlideOut {
  to { opacity: 0; transform: translateX(2rem); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .6rem 1.4rem;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast),
              color       var(--t-fast),
              border-color var(--t-fast),
              transform  var(--t-fast),
              box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--c-orange);
  color: #fff;
  border-color: var(--c-orange);
}
.btn-primary:hover {
  background: var(--c-ink);
  border-color: var(--c-ink);
  box-shadow: var(--sh-orange);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--c-ink-2);
  border-color: var(--c-cream-3);
}
.btn-outline:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
  background: var(--c-orange-pale);
}

.btn-ghost {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.btn-dark {
  background: var(--c-ink);
  color: #fff;
}
.btn-dark:hover { background: var(--c-orange); transform: translateY(-1px); }

.btn-lg { padding: .85rem 2rem; font-size: var(--fs-base); }
.btn-sm { padding: .35rem .9rem; font-size: var(--fs-xs); }
.btn-icon-only { padding: .55rem; border-radius: var(--r-sm); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-lg svg { width: 18px; height: 18px; }

.sidecard {
  background: #fff;
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--sh-sm);
  border: 1px solid rgba(212,85,10,.07);
  margin-bottom: var(--sp-5);
}
.sidecard h3 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  padding-bottom: var(--sp-4);
  border-bottom: 1.5px solid var(--c-cream-3);
  margin-bottom: var(--sp-4);
}

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.info-item {
  background: var(--c-cream);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  text-align: center;
  border: 1px solid var(--c-cream-3);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.info-item:hover { border-color: rgba(212,85,10,.3); background: var(--c-orange-pale); }
.info-item svg { width: 20px; height: 20px; color: var(--c-orange); margin: 0 auto var(--sp-1); }
.info-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  line-height: 1.2;
}
.info-item span {
  font-size: var(--fs-xs);
  color: var(--c-ink-4);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  display: block;
  margin-top: 2px;
}
.info-full { grid-column: span 2; }

.nutri-display {
  text-align: center;
  padding: var(--sp-4) 0;
}
.nutri-display strong {
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  line-height: 1;
}
.nutri-display span {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--c-ink-3);
  letter-spacing: var(--ls-wide);
  margin-top: var(--sp-1);
  display: block;
}

.content-block {
  background: #fff;
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  box-shadow: var(--sh-sm);
  border: 1px solid rgba(212,85,10,.06);
  margin-bottom: var(--sp-6);
}
.content-block h2 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  padding-bottom: var(--sp-4);
  border-bottom: 1.5px solid var(--c-cream-3);
  margin-bottom: var(--sp-6);
}

.no-border h2 {
  border-bottom: unset !important;
}

.ingr-group { margin-bottom: var(--sp-6); }
.ingr-group:last-child { margin-bottom: 0; }
.ingr-group-label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: var(--sp-3);
}
.ingr-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-cream-3);
}
.ingr-list { display: flex; flex-direction: column; gap: var(--sp-1); }
.ingr-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--c-ink-2);
  cursor: pointer;
  transition: background var(--t-fast);
}
.ingr-item:hover { background: var(--c-orange-pale); }
.ingr-bullet {
  width: 7px; height: 7px;
  border-radius: var(--r-full);
  background: var(--c-orange);
  flex-shrink: 0;
}

.step-group { margin-bottom: var(--sp-8); }
.step-group:last-child { margin-bottom: 0; }
.step-group-label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: var(--sp-4);
}
.step-group-label::after {
  content: ''; flex: 1; height: 1px; background: var(--c-cream-3);
}
.step-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
  transition: background var(--t-fast);
}
.step-item:hover { background: var(--c-orange-pale); }
.step-num {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--c-orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(212,85,10,.3);
}
.step-text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: var(--lh-loose);
  color: var(--c-ink-2);
  padding-top: var(--sp-2);
}

.tip-card {
  background: linear-gradient(135deg, var(--c-orange-pale), #fffbf7);
  border: 1px solid rgba(212,85,10,.15);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.tip-card:last-child { margin-bottom: 0; }
.tip-title {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-orange);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.tip-title::before { content: '💡'; font-size: .9rem; }
.tip-body {
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: var(--lh-loose);
  color: var(--c-ink-2);
}

.action-bar { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.action-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-ink-3);
  border: 1.5px solid var(--c-cream-3);
  background: #fff;
  cursor: pointer;
  transition: all var(--t-fast);
  letter-spacing: var(--ls-wide);
}
.action-btn svg { width: 14px; height: 14px; }
.action-btn:hover { border-color: var(--c-orange); color: var(--c-orange); background: var(--c-orange-pale); }
.action-btn.on { background: var(--c-orange); border-color: var(--c-orange); color: #fff; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(24,14,7,.6);
  backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center;
  padding: var(--sp-4);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  width: 100%; max-width: 680px;
  max-height: 92vh; overflow-y: auto;
  box-shadow: var(--sh-xl);
  animation: modalIn var(--t-slow) var(--ease-spring);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.93) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-6);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}
.modal-close {
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: var(--c-cream-2); color: var(--c-ink-3);
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--c-cream-3); color: var(--c-ink); }

.toast-wrap {
  position: fixed; bottom: var(--sp-6); right: var(--sp-6);
  z-index: 99999;
  display: flex; flex-direction: column; gap: var(--sp-3);
  pointer-events: none;
}
.toast {
  background: var(--c-ink);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--sh-lg);
  display: flex; align-items: center; gap: var(--sp-3);
  border-left: 3px solid var(--c-orange);
  max-width: 340px;
  transform: translateX(120%);
  transition: transform var(--t-slow) var(--ease-spring);
  pointer-events: auto;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--c-success); }
.toast.error   { border-left-color: var(--c-error); }
.toast.warning { border-left-color: var(--c-warning); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: var(--sp-24) var(--sp-8);
}
.empty-icon {
  font-size: 3.5rem;
  margin-bottom: var(--sp-5);
  display: block;
  opacity: .4;
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-3);
}
.empty-state p {
  color: var(--c-ink-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  margin-bottom: var(--sp-6);
}

.flash-msg {
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  display: flex; align-items: center; gap: var(--sp-3);
}
.flash-msg.success { background: #F0FDF4; color: var(--c-success); border: 1px solid #BBF7D0; }
.flash-msg.error   { background: #FEF2F2; color: var(--c-error); border: 1px solid #FCA5A5; }
.flash-msg.info    { background: #EFF6FF; color: var(--c-info); border: 1px solid #BFDBFE; }

.footer { background: var(--c-ink); color: rgba(255,255,255,.7); }
.footer-marquee { background: var(--c-orange); padding: var(--sp-3) 0; overflow: hidden; }
.marquee-track  { display: flex; gap: var(--sp-5); white-space: nowrap; animation: marqueeScroll 25s linear infinite; }
.marquee-item   { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: rgba(255,255,255,.85); flex-shrink: 0; }
.marquee-dot    { color: rgba(255,255,255,.4); font-size: .45rem; align-self: center; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.footer-marquee:hover .marquee-track { animation-play-state: paused; }

.footer-body { padding: var(--sp-20) 0 var(--sp-12); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--sp-12); }
.footer-logo {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display); font-size: 1.4rem; font-weight: var(--fw-bold);
  color: var(--c-orange-3); margin-bottom: var(--sp-4);
}
.footer-logo svg { width: 22px; height: 22px; }
.footer-brand-desc {
  font-size: var(--fs-sm); font-weight: var(--fw-light);
  color: rgba(255,255,255,.4); line-height: var(--lh-loose);
  max-width: 260px;
}
.footer-socials { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.footer-social {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4); transition: all var(--t-fast);
}
.footer-social:hover { border-color: var(--c-orange-3); color: var(--c-orange-3); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-title {
  font-family: var(--font-body);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest); text-transform: uppercase;
  color: rgba(255,255,255,.35); margin-bottom: var(--sp-5);
}
.footer-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-links a {
  font-size: var(--fs-sm); font-weight: var(--fw-light);
  color: rgba(255,255,255,.55); transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--c-orange-3); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-block: var(--sp-6);
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-xs); font-weight: var(--fw-light);
  color: rgba(255,255,255,.3); flex-wrap: wrap; gap: var(--sp-3);
}
.footer-heart { color: var(--c-orange-3); }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); } }