/* Referans mantığı: masaüstünde sayfadan ayrışan, ortalanmış header kabuğu. */
@media (min-width: 769px) {
  body.has-sticky-header {
    padding-top: 106px;
  }

  .site-header {
    width: min(calc(100% - 48px), 1440px);
    margin: 18px auto 0;
    border: 1px solid rgba(7, 26, 54, .08);
    border-radius: 22px;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow:
      0 18px 48px rgba(7, 26, 54, .15),
      0 4px 14px rgba(7, 26, 54, .08);
    backdrop-filter: saturate(150%) blur(18px);
    -webkit-backdrop-filter: saturate(150%) blur(18px);
    z-index: 1200;
  }

  .site-header.is-sticky {
    position: fixed;
    top: 12px;
    left: 50%;
    right: auto;
    z-index: 1200;
    width: min(calc(100% - 48px), 1440px);
    margin-top: 0;
    transform: translateX(-50%);
    border-radius: 22px;
    box-shadow:
      0 20px 54px rgba(7, 26, 54, .18),
      0 5px 16px rgba(7, 26, 54, .1);
  }

  .site-header .main-header {
    width: 100%;
    max-width: none;
    border-radius: inherit;
    background: transparent !important;
  }

  .primary-nav {
    padding: 4px 7px;
    border: 1px solid rgba(7, 26, 54, .1);
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 22px rgba(7, 26, 54, .07);
  }

  .primary-nav > a,
  .primary-nav .products-trigger {
    border-radius: 999px;
  }

  .mega-shell,
  .site-header.is-sticky .mega-shell {
    left: 0;
    right: 0;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .mega-explorer {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
  }

  .site-header.mega-open {
    z-index: 1300;
    border-bottom-right-radius: 22px;
    border-bottom-left-radius: 22px;
  }

  .page-overlay,
  .site-header.is-sticky + .page-overlay {
    inset: 0 !important;
    top: 0 !important;
    background: rgba(22, 30, 38, .36);
    backdrop-filter: blur(28px) saturate(118%);
    -webkit-backdrop-filter: blur(28px) saturate(118%);
    will-change: opacity, backdrop-filter;
    transform: translateZ(0);
    transition: opacity .24s ease, visibility .24s ease;
  }

  /* Mega menü: yatay banner + 3’lü ürün grid, kaydırmasız */
  .mega-body {
    width: 100%;
    max-width: 100%;
    height: min(620px, calc(100dvh - var(--header-h, 106px) - 92px));
    min-height: 0;
    max-height: calc(100dvh - var(--header-h, 106px) - 92px);
    overflow: hidden;
    align-items: stretch;
    grid-template-columns: 270px minmax(0, 1fr) 300px;
  }

  .category-nav {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .category-aside {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: contain;
    box-sizing: border-box;
    margin: 0;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    isolation: isolate;
    background:
      radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .16), transparent 36%),
      radial-gradient(circle at 12% 88%, rgba(100, 154, 201, .22), transparent 42%),
      linear-gradient(165deg, #0b274b 0%, #071a36 46%, #0a3058 100%);
    color: #fff;
    border-left: 1px solid rgba(255, 255, 255, .08);
  }

  .category-aside::before {
    content: "";
    position: absolute;
    inset: 14px;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    pointer-events: none;
  }

  .category-aside::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -80px;
    z-index: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(158, 196, 230, .28) 0%, transparent 70%);
    pointer-events: none;
  }

  .aside-index {
    position: relative;
    z-index: 1;
    display: block;
    margin: 0;
    color: rgba(255, 255, 255, .12);
    font-family: Righteous, Manrope, sans-serif;
    font-size: clamp(64px, 5vw, 78px);
    line-height: .82;
    letter-spacing: -.04em;
    font-weight: 400;
  }

  .category-aside > div:not(.aside-actions) {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
  }

  .category-aside .section-kicker {
    margin: 0;
    color: rgba(201, 223, 245, .88);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
  }

  .category-aside h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 1.55vw, 24px);
    line-height: 1.18;
    letter-spacing: -.035em;
    font-weight: 750;
    text-wrap: balance;
  }

  .category-aside p {
    margin: 0;
    max-width: 28ch;
    color: rgba(226, 235, 244, .82);
    font-size: 12.5px;
    line-height: 1.55;
    font-weight: 500;
  }

  .aside-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
  }

  .aside-actions a,
  .aside-actions button {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.01em;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  }

  .aside-actions a:first-child {
    border: 0;
    background: #fff;
    color: #071a36;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  }

  .aside-actions a:first-child:hover,
  .aside-actions a:first-child:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .26);
  }

  .aside-actions a:last-child,
  .aside-actions button {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
  }

  .aside-actions a:last-child:hover,
  .aside-actions a:last-child:focus-visible,
  .aside-actions button:hover,
  .aside-actions button:focus-visible {
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .14);
  }

  .aside-actions a span:last-child {
    opacity: .7;
    font-size: 15px;
    line-height: 1;
  }

  .product-panel {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: contain;
    padding: 16px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .product-panel .category-summary {
    display: none !important;
  }

  .desktop-category-banner,
  .desktop-category-hero {
    display: none !important;
  }

  .desktop-category-copy {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 0;
    background: none;
    color: inherit;
    pointer-events: auto;
  }

  .desktop-category-copy .section-kicker {
    margin: 0;
    color: #718087;
    font-size: 9px;
    letter-spacing: .14em;
  }

  .desktop-category-copy h2 {
    margin: 0;
    max-width: none;
    color: var(--navy, #071a36);
    font-size: clamp(20px, 1.8vw, 24px);
    line-height: 1.12;
    letter-spacing: -.04em;
  }

  .desktop-category-copy p {
    margin: 0;
    max-width: 52ch;
    color: #66757d;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .product-links {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 10px;
    align-content: stretch;
  }

  .product-links > li {
    min-width: 0;
    min-height: 0;
    margin: 0;
  }

  .product-links a {
    position: relative;
    min-height: 0;
    height: 100%;
    padding: 0;
    border: 1px solid rgba(7, 26, 54, .08);
    border-bottom: 1px solid rgba(7, 26, 54, .08);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    display: block;
    overflow: visible;
    font-size: inherit;
    font-weight: inherit;
    box-shadow: 0 4px 14px rgba(7, 26, 54, .03);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  }

  .product-links a:hover,
  .product-links a:focus-visible {
    color: inherit;
    border-color: rgba(7, 26, 54, .14);
    box-shadow: 0 10px 24px rgba(7, 26, 54, .08);
    transform: translateY(-1px);
  }

  .product-links a > span {
    display: none;
  }

  .product-links .product-tile-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
  }

  .product-links .product-tile-media:not(:has(img)) {
    background: linear-gradient(180deg, #f3f3f5 0%, #ececef 100%);
  }

  .product-links .product-image-slot {
    position: absolute;
    inset: 0;
    display: block;
    background:
      linear-gradient(135deg, transparent 46%, rgba(255, 255, 255, .55) 50%, transparent 54%),
      linear-gradient(180deg, #f6f6f8 0%, #eeeef1 100%);
  }

  .product-links .product-tile-media img {
    position: absolute;
    inset: 1%;
    width: auto;
    height: auto;
    max-width: 98%;
    max-height: 98%;
    margin: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #fff;
  }

  .product-links .product-tile-media:has(img) .product-image-slot {
    display: none;
  }

  .product-links .product-tile-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 56px;
    padding: 28px 11px 11px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .78) 40%, rgba(255, 255, 255, .96) 100%);
    pointer-events: none;
  }

  .product-links .product-tile-copy h3 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.22;
    font-weight: 750;
    letter-spacing: -.02em;
    text-wrap: balance;
  }

  .product-links .nav-product-tile {
    position: relative;
  }

  .product-links .nav-product-badges {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    max-width: none;
    justify-content: flex-end;
    pointer-events: none;
  }

  .product-links .catalog-product-badge {
    width: 50px;
    height: 50px;
  }

  .product-links .catalog-product-badge__label em {
    font-size: 5px;
  }

  .product-links .catalog-product-badge__label strong,
  .product-links .catalog-product-badge__label--garden strong {
    font-size: 6.5px;
  }

  .product-links .catalog-product-badge__star,
  .product-links .catalog-product-badge__leaf {
    width: 8px;
    height: 8px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .mega-body {
    grid-template-columns: 230px minmax(0, 1fr) 260px;
  }

  .product-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-aside {
    padding: 22px 18px 18px;
  }

  .aside-index {
    font-size: 58px;
  }

  .category-aside h3 {
    font-size: 18px;
  }
}
