/******************** Header Styles ********************/

/* Reset WordPress default nav styles */
nav ul,
nav li,
.mobile-nav ul,
.mobile-nav li {
  list-style: none !important;
  gap: 0.25rem;
}

nav a,
.mobile-nav a {
  text-decoration: none !important;
  color: inherit;
}

nav li,
.mobile-nav li {
  display: list-item;
}
@media (max-width: 767px) {
  nav ul,
  .mobile-nav ul {
    display: block;
  }
}

.announcement-text {
  font-family: "Bona Nova SC", serif;
  font-size: 20px;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0;
}

/* Icon Containers */
.left-icons-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 100px;
}

.right-icons-container {
  display: flex;
  gap: 8px;
  margin-right: 100px;
}

/* Icon Buttons */
.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  position: relative;
  box-shadow: none;
}

.profile-icon {
  width: 24px !important;
  height: 24px !important;
}

.icon-button img {
  width: 30px;
  height: 30px;
}

/* Ensure wishlist icons are exactly the same size */
.wishlist-icon {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  position: relative;
  transition: all 0.3s ease-in-out;
}

/* Heart fill animation container */
.wishlist-icon-container {
  position: relative;
  width: 30px;
  height: 30px;
  overflow: hidden;
}

.wishlish-icon {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Filled heart with animation */
.wishlist-icon-filled {
  z-index: 2;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s ease-in-out;
}

/* Animation when wishlist has items */
.wishlist-icon-container.has-items .wishlist-icon-filled {
  opacity: 1;
  transform: scale(1);
}

/* Search Bar Container */
.search-bar-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  border-bottom: 1px solid #e5e7eb;
}

.search-bar-container.active {
  max-height: 100px;
}

.search-bar-inner {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  direction: rtl;
}

.search-input {
  width: 100%;
  max-width: 500px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: "Alef", sans-serif;
  font-size: 16px;
  direction: rtl;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #1a1a1a;
}

/* FiboSearch Styling - Maintain current font and style with RTL support */
.fibosearch-wrapper {
  width: 100%;
  max-width: 500px;
  direction: rtl !important;
}

/* All FiboSearch containers - RTL */
.fibosearch-wrapper *,
.fibosearch-wrapper .dgwt-wcas-search-form,
.fibosearch-wrapper .dgwt-wcas-sf-wrapp,
.fibosearch-wrapper .dgwt-wcas-search-wrapp,
.fibosearch-wrapper .dgwt-wcas-search-wrapp--layout-flex,
.fibosearch-wrapper form,
.fibosearch-wrapper div {
  direction: rtl !important;
}

/* FiboSearch form containers */
.fibosearch-wrapper .dgwt-wcas-search-form,
.fibosearch-wrapper .dgwt-wcas-sf-wrapp,
.fibosearch-wrapper .dgwt-wcas-search-wrapp {
  width: 100%;
  direction: rtl !important;
  display: flex;
  flex-direction: row-reverse;
}

/* FiboSearch input fields */
.fibosearch-wrapper .dgwt-wcas-search-input,
.fibosearch-wrapper input[type="search"],
.fibosearch-wrapper input.dgwt-wcas-search-input,
.fibosearch-wrapper input[type="text"] {
  width: 100%;
  max-width: 500px;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: "Alef", sans-serif !important;
  font-size: 16px !important;
  direction: rtl !important;
  text-align: right !important;
  transition: border-color 0.2s ease;
}

.fibosearch-wrapper .dgwt-wcas-search-input:focus,
.fibosearch-wrapper input[type="search"]:focus,
.fibosearch-wrapper input.dgwt-wcas-search-input:focus,
.fibosearch-wrapper input[type="text"]:focus {
  outline: none;
  border-color: #1a1a1a;
}

/* Placeholder text - RTL */
.fibosearch-wrapper .dgwt-wcas-search-form input::placeholder,
.fibosearch-wrapper input::placeholder {
  font-family: "Alef", sans-serif !important;
  direction: rtl !important;
  text-align: right !important;
}

/* FiboSearch buttons and icons - RTL positioning */
.fibosearch-wrapper .dgwt-wcas-submit,
.fibosearch-wrapper .dgwt-wcas-ico,
.fibosearch-wrapper button,
.fibosearch-wrapper .dgwt-wcas-search-submit {
  direction: rtl !important;
}

/* Search suggestions dropdown - Comprehensive RTL (global and scoped) */
.dgwt-wcas-suggestions-wrapp,
.fibosearch-wrapper .dgwt-wcas-suggestions-wrapp,
.fibosearch-wrapper .dgwt-wcas-suggestions {
  direction: rtl !important;
  text-align: right !important;
}

