/* =========================================================
   دکوآرام — Header (desktop / tablet / mobile)
   ========================================================= */

:root {
  --dk-green: #83b735;
  --dk-green-dark: #6a9628;
  --dk-ink: #1a1f16;
  --dk-muted: #5f6758;
  --dk-line: rgba(26, 31, 22, 0.08);
  --dk-cream: #f4f7f0;
  --dk-header-max: 1320px;
}

/* Ensure Woodmart desktop columns show on large screens */
@media (min-width: 1025px) {
  /* Keep Woodmart flex columns intact on desktop */
  .whb-column.whb-visible-lg {
    display: flex !important;
  }

  .whb-hidden-lg {
    display: none !important;
  }

  .whb-header-bottom.whb-hidden-mobile {
    display: block !important;
  }

  .whb-header-bottom .whb-column.whb-visible-lg {
    display: flex !important;
  }
}

/* ---------- Top bar ---------- */
.whb-top-bar {
  background: linear-gradient(100deg, #1c2717 0%, #2a3a20 52%, #6f9e2f 145%) !important;
  border: 0 !important;
}

.whb-top-bar .whb-flex-row,
.whb-top-bar .container {
  min-height: 42px;
  align-items: center;
}

.whb-top-bar .wd-header-text,
.whb-top-bar .wd-header-text strong {
  color: #f3f7ec !important;
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.whb-top-bar .wd-social-icons {
  display: inline-flex !important;
  gap: 6px;
  align-items: center;
}

.whb-top-bar .wd-social-icons a,
.whb-top-bar .wd-social-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  transition: 0.25s ease;
}

.whb-top-bar .wd-social-icons a:hover,
.whb-top-bar .wd-social-icon:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-1px);
}

/* ---------- General header (logo + tools) ---------- */
.whb-general-header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--dk-line) !important;
  box-shadow: 0 8px 28px rgba(26, 31, 22, 0.04);
  backdrop-filter: saturate(1.15) blur(12px);
  -webkit-backdrop-filter: saturate(1.15) blur(12px);
}

.whb-general-header .whb-flex-row,
.whb-general-header .container {
  min-height: 88px;
  align-items: center !important;
}

.whb-general-header .whb-column {
  display: flex;
  align-items: center;
}

.whb-general-header .whb-col-left {
  justify-content: flex-start;
}

.whb-general-header .whb-col-center {
  justify-content: center;
  flex: 1 1 auto;
}

.whb-general-header .whb-col-right {
  justify-content: flex-end;
  gap: 4px;
}

/* Brand mark */
.dk-brand-mark {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.dk-brand-mark__mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--dk-green), var(--dk-green-dark));
  box-shadow: 0 10px 22px rgba(131, 183, 53, 0.35);
}

.dk-brand-mark__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.dk-brand-mark__name {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--dk-ink);
}

.dk-brand-mark__tag {
  font-size: 12px;
  color: var(--dk-muted);
  font-weight: 500;
}

.whb-general-header .site-logo img,
.whb-general-header .wd-logo img {
  max-height: 52px;
  width: auto;
}

/* Desktop center search */
.dk-desktop-search {
  display: none;
  width: min(560px, 100%);
}

.whb-general-header .whb-col-center:has(.dk-desktop-search),
.whb-general-header .whb-column9:has(.dk-desktop-search) {
  display: flex !important;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
}

.dk-desktop-search form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--dk-cream);
  border: 1px solid var(--dk-line);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.dk-desktop-search form:focus-within {
  background: #fff;
  border-color: rgba(131, 183, 53, 0.55);
  box-shadow: 0 0 0 4px rgba(131, 183, 53, 0.14);
}

.dk-desktop-search input[type="search"] {
  flex: 1;
  height: 48px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 18px !important;
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-size: 14px !important;
  color: var(--dk-ink) !important;
}

.dk-desktop-search button {
  height: 48px;
  min-width: 108px;
  border: 0 !important;
  background: var(--dk-green) !important;
  color: #fff !important;
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  cursor: pointer;
  transition: background 0.25s ease;
}

.dk-desktop-search button:hover {
  background: var(--dk-green-dark) !important;
}

@media (min-width: 1025px) {
  .dk-desktop-search {
    display: block;
  }

  /* hide redundant fullscreen search icon when desktop form exists */
  .whb-general-header.dk-has-desktop-search .wd-header-search {
    display: none !important;
  }
}

