/* Extracted from views/partials/header.php (LTR default + RTL overrides) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bs-primary: #f68b1e;
  --bs-primary-rgb: 246, 139, 30;
  --primary-color: #f68b1e;
  --dark-color: #1a1a1a;
  --button-color: #f68b1e;
  --button-dark: #e07a0a;
  --gray-light: #f8f9fa;
  --gray-border: #e0e0e0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fb;
}
.top-bar {
  background: var(--dark-color);
  color: white;
  padding: 8px 0;
  position: relative;
  z-index: 1001;
}
.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.phone-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.3s;
  direction: ltr;
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 25px;
  flex-shrink: 0;
}
.phone-number:hover {
  color: var(--button-color);
  background: rgba(255,255,255,0.15);
}
.phone-number i {
  font-size: 13px;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lang-dropdown {
  position: relative;
}
.lang-toggle {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  padding: 4px 10px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.3s;
}
.lang-toggle:hover {
  background: rgba(255,255,255,0.2);
}
.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  min-width: 150px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
  overflow: hidden;
}
.lang-menu.show {
  opacity: 1;
  visibility: visible;
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s;
  cursor: pointer;
  font-size: 13px;
}
.lang-item:hover {
  background: #f5f5f5;
}
.lang-item.active {
  background: var(--button-color);
  color: white;
}
.flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 3px;
}
@media (max-width: 768px) {
  .desktop-header {
    display: none;
  }
  .mobile-header {
    display: block;
  }
  .top-bar {
    padding: 6px 0;
  }
  .phone-number span {
    display: none;
  }
  .phone-number {
    padding: 4px 8px;
    font-size: 12px;
  }
  .phone-number i {
    font-size: 12px;
  }
  .lang-toggle span {
    display: none;
  }
  .lang-toggle {
    padding: 4px 8px;
    font-size: 12px;
  }
  .mobile-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: white;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .menu-toggle {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s;
    flex-shrink: 0;
  }
  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s;
  }
  .mobile-logo {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .mobile-logo img {
    height: 45px;
    width: auto;
    max-height: 45px;
    object-fit: contain;
  }
  .mobile-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    flex-shrink: 0;
    font-size: 22px;
  }
  .mobile-cart i {
    font-size: 22px;
  }
  .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--button-color);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    padding: 0 4px;
  }
  .sidebar-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1050;
    padding: 20px;
    transition: 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  .sidebar-menu.open {
    left: 0;
  }
  .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-border);
    margin-bottom: 15px;
  }
  .sidebar-header h4 {
    margin: 0;
    color: var(--button-color);
  }
  .close-sidebar {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
  }
  .sidebar-nav {
    list-style: none;
    padding: 0;
  }
  .sidebar-nav li {
    margin-bottom: 12px;
  }
  .sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 15px;
  }
  .sidebar-nav li a:hover {
    background: #f5f5f5;
    color: var(--button-color);
  }
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  .overlay.show {
    opacity: 1;
    visibility: visible;
  }
  .mobile-search {
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-border);
  }
  .search-wrapper {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 0 15px;
  }
  .search-input {
    width: 100%;
    padding: 8px 35px 8px 15px;
    border: 1px solid var(--gray-border);
    border-radius: 50px;
    font-size: 13px;
    transition: all 0.3s;
    background: var(--gray-light);
  }
  .search-input:focus {
    outline: none;
    border-color: var(--button-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(246, 139, 30, 0.1);
  }
  .search-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: var(--button-color);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
  }
  .search-btn:hover {
    background: var(--button-dark);
    transform: translateY(-50%) scale(1.05);
  }
}
@media (min-width: 769px) {
  .mobile-header {
    display: none;
  }
  .desktop-header {
    display: block;
  }
  .desktop-main-header {
    background: white;
    padding: 8px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .desktop-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
  }
  .desktop-logo {
    flex-shrink: 0;
  }
  .desktop-logo img {
    height: 50px;
    width: auto;
    max-height: 50px;
    object-fit: contain;
  }
  .desktop-search {
    flex: 1;
    max-width: 500px;
  }
  .desktop-search-wrapper {
    position: relative;
    width: 100%;
  }
  .desktop-search-input {
    width: 100%;
    padding: 10px 45px 10px 18px;
    border: 2px solid var(--gray-border);
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.3s;
  }
  .desktop-search-input:focus {
    outline: none;
    border-color: var(--button-color);
    box-shadow: 0 0 0 3px rgba(246, 139, 30, 0.1);
  }
  .desktop-search-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: var(--button-color);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
  }
  .desktop-search-btn:hover {
    background: var(--button-dark);
    transform: translateY(-50%) scale(1.05);
  }
  .desktop-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    flex-shrink: 0;
  }
  .desktop-cart i {
    font-size: 26px;
  }
  .desktop-cart:hover {
    color: var(--button-color);
  }
  .desktop-cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background: var(--button-color);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 5px;
  }
  .desktop-nav {
    background: white;
    border-top: 1px solid var(--gray-border);
    padding: 10px 0;
  }
  .desktop-nav ul {
    display: flex;
    justify-content: center;
    gap: 35px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .desktop-nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .desktop-nav ul li a:hover {
    color: var(--button-color);
  }
}
html[dir="rtl"] .search-btn {
  right: auto;
  left: 8px;
}
html[dir="rtl"] .desktop-search-btn {
  right: auto;
  left: 8px;
}
html[dir="rtl"] .cart-count,
        html[dir="rtl"] .desktop-cart-count {
  right: auto;
  left: -12px;
}
@media (max-width: 480px) {
  .mobile-logo img {
    height: 30px;
    max-height: 30px;
  }
  .sidebar-menu {
    width: 260px;
  }
}

/* ===== RTL (Arabic) ===== */
html[dir="rtl"] .lang-menu {
  left: 0;
  right: auto;
}
@media (max-width: 768px) {
html[dir="rtl"] .sidebar-menu {
  right: -100%;
  left: auto;
}
html[dir="rtl"] .sidebar-menu.open {
  right: 0;
  left: auto;
}
}
