/* Phase 506 — Yaprakzade Hub & Spoke Mega Nav + Promo Bar
 * Editorial tarz: ana logo solda, 3 mega-trigger + 2 link, sağda search+cart+CTA.
 * Mega panel: 3 sütun (feature card + 2 link sütunu). Hover/click açılır.
 * Mobile (<880px): hamburger → akordeon panel.
 */

/* ========== PROMO BAR ========== */
.yp-promo-bar {
  background: linear-gradient(90deg, #f7efd9 0%, #faf3e0 60%, #f7efd9 100%);
  color: #4a3a1a;
  border-bottom: 1px solid rgba(74,58,26,.12);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
}
.yp-promo-bar::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(45,122,62,.04) 0 14px, transparent 14px 28px);
  pointer-events: none;
}
.yp-promo-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  position: relative;
}
.yp-promo-icon {
  font-size: 18px;
  animation: yp-promo-truck 6s ease-in-out infinite;
}
@keyframes yp-promo-truck {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
.yp-promo-text { flex: 1; }
.yp-promo-text strong { color: #2d5e3e; font-weight: 700; }
.yp-promo-close {
  background: transparent; border: none;
  color: #4a3a1a; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background .15s ease;
}
.yp-promo-close:hover { background: rgba(74,58,26,.1); }
.yp-promo-bar.is-hidden { display: none; }

/* ========== MEGA NAV ========== */
.yp-meganav-host { position: relative; z-index: 50; }

.yp-mn {
  display: flex; align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  font-family: 'Outfit', system-ui, sans-serif;
}
.yp-mn-trigger,
.yp-mn-link {
  position: relative;
  background: transparent; border: none;
  color: #1f2937;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
  transition: color .18s ease, background .18s ease;
  font-family: inherit;
}
.yp-mn-trigger:hover,
.yp-mn-link:hover,
.yp-mn-trigger[aria-expanded="true"],
.yp-mn-trigger.is-current,
.yp-mn-link.is-current {
  color: #2d5e3e;
}
.yp-mn-link.is-current::after,
.yp-mn-trigger.is-current::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, #2d5e3e 0%, #c9a96e 100%);
  border-radius: 2px;
}
.yp-mn-dot {
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  vertical-align: middle;
  transition: transform .18s ease, opacity .18s ease;
}
.yp-mn-trigger[aria-expanded="true"] .yp-mn-dot {
  opacity: 1;
  transform: scale(1.6);
  background: #c9a96e;
}

/* CTA - Toptan Teklif */
.yp-cta-toptan {
  background: linear-gradient(135deg, #2d5e3e 0%, #1f4530 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(45,94,62,.25);
  transition: transform .15s ease, box-shadow .2s ease;
}
.yp-cta-toptan::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(201,169,110,.4) 100%);
  opacity: 0;
  transition: opacity .25s ease;
}
.yp-cta-toptan:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45,94,62,.35);
}
.yp-cta-toptan:hover::before { opacity: 1; }
.yp-cta-toptan > * { position: relative; z-index: 1; }

/* ========== MEGA PANELS ========== */
/* Phase 506b — fix flood: panel + 8px üstte overlay alarak nav ile panel
 * arasındaki pixel boşluğunu yok et. Ayrıca display:none → görsel kapatma
 * için visibility/opacity, layout sabitlenir, mouse aşağı kayarken close
 * timer flood'una yol açmaz. */
.yp-mn-panels {
  position: absolute;
  top: calc(100% - 8px);  /* -8px overlap nav ile arasındaki gap'i kapatır */
  left: 0; right: 0;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 24px 48px -16px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 49;
  pointer-events: none;
}
.yp-mn-panels.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
@keyframes yp-mn-fadein {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.yp-mn-panel { display: none; }
.yp-mn-panel.is-active { display: block; }

.yp-mn-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  /* Phase 506b — top padding artırıldı (40 → 38) çünkü panel -8px overlap
   * ediyor, görsel boşluk korunuyor. */
  padding: 38px 16px 36px;
  align-items: start;
}

/* Feature card (sol kolon — editorial hero) */
.yp-mn-feature {
  background: linear-gradient(135deg, #f5f1e8 0%, #faf6ec 100%);
  border-radius: 14px;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45,94,62,.1);
}
.yp-mn-feature::after {
  content: "🌿";
  position: absolute;
  right: -10px; top: -10px;
  font-size: 90px;
  opacity: .07;
  transform: rotate(15deg);
  pointer-events: none;
}
.yp-mn-feature-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #c9a96e;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.yp-mn-feature h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  line-height: 1.25;
  color: #1f2937;
  margin: 0 0 10px;
  font-weight: 700;
}
.yp-mn-feature p {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.55;
  margin: 0 0 16px;
}
.yp-mn-feature-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: #2d5e3e;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, gap .15s ease;
}
.yp-mn-feature-cta:hover {
  border-color: #c9a96e;
  gap: 10px;
}

/* Columns (link listeleri) */
.yp-mn-col-title {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}
.yp-mn-col ul {
  list-style: none;
  margin: 0; padding: 0;
}
.yp-mn-col li { margin-bottom: 2px; }
.yp-mn-col a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #1f2937;
  font-size: 14.5px;
  text-decoration: none;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.yp-mn-col a span {
  font-size: 16px;
  width: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}
.yp-mn-col a:hover {
  background: linear-gradient(90deg, #f5f1e8 0%, transparent 100%);
  color: #2d5e3e;
  transform: translateX(2px);
}

/* Backdrop */
.yp-mn-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 48;
}
.yp-mn-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ========== MOBILE ========== */
@media (max-width: 880px) {
  .yp-mn { display: none; }
  .yp-mn-panels {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(360px, 90vw);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .25s ease;
    display: block;
    box-shadow: 8px 0 32px rgba(0,0,0,.25);
    z-index: 90;
  }
  .yp-mn-panels.is-mobile-open {
    transform: translateX(0);
  }
  .yp-mn-panel {
    display: block;
    border-bottom: 1px solid #f3f4f6;
    padding: 0;
  }
  .yp-mn-panel::before {
    content: attr(aria-label);
    display: block;
    padding: 14px 20px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #c9a96e;
    letter-spacing: .15em;
    text-transform: uppercase;
    background: #faf6ec;
  }
  .yp-mn-grid {
    grid-template-columns: 1fr;
    padding: 12px 20px 18px;
    gap: 14px;
  }
  .yp-mn-feature {
    padding: 16px 18px;
    margin-bottom: 4px;
  }
  .yp-mn-feature h3 { font-size: 18px; }
  .yp-mn-feature p { font-size: 13.5px; margin-bottom: 10px; }
  .yp-mn-col-title { display: none; }
  .yp-mn-col a { padding: 10px 0; font-size: 15.5px; }
  .yp-mn-col li { border-bottom: 1px solid #f9fafb; }
}

/* ========== STICKY POSITION ========== */
.yp-promo-bar + .main-header { /* main-header zaten sticky ise korunur */ }
