/* ==========================================================
   NEVSOFT GELİŞMİŞ MEGA MENÜ
   Modern CSS Architecture for Pharmax & Koçtaş / Home Istanbul
   ========================================================== */

:root {
  --ns-primary: #0071ce;
  --ns-primary-hover: #0056b3;
  --ns-primary-light: #f0f7ff;
  --ns-text-dark: #1e293b;
  --ns-text-muted: #64748b;
  --ns-text-body: #334155;
  --ns-border: #e2e8f0;
  --ns-border-light: #f1f5f9;
  --ns-bg-card: #f8fafc;
  --ns-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  --ns-radius: 12px;
}

/* Theme Navbar Overrides (OpenCart / Osdem-Bitkisel reset) */
#menu.navbar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  min-height: auto !important;
  padding: 0 !important;
}

#menu .container {
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Ana Çerçeve */
.nevsoft-megamenu-wrapper {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  z-index: 99;
}

/* Sepet veya modal açıkken menünün arka plan karartmasının (backdrop) altında kalması */
body.pmc-open .nevsoft-megamenu-wrapper,
#cart.open ~ .stk .nevsoft-megamenu-wrapper,
#cart.open ~ * .nevsoft-megamenu-wrapper,
.modal-open .nevsoft-megamenu-wrapper {
  z-index: 90 !important;
  pointer-events: none !important;
}

body.pmc-open .ns-dropdown-box,
.modal-open .ns-dropdown-box {
  display: none !important;
}

.nevsoft-megamenu-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  position: relative;
}

/* ==========================================================
   DÜZEN 1: PHARMAX YATAY MEGA MENÜ (GÖRSEL 1)
   ========================================================== */

.ns-horizontal-bar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  flex: 1;
  flex-wrap: nowrap;
  overflow: visible;
}

.ns-horizontal-bar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.ns-h-item {
  position: static; /* Dropdown'un tüm genişlik açılması için */
  flex-shrink: 0;
}

.ns-h-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ns-text-dark);
  text-decoration: none !important;
  position: relative;
  transition: all 0.18s ease;
  white-space: nowrap;
  border-radius: 6px;
}

.ns-h-link:hover,
.ns-h-item:hover > .ns-h-link {
  color: var(--ns-primary) !important;
  background-color: var(--ns-primary-light);
  text-decoration: none !important;
}

/* İkon Stili */
.ns-h-link i:first-child {
  color: var(--ns-primary);
  font-size: 14px;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.ns-h-item:hover > .ns-h-link i:first-child {
  transform: translateY(-1px);
  opacity: 1;
}

/* Aşağı Ok Belirteci */
.ns-arrow {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 2px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ns-h-item:hover > .ns-h-link .ns-arrow {
  transform: rotate(180deg);
  color: var(--ns-primary);
}

/* Rozet (Badge) */
.ns-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  color: #fff;
  line-height: 1;
  text-transform: uppercase;
  margin-left: 4px;
}

/* Aktif Kategori Çizgisi */
.ns-h-item:hover > .ns-h-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 3px;
  background-color: var(--ns-primary);
  border-radius: 3px 3px 0 0;
}

/* ==========================================================
   DROPDOWN MEGA MENÜ (GÖRSEL 1: PHARMAX 6 SÜTUN + KAMPANYA KARTI)
   ========================================================== */

.ns-dropdown-box {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border-top: 2px solid var(--ns-primary);
  border-bottom: 3px solid #e2e8f0;
  box-shadow: var(--ns-shadow);
  border-radius: 0 0 var(--ns-radius) var(--ns-radius);
  padding: 28px 32px;
  z-index: 100000;
  animation: nsFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ns-h-item:hover .ns-dropdown-box {
  display: block !important;
}

@keyframes nsFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ns-dropdown-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  gap: 32px;
  align-items: stretch;
}

/* Sol Kısım: Sütunlar Gridi */
.ns-columns-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--ns-cols, 6), 1fr);
  gap: 20px;
}

.ns-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ns-col-top {
  display: flex;
  flex-direction: column;
}

/* Sütun Başlığı & İkonu */
.ns-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ns-text-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ns-border-light);
  text-decoration: none !important;
}

.ns-col-header:hover {
  color: var(--ns-primary) !important;
}

.ns-col-header i {
  color: var(--ns-primary);
  font-size: 14px;
}

/* Alt Kategoriler Listesi */
.ns-sub-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.ns-sub-list li {
  margin-bottom: 8px;
}

.ns-sub-list a {
  font-size: 13px;
  color: var(--ns-text-body);
  text-decoration: none !important;
  transition: all 0.15s ease;
  display: inline-block;
  line-height: 1.35;
}

.ns-sub-list a:hover {
  color: var(--ns-primary) !important;
  transform: translateX(3px);
}

/* Sütun Alt Linki ("Tümünü Gör →") */
.ns-col-bottom-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ns-primary);
  text-decoration: none !important;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--ns-border);
  transition: gap 0.2s ease;
}

.ns-col-bottom-link:hover {
  gap: 8px;
  color: var(--ns-primary-hover) !important;
}

