/* =========================================================
   ENB GLOBAL WIDTH STABILIZER
   Kapsam: header shell hizası, 100dvw kaynaklı yatay taşma,
   global genişlik sistemine girmeyen sayfa/bölüm kabukları.
========================================================= */

:root{
  --enb-global-shell-max: var(--enb-header-shell, 1552px);
  --enb-global-shell-edge: 24px;
  --enb-global-shell-width: min(calc(100% - var(--enb-global-shell-edge)), var(--enb-global-shell-max));
}

@media (min-width:768px){
  :root{ --enb-global-shell-edge: 32px; }
}

@media (min-width:1280px){
  :root{
    --enb-global-shell-edge: var(--enb-layout-edge-gap, 48px);
    --enb-global-shell-max: var(--enb-layout-shell, var(--enb-header-shell, 1552px));
    --enb-global-shell-width: min(calc(100% - var(--enb-global-shell-edge)), var(--enb-global-shell-max));
  }
}

@media (min-width:1536px){
  :root{ --enb-global-shell-edge: 64px; }
}

html,
body{
  width:100%;
  max-width:100%;
}

html{
  overflow-x:clip;
}

body.enb-body{
  overflow-x:clip;
}

@supports not (overflow-x:clip){
  html,
  body.enb-body{
    overflow-x:hidden;
  }
}

/* global.css içinde gelen 100dvw ana içerik zorlaması masaüstünde scrollbar/gutter taşması üretiyordu. */
html body #siteHeader,
html body.enb-body #mainContent{
  width:100% !important;
  max-width:100% !important;
}

html body.enb-body #mainContent{
  min-width:0 !important;
  overflow-x:clip !important;
}

@supports not (overflow-x:clip){
  html body.enb-body #mainContent{
    overflow-x:hidden !important;
  }
}

@media (min-width:1280px){
  /* Header bar artık 100vw yerine yüzde hesabı kullanır; dikey scrollbar varken yatay taşma yapmaz. */
  html body header#siteHeader.enb-header > div[data-header-bar="1"],
  html body header#siteHeader.enb-header > div[data-header-bar="1"].max-w-7xl{
    width:var(--enb-global-shell-width) !important;
    max-width:var(--enb-global-shell-max) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* ID'li main elemanları önceki #mainContent {width:100dvw!important} kuralını ezsin. */
  html body.enb-body #mainContent:is(
    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-screen-xl,
    .max-w-screen-2xl,
    .container,
    .enb-page,
    .dkh-container,
    .eh-container,
    .fh-shell,
    .fsh-container,
    .fasil-page,
    .tnm-shell,
    .enb-treat-wrap,
    .kemanci-page-shell,
    .ms-layout
  ){
    width:var(--enb-global-shell-width) !important;
    max-width:var(--enb-global-shell-max) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* Tailwind/legacy max-w kabukları: eski calc(100vw - gap) yerine calc(100% - gap). */
  html body.enb-body :where(
    main.max-w-7xl.mx-auto,
    main.max-w-6xl.mx-auto,
    main.max-w-5xl.mx-auto,
    main.max-w-screen-xl.mx-auto,
    main.max-w-screen-2xl.mx-auto,
    main.container.mx-auto,
    main > header.max-w-7xl.mx-auto,
    main > header.max-w-6xl.mx-auto,
    main > header.container.mx-auto,
    main > section.max-w-7xl.mx-auto,
    main > section.max-w-6xl.mx-auto,
    main > section.max-w-5xl.mx-auto,
    main > section.container.mx-auto,
    main > section > .max-w-7xl.mx-auto,
    main > section > .max-w-6xl.mx-auto,
    main > section > .max-w-5xl.mx-auto,
    main > section > .container.mx-auto,
    main > div.max-w-7xl.mx-auto,
    main > div.max-w-6xl.mx-auto,
    main > div.max-w-5xl.mx-auto,
    main > div.container.mx-auto,
    main > article.max-w-7xl.mx-auto,
    main > article.max-w-6xl.mx-auto,
    main > article.container.mx-auto,
    footer .max-w-screen-2xl.mx-auto
  ){
    width:var(--enb-global-shell-width) !important;
    max-width:var(--enb-global-shell-max) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* Kaynak taramada global genişlik sistemine girmediği görülen özel shell sınıfları. */
  html body.enb-body :where(
    .enb-concepts-shell,
    .hub-shell,
    .enb-lg-wrap,
    .enb-service-engine__container,
    .enb-district-page__container,
    .enb-magic-wrap,
    main.enb-music-shell,
    main.enb-music-shell > .enb-wrap,
    .enb-commercial-wrap,
    .enb-nikah-main > .enb-container,
    .enb-nikah-main > .enb-hero-shell,
    body.page-temsili-nikah-memuru-kiralama .enb-container,
    body.page-temsili-nikah-memuru-kiralama .enb-hero-shell,
    body.page-masa-sandalye-kiralama section .container,
    body.page-masa-sandalye-kiralama .ms-hero__inner,
    body.page-masa-sandalye-kiralama .ms-content,
    body.page-kemanci-kiralama main#mainContent.kemanci-page-shell,
    body.page-kemanci-kiralama .kemanci-hero > .relative.z-10,
    body.page-kemanci-kiralama .kemanci-intro-grid,
    body.page-kemanci-kiralama #mainContent > .kemanci-info-note,
    body.page-kemanci-kiralama #kemanciForm > .max-w-5xl,
    body.page-kurumsal .eb-kurumsal-wrap,
    body.page-kurumsal-danismanlik .enb-danismanlik-page .info-wide,
    body.page-category-hub .hub-shell,
    body.page-dogum-gunu-konseptleri .enb-concepts-shell
  ){
    width:var(--enb-global-shell-width) !important;
    max-width:var(--enb-global-shell-max) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* Genişleyen konsept mağazasında 3 dev kart yerine daha dengeli 4 kolon. */
  body.page-dogum-gunu-konseptleri .enb-concepts-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width:1280px) and (max-width:1439.98px){
  body.page-dogum-gunu-konseptleri .enb-concepts-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width:1279.98px){
  html body.enb-body :where(
    .enb-concepts-shell,
    .hub-shell,
    .enb-lg-wrap,
    .enb-service-engine__container,
    .enb-district-page__container,
    .enb-magic-wrap,
    .enb-commercial-wrap,
    .enb-nikah-main > .enb-container,
    .enb-nikah-main > .enb-hero-shell,
    body.page-temsili-nikah-memuru-kiralama .enb-container,
    body.page-temsili-nikah-memuru-kiralama .enb-hero-shell,
    body.page-masa-sandalye-kiralama .ms-hero__inner,
    body.page-masa-sandalye-kiralama .ms-content,
    body.page-kemanci-kiralama main#mainContent.kemanci-page-shell,
    body.page-kurumsal .eb-kurumsal-wrap,
    body.page-kurumsal-danismanlik .enb-danismanlik-page .info-wide
  ){
    max-width:calc(100% - var(--enb-global-shell-edge)) !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }
}