/* Global RTL for all FiboSearch suggestion elements */
body .dgwt-wcas-suggestions-wrapp,
body .dgwt-wcas-suggestion {
  direction: rtl !important;
  text-align: right !important;
}

/* Individual suggestion items - RTL with reversed order */
.dgwt-wcas-suggestion,
.fibosearch-wrapper .dgwt-wcas-suggestion,
body .dgwt-wcas-suggestion {
  direction: rtl !important;
  text-align: right !important;
  display: flex !important;
  flex-direction: row !important;
}

/* Reverse order: text content first (right), image second (left) */
.dgwt-wcas-content-wrapp,
.fibosearch-wrapper .dgwt-wcas-content-wrapp,
body .dgwt-wcas-content-wrapp {
  order: 2 !important;
}

.dgwt-wcas-si,
.fibosearch-wrapper .dgwt-wcas-si,
body .dgwt-wcas-si {
  order: 1 !important;
}

.dgwt-wcas-suggestion *,
.fibosearch-wrapper .dgwt-wcas-suggestion *,
body .dgwt-wcas-suggestion * {
  direction: rtl !important;
  text-align: right !important;
}

/* Content wrapper - RTL */
.dgwt-wcas-content-wrapp,
.fibosearch-wrapper .dgwt-wcas-content-wrapp,
body .dgwt-wcas-content-wrapp {
  direction: rtl !important;
  text-align: right !important;
  flex: 1;
  align-items: flex-start;
}

.dgwt-wcas-content-wrapp *,
.fibosearch-wrapper .dgwt-wcas-content-wrapp *,
body .dgwt-wcas-content-wrapp * {
  direction: rtl !important;
  text-align: right !important;
}

/* Title container - RTL */
.dgwt-wcas-st,
.fibosearch-wrapper .dgwt-wcas-st,
body .dgwt-wcas-st {
  direction: rtl !important;
  text-align: right !important;
  width: 100%;
}

.dgwt-wcas-st *,
.fibosearch-wrapper .dgwt-wcas-st *,
body .dgwt-wcas-st * {
  direction: rtl !important;
  text-align: right !important;
}

/* Title text - RTL */
.dgwt-wcas-st-title,
.fibosearch-wrapper .dgwt-wcas-st-title,
body .dgwt-wcas-st-title,
.dgwt-wcas-st-title strong,
.dgwt-wcas-st-title * {
  direction: rtl !important;
  text-align: right !important;
  display: inline;
  width: 100%;
}

/* Meta container (prices) - RTL */
.dgwt-wcas-meta,
.fibosearch-wrapper .dgwt-wcas-meta,
body .dgwt-wcas-meta {
  direction: rtl !important;
  text-align: right !important;
  width: 100%;
}

.dgwt-wcas-meta *,
.fibosearch-wrapper .dgwt-wcas-meta *,
body .dgwt-wcas-meta * {
  direction: rtl !important;
  text-align: right !important;
}

/* Price span - RTL */
.dgwt-wcas-sp,
.fibosearch-wrapper .dgwt-wcas-sp,
body .dgwt-wcas-sp {
  direction: rtl !important;
  text-align: right !important;
  display: block;
  width: 100%;
}

.dgwt-wcas-sp *,
.fibosearch-wrapper .dgwt-wcas-sp *,
body .dgwt-wcas-sp * {
  direction: rtl !important;
  text-align: right !important;
}

/* Price amounts - RTL */
.dgwt-wcas-sp .woocommerce-Price-amount,
.dgwt-wcas-sp .amount,
.dgwt-wcas-sp bdi,
.dgwt-wcas-sp del,
.dgwt-wcas-sp ins,
.dgwt-wcas-sp span {
  direction: rtl !important;
  text-align: right !important;
  display: inline-block;
}

/* Image container - RTL positioning */
.dgwt-wcas-si,
.fibosearch-wrapper .dgwt-wcas-si,
body .dgwt-wcas-si {
  direction: rtl !important;
  margin-left: 0;
  margin-right: auto;
  flex-shrink: 0;
  order: 1 !important;
}

/* "View all" link - RTL */
.dgwt-wcas-st-more,
.fibosearch-wrapper .dgwt-wcas-st-more,
.dgwt-wcas-suggestion-more,
body .dgwt-wcas-st-more,
body .dgwt-wcas-suggestion-more {
  direction: rtl !important;
  text-align: right !important;
  display: block;
  width: 100%;
}

.dgwt-wcas-st-more *,
.fibosearch-wrapper .dgwt-wcas-st-more *,
.dgwt-wcas-suggestion-more *,
body .dgwt-wcas-st-more *,
body .dgwt-wcas-suggestion-more * {
  direction: rtl !important;
  text-align: right !important;
}

