/* TOP BAR */
.topbar{background:var(--red);color:#fff;font-size:13px}
.topbar .container{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:7px 0}
.topbar .left, .topbar .right{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.topbar a{color:#fff;opacity:.95}
.topbar a:hover{opacity:1}

.currencySelect, .langSelect{
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.08);
  color:#fff;border-radius:12px;padding:6px 10px;font-weight:800;cursor:pointer
}
.currencySelect option, .langSelect option{color:#111}

/* MAIN HEADER */
.header{background:#fff;border-bottom:1px solid var(--border)}
.header .container{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px}
.logoBox{
  width:90px;height:54px;border-radius:16px;background:var(--dark);
  display:grid;place-items:center;color:#fff;font-weight:900
}

.logo-img {
  height: 55px;
  width: auto;
  max-width: 100%;
  display: block;
}


/* Sticky Nav */
.sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  animation: slideDown .3s ease;
}

/* Smooth animation */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Prevent content jump */
body.sticky-active {
  padding-top: 75px;
}


.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 90px;      /* adjust if needed */
  width: auto;
  display: block;
}


/* ============================= */
/* CATEGORY DROPDOWN (HOVER) */
/* ============================= */

.category-wrap {
  position: relative;
}

/* Red button */
.catBtn {
  background: #c4151c;
  color: #fff;
  font-weight: 800;
  padding: 14px 18px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

/* Dropdown box */
.category-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  background: #fff;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 9999;
}

/* Show on hover */
.category-wrap:hover .category-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* List */
.category-list {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.category-list li a {
  display: block;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  border-bottom: 1px solid #eee;
}

.category-list li:last-child a {
  border-bottom: none;
}

/* Hover effect */
.category-list li a:hover {
  background: #f5f5f5;
  color: #c4151c;
}


/* SUBMENU */
.submenu {
  display: none;
  background: #1a1a1a;
  border-radius: 10px;
  margin-left: 10px;
}

.category-dropdown li:hover .submenu {
  display: block;
}

.submenu a {
  padding: 8px 14px;
  display: block;
  font-size: 14px;
  color: #ccc;
}

.submenu a:hover {
  background: rgba(255,255,255,.08);
}

.top-social {
  display: flex;
  gap: 12px;
}

.top-social a {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  transition: .25s;
}

.top-social a:hover {
  background: #fff;
  color: #c4151c;
}


.brandText{line-height:1}
.brandText .name{font-weight:1000;font-size:16px}
.brandText .sub{font-size:12px;color:var(--muted);font-weight:800}

.searchWrap{flex:1;max-width:640px;position:relative}
.searchBar{display:flex;background:#fff;border:1px solid var(--border);border-radius:999px;overflow:hidden}
.searchBar input{flex:1;border:none;outline:none;padding:12px 14px;font-size:14px}
.searchBar button{border:none;background:var(--red);color:#fff;padding:0 18px;cursor:pointer;font-weight:900}

.searchSuggestions{
  position:absolute;left:0;right:0;top:56px;
  background:#fff;border:1px solid var(--border);border-radius:16px;
  overflow:hidden;box-shadow:0 12px 30px rgba(0,0,0,.12);
  z-index:50;
}
.suggItem{
  width:100%;display:flex;justify-content:space-between;gap:10px;
  padding:10px 12px;border:none;background:#fff;cursor:pointer;
  font-weight:900
}
.suggItem:hover{background:#f3f4f6}
.suggItem small{color:var(--muted);font-weight:900}

/* Actions */
.actions{
  display:flex;
  gap:10px;
  align-items:center;
  /* Prevent the action buttons from wrapping onto multiple lines. Without
     this, narrower pages (e.g. product pages) would wrap the login,
     wishlist, compare and cart icons to a second line, breaking the
     header layout. */
  flex-wrap:nowrap;
  /* Ensure whitespace within action items doesn't cause unwanted line breaks */
  white-space:nowrap;
  justify-content:flex-end;
}
.actionPill{
  background:#f3f4f6;border-radius:999px;padding:9px 12px;font-weight:900;display:inline-flex;gap:8px;align-items:center
}
.countBubble{
  background:var(--red);color:#fff;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:1000
}
.cartTotal{font-weight:1000}

/* NAV BAR */
.navbar{background:#111;color:#fff}
.navbar .container{display:flex;gap:14px;align-items:center;padding:10px 0}
.catBtn{
  background:var(--red);border:none;color:#fff;font-weight:1000;
  padding:10px 14px;border-radius:14px;cursor:pointer;display:flex;gap:10px;align-items:center
}
.navLinks{display:flex;gap:14px;align-items:center;flex:1;flex-wrap:wrap}
.navLinks a{color:#fff;opacity:.95;font-weight:900;font-size:14px;padding:8px 6px}
.navLinks a:hover{opacity:1}
.chooseBtn{
  border:1px solid var(--red);padding:10px 14px;border-radius:14px;font-weight:1000;color:#fff
}
.chooseBtn:hover{background:rgba(196,21,28,.15)}

@media (max-width: 900px){
  .searchWrap{display:none}
  .navLinks{display:none}
}



/* =====================================================
   MOBILE HEADER — FINAL, CLEAN & OPTIMIZED
   ===================================================== */

/* Default: hide mobile UI */
.mobile-header,
.mobile-menu,
.m-cat-dropdown {
  display: none;
}

/* =====================================================
   MOBILE MODE
   ===================================================== */
@media (max-width: 768px) {

  /* Hide DESKTOP headers */
  .topbar,
  .header,
  .navbar {
    display: none !important;
  }

  /* Prevent content jump */
  body {
    padding-top: 176px; /* exact height of mobile header */
  }

  /* =====================
     MOBILE HEADER WRAPPER
     ===================== */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0f0f0f;
    z-index: 100000;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: block;
  }

  /* =====================
     ROW BASE
     ===================== */
  .mobile-header .m-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }

  /* =====================
     ROW 1 — MENU + LOGO + ACTIONS
     ===================== */
  .m-row1 {
    justify-content: space-between;
  }

  .m-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #c9a23f;
    border: none;
    color: #111;
    display: grid;
    place-items: center;
    font-size: 20px;
    cursor: pointer;
  }

  .m-logo img {
    height: 70px;
    display: block;
  }

  .m-actions {
    display: flex;
    gap: 10px;
  }

  .m-action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
  }

  .m-wa { background: #25D366; }
  .m-call { background: #c9a23f; }

  /* =====================
     ROW 2 — SEARCH
     ===================== */
  .m-row2 {
    padding-top: 0;
  }

  .m-search {
    flex: 1;
    display: flex;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.15);
  }

  .m-search input {
    flex: 1;
    border: 0;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
  }

  .m-search button {
    width: 54px;
    border: 0;
    background: #c9a23f;
    color: #111;
    font-size: 18px;
    cursor: pointer;
  }

  /* =====================
     ROW 3 — CATEGORIES + LANG + CHOOSE
     ===================== */
  .m-row3 {
    padding-top: 0;
    justify-content: space-between;
  }

  .m-cat-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    background: #c9a23f;
    color: #111;
    font-weight: 900;
    border: none;
    cursor: pointer;
  }

  .m-lang {
    width: 70px;
    height: 44px;
    border-radius: 12px;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 0 8px;
  }

  .m-choose {
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #c9a23f;
    background: #111;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    display: grid;
    place-items: center;
    white-space: nowrap;
  }

  /* =====================
     CATEGORY DROPDOWN
     ===================== */
  .m-cat-dropdown {
    display: none;
    background: #111;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .m-cat-dropdown a {
    display: block;
    padding: 14px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .m-cat-dropdown.show {
    display: block;
  }

  /* =====================
     MOBILE MENU (MAIN LINKS)
     ===================== */
  .mobile-menu {
    position: fixed;
    top: 176px;
    left: 0;
    right: 0;
    background: #111;
    z-index: 99999;
    display: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .mobile-menu.show {
    display: block;
  }

  .mobile-menu a {
    display: block;
    padding: 14px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}



/* =====================================
   MOBILE HEADER FINAL SIZE OPTIMIZATION
   ===================================== */
@media (max-width: 768px) {

  /* Row spacing fix */
  .mobile-header .m-row {
    padding: 8px 10px;
  }

  /* MENU BUTTON */
  .m-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* LOGO */
  .m-logo img {
    height: 50px;
  }

  /* WhatsApp & Call buttons */
  .m-action-btn,
  .mobile-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  /* Search bar */
  .m-search input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .m-search button {
    width: 44px;
    font-size: 16px;
  }

  /* Categories row */
  .m-cat-btn {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* Language select */
  .m-lang {
    height: 38px;
    font-size: 14px;
  }

  .lang-dropdown {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c49a3a, #b58b2e);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.lang-btn img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
}

.lang-arrow {
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.lang-dropdown:hover .lang-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: 115%;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.18);
  min-width: 150px;
  padding: 6px 0;
  display: none;
  z-index: 999;
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.lang-menu li:hover {
  background: #f3f3f3;
}

.lang-menu img {
  width: 22px;
  height: 15px;
  border-radius: 2px;
}

.lang-dropdown:hover .lang-menu {
  display: block;
}




  /* Choose device button */
  .m-choose {
    height: 38px;
    font-size: 14px;
    padding: 0 10px;
  }
}



/* ===============================
   BREADCRUMBS – MOBILE FIX
   =============================== */
@media (max-width: 768px) {

  .breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 8px 12px;
    background: #f6f6f6;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
    overflow-x: auto;
  }

  .breadcrumbs a {
    color: #c9a23f;
    text-decoration: none;
    font-weight: 600;
  }

  .breadcrumbs span {
    color: #666;
  }
}



/* =========================
   MOBILE BUTTON SIZE FIX
   ========================= */
@media (max-width: 768px) {

  /* Categories + Language + Choose row */
  .m-row3 {
    gap: 8px;
    flex-wrap: nowrap;
  }

  /* BROWSE CATEGORIES (smaller) */
  .m-cat-btn {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
    min-width: auto;
    flex: 1;
  }

  .m-cat-btn i {
    font-size: 14px;
  }

  /* Language select */
  .m-lang {
    width: 60px;
    height: 40px;
    font-size: 13px;
    border-radius: 10px;
  }

  /* CHOOSE DEVICE (prevent overflow) */
  .m-choose {
    height: 40px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 10px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}



/* =========================
   FORCE MOBILE CATEGORY BUTTON FIX
   ========================= */
@media (max-width: 768px) {

  /* Target the REAL button */
  .navbar .catBtn,
  .catBtn {
    padding: 10px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    height: 42px !important;
    line-height: 1.2 !important;
    min-width: auto !important;
    max-width: 220px !important;
    white-space: nowrap !important;
  }

  .navbar .catBtn::before {
    font-size: 14px !important;
    margin-right: 6px;
  }
}


@media (max-width: 360px) {
  .navbar .catBtn,
  .catBtn {
    font-size: 13px !important;
    padding: 8px 12px !important;
    max-width: 200px !important;
  }
}



/* =========================
   HIDE "CHOOSE DEVICE" ON MOBILE
   ========================= */
@media (max-width: 768px) {

  /* Desktop navbar button */
  .chooseBtn {
    display: none !important;
  }

  /* Mobile header version (if exists) */
  .m-choose {
    display: none !important;
  }
}



/* Prevent background scroll when menu open */
body.menu-open {
  overflow: hidden;
}

/* Mobile menu overlay fix */
.mobile-menu {
  position: fixed;
  top: 170px; /* your header height */
  left: 0;
  right: 0;
  bottom: 0;
  background: #111;
  z-index: 99999;
  display: none;
  overflow-y: auto;
}

.mobile-menu.show {
  display: block;
}

/* Ensure floating buttons go UNDER menu */
.fab-container,
.floating-buttons {
  z-index: 5000;
}


/* Add to header.css */
.m-cat-dropdown.show {
  display: block !important;
}

/* Smooth transition for chevron */
.m-cat-btn .fa-chevron-down {
  transition: transform 0.3s ease;
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Ensure mobile menu is above other content */
.mobile-menu.show {
  display: block !important;
  z-index: 100001;
}



/* =========================================
   LANGUAGE DROPDOWN — PREMIUM ANIMATED
   ========================================= */

.lang-dropdown {
  position: relative;
  display: inline-block;
  font-family: inherit;
}

/* Button */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.35);
  background: linear-gradient(135deg, #c9a23f, #b58b2e);
  color: #111;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.lang-btn img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

/* Arrow */
.lang-btn svg {
  margin-left: 4px;
  transition: transform 0.25s ease;
}

/* Rotate arrow on open */
.lang-dropdown.open .lang-btn svg {
  transform: rotate(180deg);
}

/* Dropdown menu */
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: all 0.25s ease;
  z-index: 100000;
}

/* Show dropdown */
.lang-dropdown.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Dropdown items */
.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-menu li:hover {
  background: #f4f4f4;
}

/* Flag inside dropdown */
.lang-menu img {
  width: 22px;
  height: 15px;
  border-radius: 2px;
}

/* =========================
   RTL SUPPORT
   ========================= */

body[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
  text-align: right;
}

body[dir="rtl"] .lang-menu li {
  flex-direction: row-reverse;
}

/* =========================
   MOBILE ADJUSTMENTS
   ========================= */
@media (max-width: 768px) {
  .lang-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 12px;
  }

  .lang-menu {
    min-width: 140px;
  }
}
