/* ==========================================================================
   Dişbul — layout.css
   Header, mega menüler, mobil çekmece menü, footer, ortak ızgaralar.
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner { display: flex; align-items: center; gap: var(--sp-6); height: var(--header-h); }

/* Geçici logo alanı (gerçek logo dosyası gelince <img> ile değiştirilecek) */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--navy-900); flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  background: var(--teal-50); color: var(--teal-600); border: 1.5px dashed var(--teal-500);
}
.logo-mark .ic { width: 24px; height: 24px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text strong { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; color: var(--navy-700); }
.logo-text small { font-size: 10px; font-weight: 500; color: var(--gray-600); margin-top: 3px; }

.main-nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  height: var(--header-h); padding: 0 var(--sp-3);
  font-size: var(--fs-sm); font-weight: 700; color: var(--navy-900);
  background: none; border: 0; border-bottom: 3px solid transparent; border-top: 3px solid transparent;
  white-space: nowrap;
}
.nav-link .ic { width: 16px; height: 16px; color: var(--gray-500); transition: transform .2s; }
.nav-link:hover { color: var(--teal-700); text-decoration: none; }
.nav-item.open > .nav-link { color: var(--teal-700); }
.nav-item.open > .nav-link .ic { transform: rotate(180deg); color: var(--teal-600); }
.nav-link[aria-current="page"], .nav-item.is-current > .nav-link { color: var(--teal-700); border-bottom-color: var(--teal-600); }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); }
.header-actions .btn { min-height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-xs); text-transform: uppercase; }
.nav-toggle, .header-login-icon { display: none; }
.header-search { position: relative; }
.header-search summary { list-style: none; cursor: pointer; width: 40px; padding: 0 !important; display: inline-grid; place-items: center; }
.header-search summary::-webkit-details-marker { display: none; }
.header-search-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 130; width: 380px;
  display: flex; gap: var(--sp-2); padding: var(--sp-3); background: #fff;
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.header-search-pop .input { flex: 1; min-width: 0; }
/* Dar masaüstü (1024–1439): 7 menü öğesi + butonlar tek satıra sığsın */
@media (min-width: 1024px) and (max-width: 1599px) {
  .header-inner { gap: var(--sp-4); }
  .nav-list { gap: 0; }
  .nav-link { padding: 0 10px; }
  .header-actions .btn { padding: 0 var(--sp-3); }
  .header-actions .btn-navy-outline { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .logo-text small { display: none; }
  .logo-text strong { font-size: 1.15rem; }
  .header-inner { gap: var(--sp-3); }
  .nav-link { padding: 0 6px; font-size: 13px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 0 10px; font-size: 11px; }
  .logo-mark { width: 36px; height: 36px; }
  .nav-link .ic { width: 14px; height: 14px; }
}
.nav-actions { display: none; }

/* ---------- Mega menü (masaüstü) ---------- */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  display: none; padding-block: var(--sp-6);
  background: #fff; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 24px 40px -16px rgba(16,42,99,.18);
}
.nav-item.open > .mega { display: block; }
.mega-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(240px, .95fr); gap: var(--sp-8); }
.mega-col .mega-h {
  margin-bottom: var(--sp-3);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700);
}
.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-list a {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 7px 8px; margin-inline: -8px; border-radius: 8px; color: var(--gray-900); font-size: var(--fs-sm); font-weight: 600;
}
.mega-list a:hover { background: var(--teal-50); text-decoration: none; color: var(--teal-800); }
.mega-list .ic { color: var(--teal-600); width: 18px; height: 18px; }
.mega-list small { display: block; font-size: 11px; font-weight: 500; color: var(--gray-600); }
.mega-list .count { margin-left: auto; font-size: 11px; color: var(--gray-500); font-weight: 500; }
.mega-thumb { width: 52px; flex-shrink: 0; border-radius: 6px; --ratio: 4 / 3; }
.mega-thumb .ic { max-width: 20px; }
.mega-logo { height: 40px; display: grid; place-items: center; padding: 4px 6px; background: #fff; border: 1px solid var(--gray-200); }
.mega-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.mega-img { position: relative; height: 39px; overflow: hidden; background: var(--gray-100); }
.mega-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-video .ic { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
@media (min-width: 1024px) {
  .mega-inner { column-gap: 0; }
  .mega-inner > .mega-col { padding-inline: var(--sp-6); }
  .mega-inner > .mega-col:first-child { padding-left: 0; }
  .mega-inner > .mega-col + .mega-col { border-left: 1px solid var(--gray-200); }
  .mega-inner > .mega-promo { margin-left: var(--sp-6); }
}
.mega-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mega-col .link-arrow { margin-top: var(--sp-3); }
.mega-promo {
  display: flex; flex-direction: column; justify-content: center; gap: var(--sp-3);
  padding: var(--sp-6); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--teal-50), #eef4fb);
}
.mega-promo .icon-box { background: #fff; }
.mega-promo .mega-h { font-weight: 800; line-height: 1.25; font-size: var(--fs-lg); color: var(--navy-900); text-transform: none; letter-spacing: 0; margin: 0; }
.mega-promo p { font-size: var(--fs-sm); color: var(--gray-700); }
.mega-promo .btn { align-self: flex-start; }

/* ---------- Mobil / tablet ---------- */
.nav-backdrop { display: none; }

@media (max-width: 1180px) {
  .header-actions .btn-navy-outline { display: none; }
}

@media (max-width: 1023px) {
  :root { --header-h: 64px; }
  /* backdrop-filter, fixed çekmece için yeni bir kapsayıcı oluşturur; mobilde kapat */
  .site-header { backdrop-filter: none; background: #fff; }
  .header-inner { gap: var(--sp-3); justify-content: space-between; }
  .header-actions { display: none; }
  .header-login-icon { display: inline-grid; }
  .nav-toggle { display: inline-grid; }
  .header-tools { display: flex; gap: var(--sp-2); margin-left: auto; }

  .main-nav {
    position: fixed; inset: 0 0 0 auto; z-index: 120;
    width: min(380px, 88vw); height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column;
    background: #fff; box-shadow: var(--shadow-lg);
    transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
  }
  body.nav-open .main-nav { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .nav-backdrop {
    position: fixed; inset: 0; z-index: 110; background: rgba(11,31,77,.45);
    opacity: 0; transition: opacity .25s; pointer-events: none; display: block;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  .drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; background: #fff; z-index: 1;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-2) 0; }
  .nav-item { border-bottom: 1px solid var(--gray-100); }
  .nav-link { width: 100%; height: auto; padding: var(--sp-4); justify-content: space-between; font-size: var(--fs-md); border: 0; }
  .nav-link[aria-current="page"], .nav-item.is-current > .nav-link { border: 0; background: var(--teal-50); }

  .mega { position: static; box-shadow: none; border: 0; padding: 0 var(--sp-4) var(--sp-4); }
  .mega .container { padding: 0; }
  .mega-inner { grid-template-columns: 1fr; gap: var(--sp-5); }
  .mega-promo, .mega-col.hide-mobile { display: none; }

  .nav-actions { display: grid; gap: var(--sp-2); padding: var(--sp-4); margin-top: auto; border-top: 1px solid var(--gray-200); }
}
@media (min-width: 1024px) {
  .drawer-head { display: none; }
  .header-tools { display: none; }
}
@media (max-width: 400px) {
  .logo-text small { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c5e0; margin-top: var(--sp-16); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) 1.5fr; gap: var(--sp-8); padding-block: var(--sp-12); }
.site-footer .logo { color: #fff; }
.site-footer .logo-text strong { color: #fff; }
.site-footer .logo-text small { color: #9fb0d4; }
.site-footer .logo-mark { background: rgba(255,255,255,.06); border-color: var(--teal-500); color: #7fd6cf; }
.footer-about { margin-top: var(--sp-4); font-size: var(--fs-sm); line-height: 1.7; }
.footer-col .footer-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: #b9c5e0; font-size: var(--fs-sm); }
.footer-col a:hover { color: #fff; }
.social { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); }
.social a, .social > span {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.07); color: #fff;
}
.social a:hover { background: var(--teal-600); }
.newsletter-form { display: flex; margin-top: var(--sp-4); }
.newsletter-form .input { border-radius: var(--radius) 0 0 var(--radius); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); color: #fff; }
.newsletter-form .input::placeholder { color: #8d9cc0; }
.newsletter-form .btn { border-radius: 0 var(--radius) var(--radius) 0; }
.site-footer .check { color: #b9c5e0; font-size: var(--fs-xs); margin-top: var(--sp-3); }
.site-footer .check a { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3);
  padding-block: var(--sp-5); border-top: 1px solid rgba(255,255,255,.1); font-size: var(--fs-xs); color: #8d9cc0;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer-bottom a { color: #b9c5e0; }
.footer-bottom { align-items: center; }
.footer-credit { margin-left: auto; display: inline-flex; opacity: .75; transition: opacity .15s; }
.footer-credit:hover { opacity: 1; }
.footer-credit img { display: block; height: 28px; width: auto; }

@media (max-width: 1023px) {
  .footer-top { grid-template-columns: repeat(3, 1fr); }
  .footer-brand, .footer-news { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}

/* ---------- Ortak ızgaralar ---------- */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-6); align-items: start; }
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
