
/* ==================================================
   MEKKE MEDINE FIDANCILIK - HEADER V11
   Desktop + Mobile
   ================================================== */

header {
  --mm-green: #245d30;
  --mm-dark: #163e25;
  --mm-line: #e5eee6;
  --mm-accent: #e9a83b;
}

/* TOPBAR */
header .topbar {
  background: var(--mm-dark);
  color: #fff;
  min-height: 40px;
}

header .topbar .container {
  max-width: 1440px;
}

header .topbar .btn,
header .topbar .nav-link,
header .topbar .navbar-toggler {
  color: #fff;
}

header .topbar .dropdown-menu {
  color: #243528;
  background: #fff;
  z-index: 1100;
}

header .topbar .dropdown-menu a,
header .topbar .dropdown-menu .btn {
  color: #243528;
}

header .topbar .dropdown-menu .btn-success {
  color: #fff;
}

/* HEADER MIDDLE */
header .header-middle {
  max-width: 1440px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 14px;
  padding-bottom: 14px;
}

header .header-middle > .row {
  align-items: center;
}

header .header-middle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

header .header-middle-left .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: auto;
  max-height: 88px;
  flex-shrink: 0;
}

header .header-middle-left .logo img {
  display: block;
  width: 100%;
  max-width: 150px;
  max-height: 88px;
  height: auto;
  object-fit: contain;
}

/* MAIN MENU */
header .header-middle-center {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

header .header-middle-center > .menu {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

header .header-middle-center > .menu > li {
  display: block !important;
}

header .header-middle-center > .menu > li > a {
  display: block !important;
  padding: 11px 12px !important;
  border-radius: 9px;
  color: #213d29;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

header .header-middle-center > .menu > li > a:hover,
header .header-middle-center > .menu > li > a:focus-visible {
  background: #edf6ee;
  color: var(--mm-green);
}

/* WHATSAPP */
header .headder-middle-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

header .headder-middle-right > div:first-child {
  margin-right: 0 !important;
  max-width: 40px;
}

header .headder-middle-right img {
  max-width: 38px;
  height: auto;
  object-fit: contain;
}

header .headder-middle-right b {
  color: var(--mm-dark);
  font-size: 13px;
  white-space: nowrap;
}

header .headder-middle-right p {
  margin: 2px 0 0;
  color: var(--mm-green);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

/* HEADER BOTTOM */
header .header-bottom {
  background: #fff;
  border-top: 1px solid var(--mm-line);
  border-bottom: 1px solid var(--mm-line);
  box-shadow: 0 4px 15px rgba(18,63,29,.055);
}

header .header-bottom > .container {
  max-width: 1440px;
}

header .header-bottom .row {
  align-items: center;
}

/* CATEGORIES */
header #top-categories-button {
  background: var(--mm-green);
  border-color: var(--mm-green);
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  min-height: 48px;
}

header #top-categories-button:hover {
  background: var(--mm-dark);
}

/* SEARCH */
header .header-middle-search {
  position: relative;
  min-width: 0;
}

header .header-middle-search .card {
  margin: 0;
  border: 1px solid #c9dccd;
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
}

header .header-middle-search .form-control {
  min-height: 45px;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 14px;
  background: transparent;
  padding-right: 52px;
}

header .header-middle-search .col {
  position: relative;
}

header #btnSearch {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 38px;
  border-radius: 8px;
  background: var(--mm-green);
  color: #fff;
  padding: 0;
  cursor: pointer;
}

header #divAjaxContainer {
  position: relative;
  z-index: 1050;
}

/* CART */
header .my-cart {
  float: right;
}

header .my-cart > button {
  background: #f0f7f1 !important;
  border: 1px solid #d9e9dc !important;
  color: var(--mm-dark) !important;
  border-radius: 10px !important;
  min-height: 45px;
  padding: 8px 16px;
}

header .my-cart .dropdown-menu {
  z-index: 1100;
}

/* STICKY */
header.mm-sticky-active .header-bottom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1020;
}

header.mm-fidancilik-header {
  position: relative;
  z-index: 100;
}

header.mm-fidancilik-header.mm-sticky-active .header-bottom {
  box-shadow: 0 8px 22px rgba(10,50,20,.12);
}

