/* ============================================================
   LINDO HEADER — Frontend CSS v2.1
   Không phụ thuộc Bulma hay bất kỳ framework nào
   ============================================================ */

/* BASE */
.lindo-header {
  width: 100%;
  position: relative;
  z-index: 1000;
  transition: background .3s, box-shadow .3s;
}
.lindo-header--shadow { box-shadow: 0 2px 10px rgba(0,0,0,.10); }
.lindo-header--sticky { position: sticky; top: 0; }
.lindo-header--scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.lindo-header--hide { transform: translateY(-100%); }

/* INNER */
.lindo-header__inner {
  display: flex;
  align-items: center;
justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* LOGO */
.lindo-header__logo { flex-shrink: 0; }
.lindo-header__logo-link { display: inline-block; }
.lindo-header__logo-img { max-height: 50px; width: auto; display: block; transition: opacity .2s; }
.lindo-header__logo-text { font-weight: 700; font-size: 20px; text-decoration: none; color: inherit; }

/* NAV DESKTOP */
.lindo-header__nav { flex: 1; }
.lindo-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}
.lindo-nav-menu > li { position: relative; }
.lindo-nav-menu > li > a {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: background .15s;
  white-space: nowrap;
}
.lindo-nav-menu > li > a:hover,
.lindo-nav-menu > li.current-menu-item > a,
.lindo-nav-menu > li.current-menu-ancestor > a {
  background: rgba(0,0,0,.07);
}

/* DROPDOWN */
.lindo-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px 0;
  list-style: none;
  z-index: 100;
}
.lindo-nav-menu > li:hover > .sub-menu { display: block; }
.lindo-nav-menu .sub-menu li a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: #222;
  font-size: 13px;
  transition: background .15s;
}
.lindo-nav-menu .sub-menu li a:hover { background: #f3f4f6; }

/* RIGHT SIDE */
.lindo-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* HOTLINE */
.lindo-header__hotline {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 14px;
}
.lindo-header__hotline-label { font-size: 12px; opacity: .7; }
.lindo-header__hotline-num {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
}
.lindo-header__hotline-num:hover { text-decoration: underline; }
.lindo-header__hotline-num--2 { font-size: 13px; opacity: .8; }

/* CTA BUTTON */
.lindo-header__cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s, transform .15s;
}
.lindo-header__cta-btn:hover { opacity: .9; transform: translateY(-1px); }

/* TOGGLE BUTTON (mobile) */
.lindo-header__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.lindo-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.lindo-header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lindo-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.lindo-header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE DRAWER */
.lindo-header__drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: inherit;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-top: 1px solid rgba(0,0,0,.08);
  z-index: 999;
}
.lindo-header__drawer--open { display: block; }
.lindo-header__drawer-inner { padding: 12px 20px 20px; max-width: 1280px; margin: 0 auto; }

/* Drawer menu */
.lindo-drawer-menu { list-style: none; margin: 0; padding: 0; }
.lindo-drawer-menu li a {
  display: block;
  padding: 10px 6px;
  text-decoration: none;
  color: inherit;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .15s;
}
.lindo-drawer-menu li a:hover { background: rgba(0,0,0,.04); border-radius: 6px; }
.lindo-drawer-menu .sub-menu { padding-left: 16px; }
.lindo-drawer-menu .sub-menu li a { font-size: 14px; opacity: .85; }
.lindo-header__drawer-hotline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.lindo-header__drawer-hotline a {
  font-weight: 700;
  font-size: 16px;
  color: inherit;
  text-decoration: none;
}
/* ── SEARCH BUTTON ── */
.lindo-header__search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lindo-header__search-btn:hover { background: rgba(0,0,0,.07); }

/* ── CART BUTTON ── */
.lindo-header__cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  padding: 7px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}
.lindo-header__cart-btn:hover { background: rgba(0,0,0,.07); }

.lindo-header__cart-count {
  position: absolute;
  top: 0px;
  right: 0px;
  min-width: 16px;
  height: 16px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
/* Ẩn badge khi = 0 */
.lindo-header__cart-count:empty,
.lindo-header__cart-count[data-count="0"] { display: none; }

/* ── SEARCH POPUP ── */
.lindo-search-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.lindo-search-popup--open { display: flex; align-items: flex-start; justify-content: center; }

.lindo-search-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}

.lindo-search-popup__box {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin-top: 80px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  z-index: 1;
  animation: lindoSearchIn .2s ease;
}

@keyframes lindoSearchIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lindo-search-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color .15s, background .15s;
}
.lindo-search-popup__close:hover { color: #111; background: #f3f4f6; }

.lindo-search-popup__content { margin-top: 4px; }

body.lindo-search-open { overflow: hidden; }

/* Mobile */
@media (max-width: 600px) {
  .lindo-search-popup__box {
    margin-top: 0;
    border-radius: 0 0 12px 12px;
    padding: 16px;
  }
}
/* Prevent body scroll khi menu mở */
body.lindo-menu-open { overflow: hidden; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .lindo-header__nav { display: none; }
  .lindo-header__toggle { display: flex; }
  .lindo-header__hotline-num--2 { display: none; }
}
@media (max-width: 600px) {
  .lindo-header__inner { padding: 10px 16px; gap: 10px; }
  .lindo-header__hotline { display: none; }
  .lindo-header__logo-img { max-height: 38px; }
}