/* Header tools */
.whb-general-header .wd-tools-element > a,
.whb-general-header .wd-header-cart > a,
.whb-general-header .wd-header-my-account > a,
.whb-general-header .wd-header-wishlist > a,
.whb-general-header .wd-header-search > a {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 10px 12px !important;
  color: var(--dk-ink) !important;
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 600 !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.whb-general-header .wd-tools-element > a:hover,
.whb-general-header .wd-header-cart > a:hover,
.whb-general-header .wd-header-my-account > a:hover,
.whb-general-header .wd-header-wishlist > a:hover,
.whb-general-header .wd-header-search > a:hover {
  background: rgba(131, 183, 53, 0.12) !important;
  color: var(--dk-green-dark) !important;
  transform: translateY(-1px);
}

.whb-general-header .wd-tools-text {
  font-size: 13px !important;
  text-transform: none !important;
}

.whb-general-header .wd-cart-number,
.whb-general-header .wd-tools-count {
  background: var(--dk-green) !important;
  color: #fff !important;
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 10px rgba(131, 183, 53, 0.3);
}

/* ---------- Desktop navigation row ---------- */
.whb-header-bottom {
  background: #fff !important;
  border-bottom: 1px solid var(--dk-line) !important;
}

.whb-header-bottom .whb-flex-row,
.whb-header-bottom .container {
  min-height: 54px;
  align-items: center !important;
}

.whb-header-bottom .wd-header-main-nav,
.whb-header-bottom .wd-header-nav {
  width: 100%;
}

.whb-header-bottom .wd-nav-main,
.whb-header-bottom .menu.wd-nav {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  justify-content: flex-start;
}

.whb-header-bottom .wd-nav-main > li > a,
.whb-header-bottom .wd-nav > li > a,
.whb-header-bottom .woodmart-nav-link {
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--dk-ink) !important;
  padding: 15px 16px !important;
  position: relative;
}

.whb-header-bottom .wd-nav-main > li > a .nav-link-text,
.whb-header-bottom .wd-nav > li > a .nav-link-text {
  position: relative;
}

