/* Reihanly — Glass Header */

:root {
  --rh-header-h: 68px;
  --rh-header-h-mobile: 64px;
  --rh-glass-bg: rgba(255, 255, 255, 0.78);
  --rh-glass-bg-scrolled: rgba(255, 255, 255, 0.92);
  --rh-glass-border: rgba(255, 255, 255, 0.7);
  --rh-glass-shadow: 0 4px 24px rgba(45, 42, 38, 0.06);
  --rh-glass-shadow-scrolled: 0 8px 32px rgba(45, 42, 38, 0.1);
  --rh-header-blur: 18px;
}

/* Kill legacy theme conflicts inside glass header */
.rh-header.sticky-wrapper,
.rh-header .header-middle,
.rh-header .header-middle .container {
  background: transparent !important;
  border: none !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.page-home .rh-header.sticky-wrapper {
  background: transparent !important;
  box-shadow: none !important;
}

.rh-header .logo,
.rh-header .mobile-logo {
  margin: 0 !important;
  min-height: 0 !important;
}

.rh-header .header-right {
  margin: 0 !important;
  align-self: center !important;
  float: none !important;
}

.rh-header.lux-header .header-container,
.rh-header .header-container {
  padding: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.rh-header.lux-header .logo img,
.rh-header.lux-header .mobile-logo img,
.rh-header .logo img,
.rh-header .mobile-logo img,
.rh-header__logo img {
  height: 56px !important;
  max-height: 56px !important;
  width: auto !important;
  object-fit: contain !important;
}

/* Fixed glass header — sticky fails when ancestors use overflow-x */
.rh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  width: 100%;
}

/* Reserve space so content isn't under the fixed header */
.page-wrapper > .header.header-28 {
  display: block;
  min-height: var(--rh-header-h);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.has-bottom-nav .page-wrapper > .header.header-28 {
  min-height: var(--rh-header-h);
}

.rh-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rh-glass-bg);
  backdrop-filter: blur(var(--rh-header-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--rh-header-blur)) saturate(1.4);
  border-bottom: 1px solid rgba(45, 42, 38, 0.06);
  box-shadow: var(--rh-glass-shadow);
  transition: background 0.35s ease, box-shadow 0.35s ease;
  z-index: -1;
  pointer-events: none;
}

.rh-header.is-scrolled::before,
.rh-header.scrolled::before {
  background: var(--rh-glass-bg-scrolled);
  box-shadow: var(--rh-glass-shadow-scrolled);
}

.rh-header__shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.rh-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--rh-header-h);
}

/* Logo */
.rh-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.25s ease;
  z-index: 1;
}

.rh-header__logo:hover {
  transform: scale(1.03);
}

.rh-header__logo--mobile {
  display: none !important;
}

/* Desktop nav — beat style.css .main-nav { display:none } and .menu > li > a padding */
.rh-header .rh-header__nav.main-nav,
.rh-header .main-nav {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
  margin: 0 !important;
  min-width: 0;
}

.rh-header .rh-header__nav-list.menu,
.rh-header .menu {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 2px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 4px !important;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.rh-header .menu > li {
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

.rh-header .menu > li > a,
.rh-header .rh-header__nav-link,
.rh-header.lux-header .main-nav .menu > li > a {
  display: inline-flex !important;
  align-items: center !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  color: var(--luxury-text, #2d2a26) !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  text-transform: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
  height: auto !important;
  position: relative;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.rh-header .menu > li > a::before,
.rh-header .menu > li > a::after,
.rh-header.lux-header .main-nav .menu > li > a::after {
  display: none !important;
  content: none !important;
}

.rh-header .menu > li > a:hover,
.rh-header .rh-header__nav-link:hover {
  color: var(--primary-color) !important;
  background: rgba(var(--primary-color-rgb), 0.08) !important;
}

.rh-header .menu > li > a.is-active,
.rh-header .rh-header__nav-link.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary-color-mid, var(--primary-color)), var(--primary-color-dark)) !important;
  box-shadow: 0 4px 14px rgba(var(--primary-color-rgb), 0.3) !important;
}

/* Actions */
.rh-header__actions,
.rh-header .header-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.rh-header__search-form {
  display: flex;
  align-items: center;
}

.rh-header__search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  min-width: 200px;
  max-width: 260px;
  box-shadow: inset 0 1px 2px rgba(45, 42, 38, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rh-header__search-wrap:focus-within {
  border-color: rgba(var(--primary-color-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.12);
}

.rh-header__search-input,
.rh-header .search-input-header,
.rh-header.lux-header .search-input-header {
  flex: 1;
  border: none !important;
  background: transparent !important;
  font-size: 0.875rem !important;
  font-family: inherit !important;
  color: var(--luxury-text, #2d2a26) !important;
  min-width: 0;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
  line-height: 1.4 !important;
}

.rh-header__search-input::placeholder {
  color: var(--luxury-text-muted, #7a7268);
}

.rh-header__search-btn,
.rh-header .search-button-header,
.rh-header.lux-header .search-button-header {
  width: 34px !important;
  height: 34px !important;
  border: none !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--primary-color-mid, var(--primary-color)), var(--primary-color-dark)) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  font-size: 0.85rem !important;
  flex-shrink: 0;
  padding: 0 !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rh-header__search-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.35);
}

.rh-header__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.55);
  color: var(--luxury-text, #2d2a26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
}

.rh-header__icon-btn:hover,
.rh-header__icon-btn.is-active,
.rh-header__icon-btn.active {
  background: rgba(var(--primary-color-rgb), 0.1);
  border-color: rgba(var(--primary-color-rgb), 0.25);
  color: var(--primary-color);
}

.rh-header__menu-btn {
  display: none !important;
}

.rh-header__search-mobile {
  display: none;
}

/* Cart */
.rh-header .cart-dropdown {
  position: relative;
}

.rh-header .cart-dropdown > a,
.rh-header.lux-header .cart-dropdown > a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 12px 6px 8px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  background: rgba(255, 255, 255, 0.55) !important;
  text-decoration: none !important;
  color: var(--luxury-text, #2d2a26) !important;
  transition: all 0.2s;
  min-height: 0 !important;
  height: auto !important;
}

.rh-header .cart-dropdown > a:hover {
  background: rgba(var(--primary-color-rgb), 0.1) !important;
  border-color: rgba(var(--primary-color-rgb), 0.25) !important;
}

.rh-header .cart-dropdown .icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--primary-color-mid, var(--primary-color)), var(--primary-color-dark)) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.9rem !important;
  position: relative;
}

