/* =========================================================
   ALYA V4.68 — MENU / MARKA / SAG KAMPANYA SON DUZELTME
========================================================= */

/* Masaüstü kategori çubuğu: header ile aynı görsel eksende, sola yapışmadan. */
@media (min-width: 1101px) {
  .theme-2 .theme2-category-nav > .wrap {
    width: calc(100% - 120px) !important;
    max-width: 1700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important;
    display: flex !important;
    align-items: stretch !important;
  }
  .theme-2 .theme2-category-nav .theme2-native-category-dropdown {
    flex: 0 0 245px !important;
    width: 245px !important;
    min-width: 245px !important;
    margin: 0 !important;
  }
  .theme-2 .theme2-category-nav .theme2-native-category-dropdown > summary {
    min-height: 51px !important;
    padding: 0 18px !important;
  }
  .theme-2 .theme2-top-category-strip {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: grid !important;
    grid-template-columns: repeat(9, minmax(96px, 1fr)) !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 40 !important;
  }
  .theme-2 .theme2-top-category,
  .theme-2 .theme2-top-category-link {
    position: relative !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    border-right: 1px solid #edf0f4 !important;
  }
  .theme-2 details.theme2-top-category > summary.theme2-top-category-toggle,
  .theme-2 .theme2-top-category-link {
    width: 100% !important;
    height: 51px !important;
    min-height: 51px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    list-style: none !important;
    border: 0 !important;
    background: #fff !important;
    color: #192231 !important;
    cursor: pointer !important;
    font-size: 9.5px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal !important;
  }
  .theme-2 details.theme2-top-category > summary::-webkit-details-marker,
  .theme-2 details.theme2-top-category > summary::marker {
    display: none !important;
    content: '' !important;
  }
  .theme-2 details.theme2-top-category > summary i {
    flex: 0 0 auto;
    color: #8c95a3;
    font-style: normal;
    transition: transform .16s ease;
  }
  .theme-2 details.theme2-top-category[open] > summary,
  .theme-2 details.theme2-top-category > summary:hover,
  .theme-2 .theme2-top-category-link:hover {
    color: var(--red, #e30613) !important;
    background: #fafbfc !important;
  }
  .theme-2 details.theme2-top-category[open] > summary i { transform: rotate(180deg); color: var(--red,#e30613); }
  .theme-2 details.theme2-top-category > .theme2-top-category-panel {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 12000 !important;
    width: min(470px, calc(100vw - 40px)) !important;
    max-height: min(68vh, 620px) !important;
    overflow-y: auto !important;
    padding: 13px !important;
    background: #fff !important;
    border: 1px solid #e4e9ef !important;
    border-top: 2px solid var(--red,#e30613) !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: 0 22px 50px rgba(17,25,40,.17) !important;
  }
  .theme-2 details.theme2-top-category[open] > .theme2-top-category-panel { display: block !important; }
  .theme-2 .theme2-top-category-groups { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .theme-2 .theme2-category-nav .store-deals { flex: 0 0 92px !important; min-width: 92px !important; }
}

@media (min-width: 1101px) and (max-width: 1450px) {
  .theme-2 .theme2-category-nav > .wrap { width: calc(100% - 44px) !important; }
  .theme-2 .theme2-category-nav .theme2-native-category-dropdown { flex-basis: 220px !important; width: 220px !important; min-width: 220px !important; }
  .theme-2 .theme2-top-category-strip { grid-template-columns: repeat(7,minmax(92px,1fr)) !important; }
  .theme-2 .theme2-top-category-strip > :nth-child(n+8) { display:none !important; }
}

/* Sağ slider: görsel varsa resmi karartma ve üstüne gereksiz metin bindirme. */
.theme-2.store-body .storefront-side-campaign.has-image > a {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-color: #fff !important;
}
.theme-2.store-body .storefront-side-campaign.has-image .storefront-side-campaign-shade,
.theme-2.store-body .storefront-side-campaign.has-image .storefront-side-campaign-copy {
  display: none !important;
}
.theme-2.store-body .storefront-side-campaigns {
  background: #fff !important;
  border: 1px solid #e3e7ed !important;
  box-shadow: 0 12px 32px rgba(15,23,42,.08) !important;
}
.theme-2.store-body .storefront-side-campaign-arrow {
  background: rgba(20,27,37,.78) !important;
  color: #fff !important;
  backdrop-filter: blur(4px);
}
.theme-2.store-body .storefront-side-campaign-dots { background: rgba(255,255,255,.82); border-radius: 999px; padding: 4px 7px !important; }

/* Çözüm sunduğumuz markalar: JS olmasa bile otomatik, kesintisiz marquee. */
.brand-carousel-section .brand-carousel-viewport {
  overflow: hidden !important;
  mask-image: linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent 100%);
  -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent 100%);
}
.brand-carousel-section .brand-carousel-track.brand-carousel-marquee {
  display: flex !important;
  width: max-content !important;
  min-width: 0 !important;
  flex-wrap: nowrap !important;
  animation: alya-brand-marquee 34s linear infinite !important;
  will-change: transform;
}
.brand-carousel-section:hover .brand-carousel-track.brand-carousel-marquee { animation-play-state: paused !important; }
.brand-carousel-section .brand-carousel-track.brand-carousel-marquee > a { flex: 0 0 174px !important; }
@keyframes alya-brand-marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@media (prefers-reduced-motion: reduce) { .brand-carousel-section .brand-carousel-track.brand-carousel-marquee { animation: none !important; } }
@media (max-width: 820px) { .brand-carousel-section .brand-carousel-track.brand-carousel-marquee { animation-duration: 24s !important; } }
.brand-carousel-section:has(.brand-carousel-marquee) .brand-carousel-controls { display:none !important; }

/* =========================================================
   ALYA V4.69 — KATEGORI TAKLA/IPTAL + OKUNAKLI MEGA MENU
========================================================= */
@media (min-width: 1101px) {
  /* TÜM KATEGORİLER'i ekran kenarından biraz daha içeri al. */
  .theme-2 .theme2-category-nav > .wrap {
    width: calc(100% - 200px) !important;
    max-width: 1680px !important;
    margin-inline: auto !important;
    overflow: visible !important;
  }

  /* Eski V4.64 kuralı açık details içindeki başlık yazısını 180° döndürüyordu.
     Başlık/metin kesinlikle dönmez; menü açılışı sade ve sabittir. */
  .theme-2 .theme2-top-category > summary span,
  .theme-2 .theme2-top-category[open] > summary span,
  .theme-2 details.theme2-top-category > summary span,
  .theme-2 details.theme2-top-category[open] > summary span {
    transform: none !important;
    rotate: none !important;
    transition: none !important;
    writing-mode: horizontal-tb !important;
  }
  .theme-2 details.theme2-top-category > summary i,
  .theme-2 details.theme2-top-category[open] > summary i {
    transform: none !important;
    rotate: none !important;
    transition: none !important;
  }

  .theme-2 details.theme2-top-category > summary.theme2-top-category-toggle,
  .theme-2 .theme2-top-category-link {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    color: #141b26 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding-inline: 10px !important;
  }

  /* Açılan panel artık minik yazılı/boş kutu değil; geniş, okunaklı ve sade. */
  .theme-2 details.theme2-top-category > .theme2-top-category-panel {
    width: min(700px, calc(100vw - 80px)) !important;
    max-height: min(66vh, 610px) !important;
    padding: 18px 20px 20px !important;
    border-radius: 0 0 12px 12px !important;
    border: 1px solid #dfe5ec !important;
    border-top: 3px solid var(--red,#e30613) !important;
    background: #fff !important;
    box-shadow: 0 22px 50px rgba(15,23,42,.16) !important;
    color: #151b25 !important;
  }
  .theme-2 .theme2-top-category-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin: 0 0 14px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid #e9edf2 !important;
  }
  .theme-2 .theme2-top-category-head strong {
    font-size: 16px !important;
    line-height: 1.25 !important;
    color: #111827 !important;
    font-weight: 900 !important;
  }
  .theme-2 .theme2-top-category-head a {
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    color: var(--red,#e30613) !important;
    text-decoration: none !important;
  }
  .theme-2 .theme2-top-category-groups {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: 10px 18px !important;
  }
  .theme-2 .theme2-top-category-group {
    min-width: 0 !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #eef1f4 !important;
  }
  .theme-2 .theme2-top-category-group-title {
    display: block !important;
    margin: 0 0 7px !important;
    color: #172033 !important;
    font-size: 12.5px !important;
    line-height: 1.3 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
  }
  .theme-2 .theme2-top-category-sublist {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .theme-2 .theme2-top-category-sublist a {
    display: block !important;
    padding: 4px 0 !important;
    color: #4a5565 !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    font-weight: 650 !important;
    text-decoration: none !important;
  }
  .theme-2 .theme2-top-category-group-title:hover,
  .theme-2 .theme2-top-category-sublist a:hover {
    color: var(--red,#e30613) !important;
  }

  /* Sağdaki kategoriler ekran dışına taşmasın. */
  .theme-2 .theme2-top-category-strip > details:nth-last-child(-n+4) > .theme2-top-category-panel {
    left: auto !important;
    right: 0 !important;
  }
}

@media (min-width: 1101px) and (max-width: 1450px) {
  .theme-2 .theme2-category-nav > .wrap { width: calc(100% - 90px) !important; }
  .theme-2 details.theme2-top-category > .theme2-top-category-panel { width: min(620px, calc(100vw - 44px)) !important; }
  .theme-2 .theme2-top-category-groups { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

/* V4.69 marka rayı: sistem azaltılmış hareket tercihinde olsa da kullanıcı isteği gereği otomatik akış sürer. */
.brand-carousel-section .brand-carousel-track.brand-carousel-marquee {
  animation: alya-brand-marquee 30s linear infinite !important;
  animation-play-state: running !important;
}
.brand-carousel-section:hover .brand-carousel-track.brand-carousel-marquee { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .brand-carousel-section .brand-carousel-track.brand-carousel-marquee { animation: alya-brand-marquee 30s linear infinite !important; }
}

/* V4.72 yönetilebilir mağaza marka sliderı */
.brand-carousel-section .brand-carousel-track.brand-carousel-marquee{animation-duration:var(--brand-duration,36s)!important}
.brand-carousel-section.brand-effect-right .brand-carousel-track.brand-carousel-marquee{animation-direction:reverse!important}
.brand-carousel-section.brand-effect-static .brand-carousel-track.brand-carousel-marquee{animation:none!important;transform:none!important;overflow-x:auto}
.brand-carousel-section.brand-color-grayscale .brand-carousel-track img{filter:grayscale(1)!important}
.brand-carousel-section.brand-color-grayscale_hover .brand-carousel-track img{filter:grayscale(1)!important;transition:filter .2s ease}
.brand-carousel-section.brand-color-grayscale_hover .brand-carousel-track a:hover img{filter:none!important}
.brand-carousel-section.brand-color-color .brand-carousel-track img{filter:none!important}