.whb-header-bottom .wd-nav-main > li > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li > a .nav-link-text::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 2px;
  background: var(--dk-green);
  transform: scaleX(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.whb-header-bottom .wd-nav-main > li:hover > a .nav-link-text::after,
.whb-header-bottom .wd-nav-main > li.current-menu-item > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li:hover > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li.current-menu-item > a .nav-link-text::after {
  transform: scaleX(1);
}

.whb-header-bottom .wd-nav-main > li:hover > a,
.whb-header-bottom .wd-nav-main > li.current-menu-item > a,
.whb-header-bottom .wd-nav > li:hover > a,
.whb-header-bottom .wd-nav > li.current-menu-item > a {
  color: var(--dk-green-dark) !important;
}

.whb-header .wd-dropdown-menu,
.whb-header .wd-dropdown {
  border-radius: 16px !important;
  border: 1px solid var(--dk-line) !important;
  box-shadow: 0 18px 50px rgba(26, 31, 22, 0.12) !important;
  overflow: hidden;
}

.whb-header .wd-dropdown-menu a,
.whb-header .wd-sub-menu a {
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 500 !important;
}

.whb-header .wd-dropdown-menu a:hover,
.whb-header .wd-sub-menu a:hover {
  color: var(--dk-green-dark) !important;
  background: rgba(131, 183, 53, 0.08) !important;
}

/* ---------- Sticky: do not override Woodmart clone visibility ---------- */
.whb-sticked .whb-general-header,
.whb-clone.whb-sticked .whb-general-header {
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 12px 36px rgba(26, 31, 22, 0.1);
  backdrop-filter: saturate(1.15) blur(12px);
  -webkit-backdrop-filter: saturate(1.15) blur(12px);
}

/* ---------- Large desktop polish ---------- */
@media (min-width: 1200px) {
  .whb-general-header .whb-flex-row,
  .whb-general-header .container {
    min-height: 96px;
  }

  .dk-brand-mark__name {
    font-size: 1.45rem;
  }

  .whb-header-bottom .wd-nav-main > li > a,
  .whb-header-bottom .wd-nav > li > a {
    padding: 16px 18px !important;
    font-size: 15px !important;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .whb-top-bar .wd-header-text,
  .whb-top-bar .wd-header-text strong {
    font-size: 11.5px !important;
  }

  .whb-general-header .whb-flex-row,
  .whb-general-header .container {
    min-height: 68px;
  }

  .dk-brand-mark__mark {
    width: 40px;
    height: 40px;
    font-size: 17px;
    border-radius: 12px;
  }

  .dk-brand-mark__name {
    font-size: 1.15rem;
  }

  .dk-brand-mark__tag {
    font-size: 10.5px;
  }

  .whb-general-header .wd-tools-text {
    display: none !important;
  }

  .whb-header-bottom {
    display: none !important;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .whb-top-bar .whb-flex-row,
  .whb-top-bar .container {
    min-height: 36px;
  }

  .whb-general-header .whb-flex-row,
  .whb-general-header .container {
    min-height: 62px;
  }

  .dk-brand-mark__tag {
    display: none;
  }

  .dk-brand-mark {
    gap: 8px;
  }
}

/* Mobile drawer typography */
.mobile-nav,
.wd-side-hidden,
#mobile-nav {
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
}

@keyframes dk-header-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1025px) {
  .whb-header {
    animation: dk-header-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}


/* ===== Brand logo + name ===== */
.dk-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  max-width: 100%;
}
.dk-brand__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
}
.dk-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.dk-brand__name {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--dk-ink, #1a1f16);
  white-space: nowrap;
}
.dk-brand__tag {
  font-size: 11px;
  color: var(--dk-muted, #5f6758);
  font-weight: 500;
  white-space: nowrap;
}
.whb-general-header .site-logo a,
.whb-general-header .wd-logo,
.whb-clone .site-logo a {
  display: inline-flex !important;
  align-items: center;
}

/* Keep old mark styles harmless if residual */
.dk-brand-mark { display: inline-flex; align-items: center; gap: 10px; }

/* ===== Fix submenu hover gap (dropdown jumping) ===== */
.whb-header-bottom .wd-nav-main > li.menu-item-has-children,
.whb-header-bottom .wd-nav > li.menu-item-has-children,
.whb-header .wd-nav-main > li.menu-item-has-children {
  position: relative;
}

/* Invisible bridge so mouse can travel to dropdown */
.whb-header-bottom .wd-nav-main > li.menu-item-has-children > a,
.whb-header-bottom .wd-nav > li.menu-item-has-children > a {
  position: relative;
  z-index: 2;
}

.whb-header .wd-dropdown-menu,
.whb-header .wd-dropdown,
.whb-header-bottom .wd-dropdown-menu {
  margin-top: 0 !important;
  top: 100% !important;
  padding-top: 12px !important; /* hover bridge */
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.whb-header .wd-dropdown-menu > .container,
.whb-header .wd-dropdown-menu > ul,
.whb-header .wd-dropdown > .container,
.whb-header .wd-dropdown > ul,
.whb-header .wd-sub-menu,
.whb-header-bottom .wd-dropdown-menu .wd-sub-menu {
  background: #fff !important;
  border: 1px solid var(--dk-line, rgba(26,31,22,.08)) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 50px rgba(26, 31, 22, 0.12) !important;
  overflow: hidden;
}

/* underline shouldn't steal pointer events */
.whb-header-bottom .wd-nav-main > li > a .nav-link-text::after,
.whb-header-bottom .wd-nav > li > a .nav-link-text::after {
  pointer-events: none !important;
}

/* Keep dropdown open while hovering the bridge area */
.whb-header-bottom .wd-nav-main > li.menu-item-has-children:hover > .wd-dropdown-menu,
.whb-header-bottom .wd-nav-main > li.menu-item-has-children:hover > .wd-dropdown,
.whb-header .wd-nav-main > li.menu-item-has-children:hover > .wd-dropdown-menu {
  pointer-events: auto;
}

/* nested submenus */
.whb-header .wd-sub-menu .wd-dropdown,
.whb-header .menu-item-has-children .sub-sub-menu {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ===== AJAX live search dropdown ===== */
.dk-desktop-search {
  position: relative;
}
.dk-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--dk-line, rgba(26,31,22,.1));
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(26, 31, 22, 0.14);
  overflow: hidden;
  text-align: right;
}
.dk-search-results.is-open {
  display: block;
}
.dk-search-loading,
.dk-search-empty {
  padding: 16px 18px;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 13px;
  color: var(--dk-muted, #5f6758);
}
.dk-search-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 360px;
  overflow-y: auto;
}
.dk-search-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none !important;
  color: var(--dk-ink, #1a1f16) !important;
  transition: background .2s ease;
}
.dk-search-list a:hover {
  background: rgba(131, 183, 53, 0.1);
}
.dk-search-list img,
.dk-search-thumb-fallback {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f5ef;
  flex-shrink: 0;
}
.dk-search-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dk-search-title {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.dk-search-price {
  font-size: 12.5px;
  color: var(--dk-green-dark, #6a9628);
  font-weight: 700;
}
.dk-search-all {
  display: block;
  padding: 12px 14px;
  border-top: 1px solid var(--dk-line, rgba(26,31,22,.08));
  text-align: center;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--dk-green-dark, #6a9628) !important;
  text-decoration: none !important;
  background: #f7faf2;
}
.dk-search-all:hover {
  background: rgba(131, 183, 53, 0.14);
}

@media (max-width: 1024px) {
  .dk-brand__logo {
    width: 42px;
    height: 42px;
  }
  .dk-brand__name {
    font-size: 1.05rem;
  }
  .dk-brand__tag {
    display: none;
  }
}


/* dk-brand header force */
.whb-general-header .site-logo a.wd-logo > img:not(.dk-brand__logo),
.whb-general-header .wd-logo > img:not(.dk-brand__logo),
.whb-clone .site-logo a.wd-logo > img:not(.dk-brand__logo),
.whb-sticky-header .site-logo a.wd-logo > img:not(.dk-brand__logo) {
  display: none !important;
}
.whb-general-header .dk-brand,
.whb-clone .dk-brand,
.whb-sticky-header .dk-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  visibility: visible !important;
  opacity: 1 !important;
}
.whb-general-header .dk-brand__logo,
.whb-clone .dk-brand__logo {
  width: 52px !important;
  height: 52px !important;
  max-height: 52px !important;
  object-fit: contain !important;
  display: block !important;
}