/* ==========================================================
   SAĞ KISIM: KAMPANYA / PROMO KARTI (GÖRSEL 1: PHARMAX)
   ========================================================== */

.ns-promo-card-wrapper {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ns-promo-card {
  background: linear-gradient(145deg, #f0f7ff, #ffffff);
  border: 1px solid #dbeafe;
  border-radius: var(--ns-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 113, 206, 0.05);
}

.ns-promo-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  background: var(--ns-primary);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ns-promo-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ns-text-dark);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.ns-promo-desc {
  font-size: 12.5px;
  color: var(--ns-text-muted);
  line-height: 1.4;
  margin: 0 0 14px 0;
}

.ns-promo-img-box {
  text-align: center;
  margin: 8px 0 14px 0;
}

.ns-promo-img-box img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.ns-promo-btn {
  display: block;
  text-align: center;
  background: var(--ns-primary);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.15s ease;
}

.ns-promo-btn:hover {
  background: var(--ns-primary-hover) !important;
  transform: translateY(-1px);
}

/* Popüler Markalar Bölümü */
.ns-promo-brands {
  background: #ffffff;
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius);
  padding: 14px;
}

.ns-promo-brands-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ns-text-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.ns-brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ns-brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #f8fafc;
  border: 1px solid var(--ns-border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ns-text-body);
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.ns-brand-pill:hover {
  background: #ffffff;
  border-color: var(--ns-primary);
  color: var(--ns-primary) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.ns-brand-pill img {
  max-height: 20px;
  max-width: 60px;
  object-fit: contain;
}

/* ==========================================================
   DÜZEN 2: KOÇTAŞ DİKEY AÇILIR MENÜ (GÖRSEL 3)
   ========================================================== */

.ns-vertical-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.ns-v-container {
  position: relative;
}

.ns-v-drawer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ns-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ns-v-drawer-toggle .chevron {
  font-size: 12px;
  margin-left: 6px;
}

.ns-v-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 860px;
  background: #ffffff;
  border: 1px solid var(--ns-border);
  box-shadow: var(--ns-shadow);
  border-radius: 0 0 var(--ns-radius) var(--ns-radius);
  z-index: 100000;
}

.ns-v-container:hover .ns-v-drawer,
.ns-v-drawer.active {
  display: flex !important;
}

.ns-v-left-cats {
  width: 280px;
  min-width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--ns-border);
  padding: 8px 0;
  max-height: 520px;
  overflow-y: auto;
}

.ns-v-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ns-text-body);
  text-decoration: none !important;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.ns-v-cat-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ns-v-cat-left i {
  color: #64748b;
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.ns-v-cat-row:hover,
.ns-v-cat-row.active {
  background: #fff7ed;
  color: var(--ns-primary) !important;
  border-left-color: var(--ns-primary);
}

.ns-v-cat-row:hover .ns-v-cat-left i,
.ns-v-cat-row.active .ns-v-cat-left i {
  color: var(--ns-primary);
}

.ns-v-cat-arrow {
  font-size: 11px;
  color: #94a3b8;
}

.ns-v-right-panel {
  flex: 1;
  padding: 24px 28px;
  display: none;
  gap: 24px;
  max-height: 520px;
  overflow-y: auto;
  align-items: flex-start;
}

.ns-v-right-panel.active {
  display: flex !important;
}

.ns-v-sub-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ns-v-promo-box {
  width: 250px;
  min-width: 250px;
}

.ns-v-fallback-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 28px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.ns-v-fallback-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--ns-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.ns-v-fallback-info {
  flex: 1;
}

.ns-v-fallback-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ns-text-dark);
  margin: 0 0 6px 0;
}

.ns-v-fallback-desc {
  font-size: 13px;
  color: var(--ns-text-muted);
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.ns-v-fallback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ns-primary);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 7px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.ns-v-fallback-btn:hover {
  background: var(--ns-primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ns-top-promo-links {
  display: flex;
  align-items: stretch;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  flex: 1;
}

.ns-top-promo-links li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ns-top-promo-links li a:hover {
  color: var(--ns-primary) !important;
}

/* ==========================================================
   MOBİL VE DESKTOP AYRIMI (DESKTOP'TA MOBİL ÇEKMECE ASLA GÖRÜNMEZ)
   ========================================================== */

/* DESKTOP (992px ve üzeri): Mobil buton ve çekmece KESİNLİKLE GİZLİ */
@media (min-width: 992px) {
  .ns-mobile-toggle,
  .ns-mobile-drawer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* MOBİL (991px ve altı) */
@media (max-width: 991px) {
  .ns-horizontal-bar,
  .ns-vertical-wrapper,
  .ns-layout-row {
    display: none !important;
  }

  .ns-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ns-text-dark);
    background: none;
    border: none;
    cursor: pointer;
  }

  .ns-mobile-drawer {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--ns-border);
    box-shadow: var(--ns-shadow);
    padding: 16px;
    z-index: 100000;
    max-height: 80vh;
    overflow-y: auto;
  }

  .ns-mobile-drawer.open {
    display: block !important;
  }

  .ns-m-item {
    border-bottom: 1px solid var(--ns-border-light);
    padding: 10px 0;
  }

  .ns-m-item a {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ns-text-dark);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .ns-m-sub-list {
    padding-left: 20px;
    margin-top: 8px;
    list-style: none;
  }

  .ns-m-sub-list a {
    font-size: 13.5px;
    font-weight: normal;
    color: var(--ns-text-body);
    padding: 4px 0;
  }
}