/* DESKTOP - V10 FINAL */
@media (min-width: 992px) {
  /* Bootstrap row remains flex: do not turn upper row into grid. */
  header .header-middle { padding-top: 10px !important; padding-bottom: 10px !important; }
  header .header-middle > .row {
    display: flex !important; flex-wrap: nowrap !important;
    align-items: center !important; min-height: 100px !important;
  }
  header .header-middle-left,
  header .header-middle-center,
  header .headder-middle-right {
    align-self: center !important; margin-top: 0 !important;
    margin-bottom: 0 !important; padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  header .header-middle-left .logo {
    width: 150px !important; max-width: 150px !important;
    max-height: 95px !important;
  }
  header .header-middle-left .logo img {
    width: 100% !important; max-width: 150px !important;
    max-height: 95px !important; height: auto !important;
    object-fit: contain !important;
  }
  header .header-middle-center > .menu {
    display: flex !important; justify-content: center !important;
    align-items: center !important; flex-wrap: nowrap !important;
    gap: 3px !important;
  }
  header .header-middle-center > .menu > li > a {
    padding: 10px 9px !important; font-size: 12px !important;
    white-space: nowrap !important;
  }
  /* Hide WhatsApp contents but keep the cart slot. */
  header .headder-middle-right > :not(.mm-v6-cart-slot) { display: none !important; }
  header .headder-middle-right {
    display: flex !important; align-items: center !important;
    justify-content: flex-end !important; gap: 12px !important;
  }
  header .mm-v6-cart-slot {
    display: flex !important; align-items: center !important;
    flex-shrink: 0 !important;
  }
  header .mm-v6-cart-slot .my-cart {
    display: flex !important; align-items: center !important;
    float: none !important; width: auto !important;
  }
  header .mm-v6-cart-slot .my-cart > button {
    position: relative !important; transform: none !important;
    margin: 0 !important; min-height: 42px !important;
    padding: 8px 12px !important; border-radius: 10px !important;
  }
  /* Bottom row: category + search, original cart column hidden. */
  header .header-bottom > .container > .row {
    display: grid !important;
    grid-template-columns: 400px minmax(0, 1fr) !important;
    column-gap: 20px !important; align-items: center !important;
    margin: 0 !important;
  }
  header .header-bottom > .container > .row > div {
    width: 100% !important; max-width: none !important;
    min-width: 0 !important; flex: none !important;
    padding: 8px 0 !important;
  }
  header .header-bottom > .container > .row > div:last-child { display: none !important; }
  header .header-bottom .header-middle-search {
    width: calc(100% - 109px) !important;
    max-width: calc(100% - 109px) !important; min-width: 0 !important;
  }
  header .header-middle-search .row,
  header .header-middle-search .col {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  }
  header .header-middle-search .col {
    position: relative !important; padding: 0 !important; margin: 0 !important;
  }
  header #txtAjaxSearch {
    display: block !important; width: 100% !important;
    max-width: 100% !important; min-width: 0 !important;
    height: 48px !important; padding: 0 60px 0 18px !important;
    margin: 0 !important; border: 1px solid #c9dccd !important;
    border-radius: 12px !important; background: #fff !important;
    box-sizing: border-box !important; box-shadow: none !important;
    font-size: 14px !important;
  }
  header #txtAjaxSearch:focus {
    border-color: #327445 !important; outline: none !important;
    box-shadow: 0 0 0 3px rgba(50,116,69,.10) !important;
  }
  header #btnSearch {
    position: absolute !important; top: 50% !important;
    right: 5px !important; left: auto !important;
    transform: translateY(-50%) !important;
    width: 40px !important; height: 40px !important; z-index: 5 !important;
  }
}

/* TABLET */
@media (min-width: 768px) and (max-width: 991.98px) {
  header .header-middle {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  header .header-middle-left .logo {
    width: 110px;
    max-height: 70px;
  }

  header .header-middle-left .logo img {
    max-height: 70px;
  }

  header .header-middle-center > .menu > li > a {
    padding: 9px 7px !important;
    font-size: 11px;
  }

  header .headder-middle-right b {
    font-size: 11px;
  }

  header .headder-middle-right p {
    font-size: 12px;
  }
}

/* MOBILE */
@media (max-width: 767.98px) {
  header .topbar {
    min-height: 36px;
  }

  header .topbar-left {
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 0;
  }

  header .topbar-left .language {
    padding-left: 8px !important;
    padding-right: 0 !important;
  }

  header .topbar .btn {
    font-size: 11px;
    padding: 7px 4px;
  }

  header .header-middle {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  header .header-middle > .row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  header .header-middle-left {
    flex: 0 0 48%;
    max-width: 48%;
    gap: 8px;
  }

  header .header-middle-left .logo {
    width: 100px;
    max-height: 70px;
  }

  header .header-middle-left .logo img {
    max-height: 70px;
  }

  header .header-middle-center {
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 10px;
  }

  header .header-middle-center > .menu {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  header .header-middle-center > .menu > li > a {
    font-size: 11px;
    padding: 8px 10px !important;
  }

  header .headder-middle-right {
    flex: 0 0 52%;
    max-width: 52%;
  }

  header .headder-middle-right > div:first-child {
    display: none !important;
  }

  header .headder-middle-right b {
    font-size: 11px;
  }

  header .headder-middle-right p {
    font-size: 12px;
  }

  header .header-bottom .row > div {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  header .header-bottom .row > div:first-child {
    flex: 0 0 36%;
    max-width: 36%;
  }

  header .header-bottom .row > div:nth-child(2) {
    flex: 0 0 64%;
    max-width: 64%;
  }

  header .header-bottom .row > div:nth-child(3) {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: right;
  }

  header #top-categories-button {
    font-size: 11px;
    min-height: 42px;
    padding: 8px 4px;
  }

  header .header-middle-search .form-control {
    font-size: 12px;
    min-height: 40px;
  }

  header #btnSearch {
    width: 34px;
    height: 34px;
  }

  header .my-cart > button {
    min-height: 37px;
  }

  header.mm-sticky-active .header-bottom {
    position: static;
  }

  body.mm-sticky-space {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  header .header-middle-center > .menu > li > a {
    transition: none;
  }
}

/* MEKKE MEDINE - LOGO FINAL ALIGNMENT */
@media (min-width: 992px) {
  header.mm-fidancilik-header
  .header-middle-left .logo {
    transform: translateX(180px) !important;
  }
}