.dgwt-wcas-st-more-total,
.fibosearch-wrapper .dgwt-wcas-st-more-total,
body .dgwt-wcas-st-more-total {
  direction: rtl !important;
  text-align: right !important;
  display: inline;
}

.search-close-btn,
.search-submit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.search-close-btn:hover,
.search-submit-btn:hover {
  background-color: #e5e7eb;
}

.search-close-btn img,
.search-submit-btn img {
  width: 24px;
  height: 24px;
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #000;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add to Cart Notification */
.added-to-cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #10b981;
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  font-family: "Bona Nova SC", serif;
  font-size: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.added-to-cart-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Toast Notification System */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-family: "Bona Nova SC", serif;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 350px;
  direction: rtl;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-notification.success {
  background-color: #10b981;
  color: white;
}

.toast-notification.error {
  background-color: #ef4444;
  color: white;
}

.toast-notification.info {
  background-color: #3b82f6;
  color: white;
}

.toast-notification-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-notification-message {
  flex: 1;
  line-height: 1.5;
}

.container-nav {
  justify-content: center;
}

/* Mobile Styles (below 767px) */
@media (max-width: 767px) {
  /* Text size for mobile */
  .announcement-text {
    font-size: 16px;
  }

  /* Mobile header layout - stacked rows */
  .mobile-header-container {
    display: flex;
    flex-direction: column;
  }

  /* Logo row - keep original size */
  .mobile-logo-row {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0;
  }

  /* Icons row - centered with responsive gaps */
  .mobile-icons-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
  }

  .mobile-icons-group {
    display: flex;
    align-items: center;
    gap: clamp(8px, 3vw, 15px);
  }

  .mobile-hamburger {
    flex-shrink: 0;
    margin-left: 16px;
  }

  /* Hide desktop layout on mobile - with higher specificity */
  .desktop-header-layout {
    display: none !important;
  }

  /* Hide navigation menu on mobile by default */
  .mobile-nav {
    display: none;
  }

  /* Show navigation menu when active */
  .mobile-nav.active {
    display: block;
  }

  /* Mobile navigation styling */
  .mobile-nav ul {
    flex-direction: column !important;
  }

  .icon-button img {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
  }

  /* Ensure wishlist icons are exactly the same size on mobile */
  .wishlist-icon {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
  }

  /* Mobile heart fill animation container */
  .wishlist-icon-container {
    width: 28px;
    height: 28px;
    position: relative;
    overflow: hidden;
  }

  /* Mobile base empty heart */
  .wishlist-icon-empty {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
  }

  /* Mobile filled heart with animation */
  .wishlist-icon-filled {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s ease-in-out;
  }

  /* Mobile filled heart when wishlist has items */
  .wishlist-icon-container.has-items .wishlist-icon-filled {
    opacity: 1;
    transform: scale(1);
  }

  .mobile-hamburger {
    padding: 8px !important;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
  }

  .mobile-hamburger img {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
  }

  .nav-link {
    padding: 0.25rem;
  }
}

/* Desktop Styles (above 767px) */
@media (min-width: 768px) {
  .mobile-header-container {
    display: none;
  }

  /* On desktop, arrow button is visual only - hover handles interaction */
  .dropdown-arrow-toggle {
    pointer-events: none;
    cursor: default;
  }
}

.child-nav-item {
  border-bottom: none;
}

/* Navigation Dropdown Styles */
.nav-item-has-dropdown {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  font-size: 1.25rem;
  position: relative;
}

.dropdown-arrow-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-background);
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  min-width: 220px;
  padding: 0.5rem 0;
  margin: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.nav-item-has-dropdown:hover > .dropdown-menu:not(.nested-dropdown) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item-has-dropdown:hover .dropdown-arrow {
  transform: rotate(90deg);
}

.dropdown-menu li {
  padding: 0;
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.25rem 2rem;
  color: #1a1a1a;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

/* Mobile dropdown styles - Accordion functionality */
@media (max-width: 767px) {
  .dropdown-menu {
    position: static;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    padding: 0;
    margin: 0;
    transform: none;
    border: none;
    box-shadow: none;
    background: transparent;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
  }

  .dropdown-menu.active {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    padding: 0.25rem 0;
  }

  .nav-item-has-dropdown {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 0.5rem 1rem;
    flex: 1;
  }

  .dropdown-arrow-toggle {
    padding: 0.5rem 1rem;
    margin-right: 0;
  }

  .dropdown-arrow {
    transition: transform 0.3s ease;
  }

  .nav-item-has-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
  }
}

/******************** End of Header Styles ********************/