/* Header 11: tema kırmızı şerit, menü beyaz kutu. Tek bara indir. */
.header-bottom .nevsoft-megamenu-wrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.header-bottom .container,
.header-bottom .row,
.header-bottom .main-menu-w {
  background: transparent !important;
}

.header-bottom .nevsoft-megamenu-inner {
  max-width: none;
  min-height: 52px;
  padding: 0 15px;
}

.header-bottom .ns-vertical-wrapper,
.header-bottom .ns-horizontal-bar {
  min-height: 52px;
  align-items: stretch;
}

.header-bottom .ns-v-container {
  display: flex;
  align-items: stretch;
}

.header-bottom .ns-v-drawer-toggle {
  background: transparent;
  border-radius: 0;
  height: auto;
  min-height: 52px;
  padding: 0 18px;
  box-shadow: none;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.header-bottom .ns-v-drawer-toggle:hover,
.header-bottom .ns-v-container:hover .ns-v-drawer-toggle {
  background: rgba(0, 0, 0, 0.14);
}

.header-bottom .ns-top-promo-links {
  align-items: stretch;
}

.header-bottom .ns-top-promo-links li a,
.header-bottom .ns-h-link {
  color: #ffffff !important;
  min-height: 52px;
}

.header-bottom .ns-top-promo-links li a:hover,
.header-bottom .ns-h-link:hover,
.header-bottom .ns-h-item:hover > .ns-h-link {
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.14);
}

.header-bottom .ns-h-link i:first-child,
.header-bottom .ns-arrow {
  color: #ffffff;
}

/* Header11 kırmızı barının altına taşan kopya linkleri gizle */
.header-bottom > .container > .ns-top-promo-links,
.header-bottom > .container > .row ~ .ns-top-promo-links,
.header-bottom > .container > .ns-v-drawer,
.header-bottom > .container > .ns-mobile-drawer {
  display: none !important;
}

html[dir="rtl"] .ns-vertical-wrapper,
body.rtl .ns-vertical-wrapper {
  flex-direction: row-reverse;
}

html[dir="rtl"] .ns-v-drawer,
body.rtl .ns-v-drawer {
  left: auto;
  right: 0;
}

html[dir="rtl"] .ns-v-left-cats,
body.rtl .ns-v-left-cats {
  border-right: none;
  border-left: 1px solid var(--ns-border);
}

html[dir="rtl"] .ns-v-cat-row,
body.rtl .ns-v-cat-row {
  border-left: none;
  border-right: 3px solid transparent;
}

html[dir="rtl"] .ns-v-cat-row:hover,
html[dir="rtl"] .ns-v-cat-row.active,
body.rtl .ns-v-cat-row:hover,
body.rtl .ns-v-cat-row.active {
  border-right-color: var(--ns-primary);
}

.ns-top-promo-links > li.ns-outside-item,
.ns-horizontal-bar > li.ns-h-item {
  position: static;
}

.ns-layout-row {
  position: relative;
}

.ns-h-item:hover > .ns-dropdown-box,
.ns-outside-item:hover > .ns-dropdown-box {
  display: block;
}

.header-bottom .ns-top-promo-links .ns-dropdown-box a,
.header-bottom .ns-horizontal-bar .ns-dropdown-box a,
.header-bottom .ns-dropdown-box a,
.header-bottom .ns-dropdown-box .ns-col-header,
.header-bottom .ns-dropdown-box .ns-col-bottom-link,
.header-bottom .ns-dropdown-box .ns-sub-list a,
.header-bottom .ns-dropdown-box .ns-v-fallback-title {
  color: #1e293b !important;
  min-height: 0;
  background: transparent !important;
}

.header-bottom .ns-outside-drop a,
.header-bottom .ns-outside-drop .ns-col-header,
.header-bottom .ns-outside-drop .ns-col-bottom-link,
.header-bottom .ns-outside-drop .ns-sub-list a {
  color: #1e293b !important;
  min-height: 0;
  background: transparent;
}

html[dir="rtl"] .ns-outside-drop,
body.rtl .ns-outside-drop {
  left: auto;
  right: 0;
}

html[dir="rtl"] .header-bottom .ns-v-drawer-toggle,
body.rtl .header-bottom .ns-v-drawer-toggle {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

html[dir="rtl"] .ns-v-cat-arrow,
html[dir="rtl"] .ns-v-fallback-btn .fa-arrow-right,
body.rtl .ns-v-cat-arrow,
body.rtl .ns-v-fallback-btn .fa-arrow-right {
  transform: scaleX(-1);
}