.rh-header .cart-count {
  position: absolute;
  top: -5px;
  left: -5px;
  min-width: 18px;
  height: 18px;
  background: #e85d4c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
  padding: 0 3px;
}

.rh-header .cart-txt,
.rh-header.lux-header .cart-txt {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: var(--luxury-text, #2d2a26) !important;
  white-space: nowrap;
}

.rh-header .btn-login,
.rh-header.lux-header .btn-login {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--primary-color-mid, var(--primary-color)), var(--primary-color-dark)) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(var(--primary-color-rgb), 0.3);
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rh-header .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--primary-color-rgb), 0.4);
  color: #fff !important;
}

/* Dropdowns */
.rh-header .dropdown-menu {
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(45, 42, 38, 0.12) !important;
  padding: 0 !important;
  margin-top: 10px !important;
  min-width: 320px;
  max-width: min(360px, calc(100vw - 24px));
  overflow: hidden;
}

/* Cart dropdown — clean glass panel */
.rh-header .rh-cart-menu {
  font-family: var(--rh-font, Vazir, Tahoma, sans-serif) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

.rh-header .rh-cart-menu__head {
  padding: 12px 14px;
  font-size: 0.9rem !important;
  font-weight: 700;
  color: var(--luxury-text, #2d2a26);
  border-bottom: 1px solid rgba(45, 42, 38, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.rh-header .rh-cart-menu__list,
.rh-header .dropdown-cart-products {
  max-height: 280px;
  overflow-y: auto;
  margin: 0 !important;
  padding: 4px 0 !important;
}

.rh-header .rh-cart-item,
.rh-header .dropdown-cart-products .product {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  border: none !important;
  border-bottom: 1px solid rgba(45, 42, 38, 0.06) !important;
  box-shadow: none !important;
  float: none !important;
  position: relative;
}

.rh-header .rh-cart-item:last-child {
  border-bottom: none !important;
}

.rh-header .rh-cart-item__thumb,
.rh-header .product-image-container {
  flex-shrink: 0;
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  margin: 0 !important;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f1ec;
  display: block;
}

.rh-header .rh-cart-item__thumb img,
.rh-header .dropdown-cart-products .product-image-container img {
  width: 56px !important;
  height: 56px !important;
  object-fit: cover;
  display: block;
}

.rh-header .rh-cart-item__body,
.rh-header .product-info {
  flex: 1;
  min-width: 0;
  text-align: right !important;
}

.rh-header .rh-cart-item__title,
.rh-header .product-title,
.rh-header .product-title a {
  display: block !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: var(--luxury-text, #2d2a26) !important;
  text-decoration: none !important;
  text-align: right !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rh-header .rh-cart-item__title:hover,
.rh-header .product-title a:hover {
  color: var(--primary-color) !important;
}

.rh-header .rh-cart-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
}

.rh-header .rh-cart-item__qty {
  font-size: 0.75rem !important;
  color: var(--luxury-text-muted, #7a7268) !important;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.rh-header .rh-cart-item__line,
.rh-header .product-price {
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: var(--primary-color) !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rh-header .rh-cart-item__remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(232, 93, 76, 0.08);
  color: #c0392b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: background 0.2s;
}

.rh-header .rh-cart-item__remove:hover {
  background: rgba(232, 93, 76, 0.16);
}

.rh-header .rh-cart-menu__total,
.rh-header .dropdown-cart-total {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px !important;
  margin: 0 !important;
  border-top: 1px solid rgba(45, 42, 38, 0.08);
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--luxury-text, #2d2a26) !important;
  text-transform: none !important;
}

.rh-header .rh-cart-menu__total.is-visible,
.rh-header .dropdown-cart-total.is-visible {
  display: flex !important;
}

.rh-header .rh-cart-menu__total #cart-total-price,
.rh-header .dropdown-cart-total #cart-total-price {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--primary-color) !important;
  font-variant-numeric: tabular-nums;
  margin: 0 !important;
}

.rh-header .rh-cart-menu__action,
.rh-header .dropdown-cart-action {
  padding: 0 14px 14px !important;
  margin: 0 !important;
  display: none;
}

.rh-header .rh-cart-menu__action.is-visible,
.rh-header .dropdown-cart-action.is-visible {
  display: block !important;
}

.rh-header .rh-cart-menu__action a,
.rh-header .dropdown-cart-action a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 14px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark)) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(var(--primary-color-rgb), 0.28);
}

.rh-header .empty-cart-msg {
  text-align: center;
  padding: 28px 16px;
  color: var(--luxury-text-muted, #7a7268);
  font-size: 0.875rem !important;
  margin: 0;
}

.rh-header .cart-txt,
.rh-header.lux-header .cart-txt {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.rh-header .user-menu.dropdown-menu,
.rh-header .user-menu {
  padding: 12px !important;
}

.rh-header .user-balance {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.08);
  border-radius: 8px;
  margin-bottom: 8px;
}

.rh-header .user-divider {
  margin: 8px 0;
  border-color: rgba(45, 42, 38, 0.08);
}

.rh-header .user-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rh-header .user-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--luxury-text, #2d2a26);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.rh-header .user-links a:hover {
  background: rgba(var(--primary-color-rgb), 0.08);
  color: var(--primary-color);
}

.rh-header .btn-logout {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(232, 93, 76, 0.3);
  border-radius: 10px;
  background: rgba(232, 93, 76, 0.08);
  color: #c0392b;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Mobile search panel */
.rh-header__search-panel,
.rh-header .mobile-search-bar {
  display: none;
  padding: 0 0 12px;
}

.rh-header__search-panel.is-open,
.rh-header__search-panel.active,
.rh-header .mobile-search-bar.active {
  display: block;
}

.rh-header__search-panel .mobile-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rh-header__search-panel .mobile-search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 10px 14px;
}

.rh-header__search-panel .mobile-search-input,
.rh-header.lux-header .mobile-search-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  font-size: 0.9rem !important;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.rh-header__search-panel .mobile-search-submit {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

/* Page spacing */
.page-content > .modern-container:first-child,
.main .page-content > .modern-container:first-child {
  margin-top: calc(var(--rh-header-h) + 24px) !important;
}

/* Mid desktop: tighter nav */
@media (max-width: 1199px) and (min-width: 992px) {
  .rh-header__search-wrap {
    min-width: 160px;
    max-width: 180px;
  }

  .rh-header .menu > li > a,
  .rh-header .rh-header__nav-link {
    padding: 7px 10px !important;
    font-size: 0.8rem !important;
  }

  .rh-header .cart-txt {
    display: none !important;
  }
}

/* Mobile — bottom nav only, no hamburger */
@media (max-width: 991px) {
  :root {
    --rh-header-h: var(--rh-header-h-mobile);
  }

  .rh-header__shell {
    padding: 0 12px;
  }

  .rh-header__row,
  .rh-header.lux-header .header-container {
    min-height: var(--rh-header-h-mobile);
    gap: 10px !important;
  }

  .rh-header__logo--desktop {
    display: none !important;
  }

  .rh-header__logo--mobile {
    display: flex !important;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .rh-header__logo--mobile:hover {
    transform: translateX(-50%) scale(1.03);
  }

  .rh-header.lux-header .logo img,
  .rh-header.lux-header .mobile-logo img,
  .rh-header .logo img,
  .rh-header .mobile-logo img,
  .rh-header__logo--mobile img {
    height: 54px !important;
    max-height: 54px !important;
    width: auto !important;
  }

  .page-wrapper > .header.header-28 {
    min-height: var(--rh-header-h-mobile);
  }

  .rh-header .rh-header__nav.main-nav,
  .rh-header .main-nav,
  .rh-header__search-form,
  .rh-header .cart-dropdown,
  .rh-header .btn-login,
  .rh-header.lux-header .btn-login,
  .rh-header .user-menu-dropdown,
  .rh-header.lux-header .user-menu-dropdown,
  .rh-header.lux-header .cart-dropdown {
    display: none !important;
  }

  .rh-header__search-mobile {
    display: inline-flex !important;
  }

  .rh-header__actions {
    margin-right: 0;
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .rh-header__row {
    position: relative;
  }

  .page-content > .modern-container:first-child,
  .main .page-content > .modern-container:first-child {
    margin-top: calc(var(--rh-header-h-mobile) + 16px) !important;
  }
}

@media (max-width: 480px) {
  .rh-header.lux-header .logo img,
  .rh-header.lux-header .mobile-logo img,
  .rh-header .logo img,
  .rh-header .mobile-logo img,
  .rh-header__logo--mobile img {
    height: 52px !important;
    max-height: 52px !important;
  }

  .rh-header__icon-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    border-radius: 10px;
  }
}
