/*
 * Sellzy üst menü mega panel — nguyenanhtuan Smart Responsive Mega Menu (CodePen KwpBReJ)
 * uyumlu blok yapısı, Sellzy tema değişkenleri ile.
 */

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu {
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  --tw-translate-x: 0px;
  translate: 0 var(--tw-translate-y);
  padding: 0;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 1.5rem;
  box-sizing: border-box;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-wrap--split {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-main {
  flex: 1 1 280px;
  min-width: 0;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 1.5rem;
}

/* 3. kademeli: sütunlar satırlara kırılır — tek sıraya zorlanmaz */
body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-inner--tiered {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 1.5rem;
  width: 100%;
  max-width: 100%;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-inner--tiered .sellzy-mm-column {
  min-width: 0;
}

/* Tek seviye (3. kademe yok): tek blok, içeride düzenli grid */
body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-inner--flat {
  display: block;
  grid-template-columns: unset;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat {
  width: 100%;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(145, 158, 171, 0.28);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-head-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #919eab;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-parent {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--color-light-primary-text);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  color: var(--color-primary);
  background: rgba(145, 158, 171, 0.1);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cta:hover {
  background: rgba(145, 158, 171, 0.2);
  color: var(--color-primary);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cols {
  display: grid;
  grid-template-columns: repeat(var(--sellzy-mm-flat-cols, 3), minmax(0, 1fr));
  gap: 0.65rem 1.5rem;
  align-items: start;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cols--scroll {
  max-height: min(320px, 42vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.125rem;
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cols--scroll {
    scrollbar-color: rgba(145, 158, 171, 0.55) transparent;
    scrollbar-width: thin;
  }
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-column--flat-group {
  min-width: 0;
}

@media (width < 90rem) {
  body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width < 80rem) {
  body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-flat-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links--flat > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.375rem;
  padding: 0.35rem 0.55rem 0.35rem 0.6rem;
  margin: 0.1rem 0;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.35;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links--flat > li > a:hover {
  background: rgba(145, 158, 171, 0.08);
  border-color: rgba(145, 158, 171, 0.16);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links--flat > li > a:hover .sellzy-mm-link-icon {
  opacity: 1;
  color: var(--color-primary);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-link-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-link-icon {
  flex-shrink: 0;
  font-size: 1rem;
  opacity: 0.38;
  transition: opacity 0.15s ease, color 0.15s ease;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-heading {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--color-primary);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-heading a {
  color: var(--color-light-primary-text);
  text-decoration: none;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-heading a:hover {
  color: var(--color-primary);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links li {
  margin: 0;
  padding: 0;
  break-inside: avoid;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links a {
  display: block;
  padding: 0.3125rem 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(82 93 107);
  text-decoration: none;
  transition: color 0.15s ease;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu ul.sellzy-mm-links a:hover {
  color: var(--color-primary);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-catalog {
  flex: 0 0 240px;
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (width < 80rem) {
  body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-catalog {
    flex: 1 1 100%;
    max-width: none;
  }
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-hero {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  min-height: 140px;
  text-decoration: none;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-hero-bg {
  display: block;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-hero:hover .sellzy-mm-hero-bg {
  transform: scale(1.04);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-hero-fallback {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, rgba(145, 158, 171, 0.55) 100%);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-hero-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: 140px;
  padding: 0.875rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 1px 3px rgb(0 0 0 / 45%);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--color-light-primary-text);
  border-radius: 10px;
  padding: 0.35rem;
  transition: background 0.15s ease;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-thumb:hover {
  background: rgba(145, 158, 171, 0.14);
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-thumb-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(145, 158, 171, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #919eab;
}

body.sellzy-tema-scope .main-menu ul li > .mega-menu.sellzy-megamenu .sellzy-mm-thumb-cap {
  font-size: 0.6875rem;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
