/**
 * Irmanha Header Module Styles
 *
 * Two-bar header with full-width backgrounds and centered content containers
 * 
 * IMPORTANT: This CSS uses high specificity selectors (body, .woocommerce) 
 * to override WooCommerce and theme styles. If styles aren't applying:
 * 1. Clear SiteGround cache (SG Optimizer > Purge SG Cache)
 * 2. Hard refresh browser (Ctrl+Shift+R / Cmd+Shift+R)
 * 3. Check browser console for CSS loading errors
 */

/* CSS Custom Properties for dynamic colors - defined inline via PHP */

/* Color variables for consistent theming */
:root {
  --irmanha-text-black: #010101;
  --irmanha-hover-beige: #b29f90;
  --irmanha-text-gray: #666;
  --irmanha-black-solid: #000000;
  --cart-image-size: 50px;
  --cart-icon-size: var(--irmanha-icon-cart);
}

.irmanha-header {
  width: 100%;
  position: relative;
}

/* Builder-specific styles */
.fl-builder-edit .irmanha-header__topbar,
.fl-builder-edit .irmanha-header__main {
  display: flex;
  align-items: center;
}

/* Keep background colors visible in builder */
.fl-builder-edit .irmanha-header__topbar {
  background-color: var(--irmanha-black);
  padding: var(--irmanha-space-2, 8px) 0;
}

.fl-builder-edit .irmanha-header__main {
  background-color: var(--irmanha-beige);
  padding: var(--irmanha-space-2, 8px) 0;
  min-height: 100px; /* Same height as frontend */
}

/* Ensure containers stay centered in builder */
.fl-builder-edit .irmanha-header__topbar-container,
.fl-builder-edit .irmanha-header__main-container {
  margin: 0 auto; /* Always center containers */
  width: 100%;
  max-width: 1300px; /* Same max-width as frontend */
}

/* Builder-specific topbar section alignment */
.fl-builder-edit .irmanha-header__topbar-left,
.fl-builder-edit .irmanha-header__topbar-center,
.fl-builder-edit .irmanha-header__topbar-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.fl-builder-edit .irmanha-header__topbar-left {
  justify-content: flex-start;
}

.fl-builder-edit .irmanha-header__topbar-center {
  justify-content: center;
}

.fl-builder-edit .irmanha-header__topbar-right {
  justify-content: flex-end;
}

/* ===== TOP BAR ===== */
.irmanha-header__topbar {
  width: 100%;
  background-color: var(--irmanha-black);
  position: relative;
  box-sizing: border-box;
}

.irmanha-header__topbar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--irmanha-space-4, 16px) var(--irmanha-space-6, 24px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--irmanha-space-4, 16px);
  width: 100%;
  box-sizing: border-box;
}

.irmanha-header__topbar-left,
.irmanha-header__topbar-center,
.irmanha-header__topbar-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.irmanha-header__topbar-left {
  justify-content: flex-start;
}

.irmanha-header__topbar-center {
  justify-content: center;
}

.irmanha-header__topbar-right {
  justify-content: flex-end;
}

.irmanha-header__topbar-text {
  color: var(--irmanha-white);
  font-size: var(--irmanha-body, 16px);
  font-style: italic;
  margin: 0 !important;
  padding: 0;
  text-align: center;
  white-space: nowrap;
  line-height: normal;
  display: inline-block;
  vertical-align: middle;
}

/* Desktop topbar layout */
.irmanha-header__topbar-desktop {
  display: flex;
  width: 100%;
}

/* Mobile infinite scroll layout - hidden by default */
.irmanha-header__topbar-mobile {
  display: none;
}

.irmanha-header__topbar-scroll {
  overflow: hidden;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.irmanha-header__topbar-scroll-wrapper {
  display: inline-flex;
  align-items: center;
  gap: var(--irmanha-space-4);
  animation: scroll-infinite 30s linear infinite;
  will-change: transform;
  width: fit-content;
  line-height: 1;
}

.irmanha-header__topbar-scroll-item {
  display: inline-flex;
  align-items: center;
  gap: var(--irmanha-space-4);
  flex-shrink: 0;
  line-height: 1;
}

.irmanha-header__topbar-separator {
  color: var(--irmanha-beige);
  opacity: 0.8;
}

@keyframes scroll-infinite {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===== MAIN HEADER ===== */
.irmanha-header__main {
  width: 100%;
  min-height: 80px;
  background-color: var(--irmanha-beige);
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center; /* Ensure vertical centering of content */
}

.irmanha-header__main-container {
  max-width: 1300px;
  margin: 0 auto; /* Always center the container */
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--irmanha-space-6, 24px);
  width: 100%;
  box-sizing: border-box;
}

/* ===== LEFT NAVIGATION ===== */
.irmanha-header__nav-left {
  display: flex;
  align-items: center;
  gap: var(--irmanha-space-8);
  flex: 1;
}

.irmanha-header__menu-item {
  display: flex;
  align-items: center;
}

.irmanha-header__nav {
  display: flex;
  align-items: center;
}

.irmanha-header__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--irmanha-space-32);
}

.irmanha-header__menu li {
  margin: 0;
  padding: 0;
}

.irmanha-header__menu a {
  color: var(--irmanha-text-black);
  font-size: var(--irmanha-h3, 20px);
  font-weight: var(--irmanha-font-weight-normal, 400);
  margin: 0;
  transition: var(--irmanha-transition-fast);
  text-decoration: none;
  display: block;
  padding: var(--irmanha-space-2) var(--irmanha-space-5);
  background-color: transparent !important;
}

/* Menu items in nav-left: maximum 18px font size */
.irmanha-header__nav-left .irmanha-header__menu a {
  font-size: 18px;
}

.irmanha-header__menu a:hover,
.irmanha-header__menu a:focus {
  color: var(--irmanha-hover-beige);
  background-color: transparent !important;
}

.irmanha-header__menu a[aria-current="page"] {
  background-color: transparent !important;
}

.irmanha-header__menu a[aria-current="page"]:hover,
.irmanha-header__menu a[aria-current="page"]:focus {
  color: var(--irmanha-hover-beige);
  background-color: transparent !important;
}

.irmanha-header__menu a[aria-current="page"] {
  background-color: transparent !important;
}

.irmanha-header__menu a[aria-current="page"]:hover,
.irmanha-header__menu a[aria-current="page"]:focus {
  color: var(--irmanha-hover-beige);
  background-color: transparent !important;
}

/* ===== CENTER LOGO ===== */
.irmanha-header__logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
}

.irmanha-header__logo-link {
  display: block;
  transition: var(--irmanha-transition-fast);
}

.irmanha-header__logo-link:hover,
.irmanha-header__logo-link:focus {
  opacity: 0.8;
  filter: sepia(0.3) hue-rotate(30deg) saturate(0.8);
}

.irmanha-header__logo-img {
  max-height: 40px;
  width: auto;
  display: block;
}

/* ===== RIGHT CART ===== */
.irmanha-header__cart {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 1;
  position: relative;
}

/* ===== HAMBURGER MENU ===== */
.irmanha-header__hamburger {
  display: none; /* Hidden by default, shown on mobile */
  align-items: center;
}

.irmanha-header__hamburger-btn {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  padding: var(--irmanha-space-3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  outline: none !important;
  box-shadow: none !important;
}

.irmanha-header__hamburger-line {
  width: var(--irmanha-icon-cart);
  height: 2px;
  background-color: var(--irmanha-hamburger-color);
}

/* ===== MOBILE FULL-SCREEN MENU ===== */
/* Simplified selector pattern - covers most common cases while maintaining specificity */
.irmanha-header__mobile-menu,
.irmanha-header__mobile-menu[role="dialog"],
.irmanha-header__mobile-menu[aria-modal="true"],
div.irmanha-header__mobile-menu,
[role="dialog"].irmanha-header__mobile-menu,
[aria-modal="true"].irmanha-header__mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--irmanha-beige);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--irmanha-transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

.irmanha-header__mobile-menu[aria-hidden="false"],
.irmanha-header__mobile-menu[aria-hidden="false"][role="dialog"],
div.irmanha-header__mobile-menu[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.irmanha-header__mobile-menu:focus,
.irmanha-header__mobile-menu:focus-visible,
.irmanha-header__mobile-menu:active,
.irmanha-header__mobile-menu[role="dialog"]:focus,
.irmanha-header__mobile-menu[role="dialog"]:focus-visible,
.irmanha-header__mobile-menu[role="dialog"]:active {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

.irmanha-header__mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--irmanha-space-8);
  width: 100%;
  max-width: 400px;
  padding: var(--irmanha-space-8);
}

.irmanha-header__mobile-menu-close {
  position: fixed;
  top: 20px;
  left: 20px;
  background: none;
  border: none;
  color: var(--irmanha-black-solid);
  cursor: pointer;
  padding: 8px;
  z-index: 10001;
  transition: opacity 0.2s ease;
  /* Voorkom dat het ooit door flex wordt beïnvloed */
  align-self: auto !important;
  margin: 0 !important;
}

.irmanha-header__mobile-menu-close:hover,
.irmanha-header__mobile-menu-close:focus {
  opacity: 0.7;
}

/* Verberg de close button direct zodra het menu sluit */
.irmanha-header__mobile-menu[aria-hidden="true"] .irmanha-header__mobile-menu-close {
  display: none !important;
}

.irmanha-header__mobile-menu-logo {
  margin-bottom: var(--irmanha-space-6);
}

.irmanha-header__mobile-menu-logo-link {
  display: block;
  transition: var(--irmanha-transition-fast);
}

.irmanha-header__mobile-menu-logo-link:hover,
.irmanha-header__mobile-menu-logo-link:focus {
  opacity: 0.8;
  filter: sepia(0.3) hue-rotate(30deg) saturate(0.8);
}

.irmanha-header__mobile-menu-logo-img {
  max-height: 60px;
  width: auto;
  display: block;
}

.irmanha-header__mobile-nav {
  width: 100%;
}

.irmanha-header__mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--irmanha-space-6);
}

.irmanha-header__mobile-menu-list li {
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
}

.irmanha-header__mobile-menu-list a {
  color: var(--irmanha-mobile-text-color);
  text-decoration: none;
  font-size: var(--irmanha-h2, 32px);
  font-weight: var(--irmanha-font-weight-normal, 400);
  padding: var(--irmanha-space-3);
  display: block;
  transition: var(--irmanha-transition-fast);
  border-radius: var(--irmanha-radius-md);
}

.irmanha-header__mobile-menu-list a:hover,
.irmanha-header__mobile-menu-list a:focus {
  background-color: var(--irmanha-hover-beige);
  color: var(--irmanha-black);
}

.irmanha-header__mobile-menu-link-text {
  display: block;
}

/* Social Icons in Mobile Menu */
.irmanha-header__mobile-social {
  margin-top: var(--irmanha-space-6);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--irmanha-space-4);
}

.irmanha-header__mobile-social a {
  color: var(--irmanha-black);
  font-size: 30px;
  text-decoration: none;
  transition: var(--irmanha-transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

.irmanha-header__mobile-social a:hover,
.irmanha-header__mobile-social a:focus {
  color: var(--irmanha-black);
  opacity: 0.7;
}

.irmanha-header__mobile-social i {
  font-size: 30px;
  color: var(--irmanha-black);
}

/* Body scroll lock when mobile menu is open */
.irmanha-mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.irmanha-header__cart-link,
.irmanha-header__cart-toggle {
  display: flex;
  align-items: center;
  gap: var(--irmanha-space-2);
  color: var(--irmanha-black);
  text-decoration: none;
  padding: var(--irmanha-space-3);
  border-radius: var(--irmanha-radius-md);
  transition: var(--irmanha-transition-fast);
  position: relative;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  font-family: inherit;
}

.irmanha-header__cart-link:hover,
.irmanha-header__cart-link:focus,
.irmanha-header__cart-link:focus-visible,
.irmanha-header__cart-toggle:hover,
.irmanha-header__cart-toggle:focus,
.irmanha-header__cart-toggle:focus-visible {
  color: var(--irmanha-hover-beige);
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.irmanha-header__cart-link:hover .irmanha-header__cart-icon,
.irmanha-header__cart-link:focus .irmanha-header__cart-icon,
.irmanha-header__cart-link:focus-visible .irmanha-header__cart-icon,
.irmanha-header__cart-toggle:hover .irmanha-header__cart-icon,
.irmanha-header__cart-toggle:focus .irmanha-header__cart-icon,
.irmanha-header__cart-toggle:focus-visible .irmanha-header__cart-icon {
  color: var(--irmanha-hover-beige);
}

.irmanha-header__cart-icon {
    width: var(--irmanha-icon-cart);
    height: var(--irmanha-icon-cart);
    display: block;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
}

/* FontAwesome cart icon sizing */
.irmanha-header__cart-icon.fas,
.irmanha-header__cart-icon.far,
.irmanha-header__cart-icon.fab,
.irmanha-header__cart-icon.fa {
    font-size: var(--irmanha-icon-cart);
    width: var(--irmanha-icon-cart);
    height: var(--irmanha-icon-cart);
    line-height: var(--irmanha-icon-cart);
    display: inline-block;
    text-align: center;
}

.irmanha-header__cart-count {
  background-color: var(--irmanha-white);
  color: var(--irmanha-black);
  font-size: var(--irmanha-body-sm);
  font-weight: var(--irmanha-font-weight-bold);
  line-height: 1;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: var(--irmanha-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: absolute;
  top: -2px;
  right: -2px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Ensure perfect centering on desktop */
@media (min-width: 769px) {
  .irmanha-header__cart-count {
    transform: translateX(0.5px); /* Slight adjustment to shift text slightly to the right */
  }
}

/* ===== CART DROPDOWN ===== */
.irmanha-header__cart-slide-out {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 400px;
  max-width: 90vw;
  background-color: var(--irmanha-white);
  border: 1px solid var(--irmanha-grey);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--irmanha-transition-base), visibility var(--irmanha-transition-base), transform var(--irmanha-transition-base);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: var(--irmanha-space-4);
  overflow-y: auto;
  border-radius: var(--irmanha-radius-md);
  margin: 0;
}

.irmanha-header__cart-slide-out[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.irmanha-header__cart-slide-out-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--irmanha-space-4);
  padding-bottom: var(--irmanha-space-3);
  border-bottom: 1px solid var(--irmanha-grey);
  position: relative;
}

.irmanha-header__cart-slide-out-title {
  margin: 0;
  font-size: var(--irmanha-h4);
  font-weight: var(--irmanha-font-weight-semibold);
  color: var(--irmanha-black);
}

.irmanha-header__cart-slide-out-close {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  color: var(--irmanha-black);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: var(--irmanha-transition-fast);
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  position: relative !important;
  outline: none !important;
  box-shadow: none !important;
}

.irmanha-header__cart-slide-out-close:hover,
.irmanha-header__cart-slide-out-close:focus,
.irmanha-header__cart-slide-out-close:focus-visible {
  color: var(--irmanha-hover-beige);
}

.irmanha-header__cart-close-icon {
  position: relative !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.irmanha-header__cart-close-icon::before,
.irmanha-header__cart-close-icon::after {
  content: '';
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 16px !important;
  height: 2px !important;
  background-color: var(--irmanha-black);
  transform-origin: center;
  transition: background-color var(--irmanha-transition-fast);
  margin: 0 !important;
  padding: 0 !important;
}

.irmanha-header__cart-close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.irmanha-header__cart-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.irmanha-header__cart-slide-out-close:hover .irmanha-header__cart-close-icon::before,
.irmanha-header__cart-slide-out-close:hover .irmanha-header__cart-close-icon::after,
.irmanha-header__cart-slide-out-close:focus .irmanha-header__cart-close-icon::before,
.irmanha-header__cart-slide-out-close:focus .irmanha-header__cart-close-icon::after,
.irmanha-header__cart-slide-out-close:focus-visible .irmanha-header__cart-close-icon::before,
.irmanha-header__cart-slide-out-close:focus-visible .irmanha-header__cart-close-icon::after {
  background-color: var(--irmanha-hover-beige);
}

.irmanha-header__cart-slide-out-content {
  flex: 1;
  overflow-y: auto;
  min-height: 100px;
  max-height: 60vh;
}

.irmanha-header__cart-slide-out-loading,
.irmanha-header__cart-slide-out-empty {
  display: none;
  text-align: center;
  padding: var(--irmanha-space-8);
  color: var(--irmanha-black);
}

.irmanha-header__cart-slide-out-loading.active,
.irmanha-header__cart-slide-out-empty.active {
  display: block;
}

.irmanha-header__cart-slide-out-items {
  display: none;
}

.irmanha-header__cart-slide-out-items.active {
  display: block;
}

/* High specificity selectors to override WooCommerce and theme styles
 * Pattern: body/.woocommerce + slide-out-item/dropdown-item for maximum specificity
 * Note: Both class variants are needed as JS may use either naming convention
 */
body .irmanha-header__cart-slide-out-item,
body .irmanha-header__cart-dropdown-item,
.woocommerce .irmanha-header__cart-slide-out-item,
.woocommerce .irmanha-header__cart-dropdown-item {
  display: flex !important;
  gap: var(--irmanha-space-3) !important;
  padding: var(--irmanha-space-4) 0 !important;
  border-bottom: 1px solid var(--irmanha-grey) !important;
  align-items: flex-start !important;
  position: relative !important;
  flex-direction: row !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body .irmanha-header__cart-slide-out-item:last-child,
body .irmanha-header__cart-dropdown-item:last-child,
.woocommerce .irmanha-header__cart-slide-out-item:last-child,
.woocommerce .irmanha-header__cart-dropdown-item:last-child {
  border-bottom: none !important;
}

body .irmanha-header__cart-slide-out-item-image-wrapper,
body .irmanha-header__cart-dropdown-item-image-wrapper,
.woocommerce .irmanha-header__cart-slide-out-item-image-wrapper,
.woocommerce .irmanha-header__cart-dropdown-item-image-wrapper {
  flex-shrink: 0 !important;
  width: var(--cart-image-size) !important;
  height: var(--cart-image-size) !important;
  min-width: var(--cart-image-size) !important;
  min-height: var(--cart-image-size) !important;
  max-width: var(--cart-image-size) !important;
  max-height: var(--cart-image-size) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .irmanha-header__cart-slide-out-item-image-wrapper img,
body .irmanha-header__cart-dropdown-item-image-wrapper img,
body .irmanha-header__cart-dropdown-item-image-wrapper .attachment-thumbnail,
.woocommerce .irmanha-header__cart-slide-out-item-image-wrapper img,
.woocommerce .irmanha-header__cart-dropdown-item-image-wrapper img,
.woocommerce .irmanha-header__cart-dropdown-item-image-wrapper .attachment-thumbnail,
.irmanha-header__cart-slide-out-item-image-wrapper .attachment-thumbnail img,
.irmanha-header__cart-dropdown-item-image-wrapper .attachment-thumbnail img {
  width: var(--cart-image-size) !important;
  height: var(--cart-image-size) !important;
  min-width: var(--cart-image-size) !important;
  min-height: var(--cart-image-size) !important;
  max-width: var(--cart-image-size) !important;
  max-height: var(--cart-image-size) !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

body .irmanha-header__cart-slide-out-item-details,
body .irmanha-header__cart-dropdown-item-details,
.woocommerce .irmanha-header__cart-slide-out-item-details,
.woocommerce .irmanha-header__cart-dropdown-item-details {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--irmanha-space-1) !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

body .irmanha-header__cart-slide-out-item-name,
body .irmanha-header__cart-dropdown-item-name,
body .irmanha-header__cart-slide-out-item-name h4,
body .irmanha-header__cart-dropdown-item-name h4,
.woocommerce .irmanha-header__cart-slide-out-item-name,
.woocommerce .irmanha-header__cart-dropdown-item-name {
  font-size: var(--irmanha-body) !important;
  font-weight: var(--irmanha-font-weight-medium) !important;
  color: var(--irmanha-black) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  display: block !important;
}

body .irmanha-header__cart-slide-out-item-info,
body .irmanha-header__cart-dropdown-item-info,
.woocommerce .irmanha-header__cart-slide-out-item-info,
.woocommerce .irmanha-header__cart-dropdown-item-info {
  display: flex !important;
  align-items: center !important;
  gap: var(--irmanha-space-2) !important;
  font-size: var(--irmanha-body) !important;
  color: var(--irmanha-text-gray) !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: wrap !important;
}

/* Shared styles for cart item text elements */
body .irmanha-header__cart-slide-out-item-size,
body .irmanha-header__cart-dropdown-item-size,
body .irmanha-header__cart-slide-out-item-quantity,
body .irmanha-header__cart-dropdown-item-quantity,
body .irmanha-header__cart-slide-out-separator,
body .irmanha-header__cart-dropdown-separator,
.woocommerce .irmanha-header__cart-slide-out-item-size,
.woocommerce .irmanha-header__cart-dropdown-item-size,
.woocommerce .irmanha-header__cart-slide-out-item-quantity,
.woocommerce .irmanha-header__cart-dropdown-item-quantity,
.woocommerce .irmanha-header__cart-slide-out-separator,
.woocommerce .irmanha-header__cart-dropdown-separator {
  color: var(--irmanha-text-gray) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
}

body .irmanha-header__cart-slide-out-separator,
body .irmanha-header__cart-dropdown-separator,
.woocommerce .irmanha-header__cart-slide-out-separator,
.woocommerce .irmanha-header__cart-dropdown-separator {
  opacity: 0.5 !important;
}

body .irmanha-header__cart-slide-out-item-subtotal,
body .irmanha-header__cart-dropdown-item-subtotal,
.woocommerce .irmanha-header__cart-slide-out-item-subtotal,
.woocommerce .irmanha-header__cart-dropdown-item-subtotal {
  font-size: var(--irmanha-body) !important;
  font-weight: var(--irmanha-font-weight-semibold) !important;
  color: var(--irmanha-black) !important;
  margin-top: var(--irmanha-space-1) !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Smaller font sizes on larger desktop screens */
@media (min-width: 1200px) {
  body .irmanha-header__cart-slide-out-item-info,
  body .irmanha-header__cart-dropdown-item-info,
  .woocommerce .irmanha-header__cart-slide-out-item-info,
  .woocommerce .irmanha-header__cart-dropdown-item-info {
    font-size: calc(var(--irmanha-body) * 0.9) !important;
  }

  body .irmanha-header__cart-slide-out-item-subtotal,
  body .irmanha-header__cart-dropdown-item-subtotal,
  .woocommerce .irmanha-header__cart-slide-out-item-subtotal,
  .woocommerce .irmanha-header__cart-dropdown-item-subtotal {
    font-size: calc(var(--irmanha-body) * 0.9) !important;
  }
}

/* Cart Dropdown Footer */
.irmanha-header__cart-slide-out-footer {
  margin-top: var(--irmanha-space-4);
  padding-top: var(--irmanha-space-4);
  border-top: 1px solid var(--irmanha-grey);
}

.irmanha-header__cart-totals {
  margin-bottom: var(--irmanha-space-4);
}

.irmanha-header__cart-totals .cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--irmanha-font-weight-bold);
  font-size: var(--irmanha-h4);
  padding-top: var(--irmanha-space-1);
  margin-top: var(--irmanha-space-1);
  margin-bottom: var(--irmanha-space-6);
}

.irmanha-header__cart-view-button {
  display: block;
  width: 100%;
  padding: var(--irmanha-space-4);
  background-color: var(--irmanha-black);
  color: var(--irmanha-white);
  text-align: center;
  text-decoration: none;
  font-weight: var(--irmanha-font-weight-medium);
  border-radius: 0;
  transition: var(--irmanha-transition-fast);
  border: none;
}

.irmanha-header__cart-view-button:hover,
.irmanha-header__cart-view-button:focus {
  background-color: var(--irmanha-beige);
  color: var(--irmanha-black);
}

/* ===== RESPONSIVE BEHAVIOR ===== */
@media (max-width: 1024px) {
  .irmanha-header__topbar-container {
    gap: var(--irmanha-space-2, 8px);
  }

  .irmanha-header__menu {
    gap: var(--irmanha-space-6, 24px);
  }
}

@media (max-width: 900px) {
  .irmanha-header__topbar-container {
    gap: var(--irmanha-space-1, 4px);
  }
  
  .irmanha-header__menu {
    gap: var(--irmanha-space-4, 16px);
  }
}

@media (max-width: 768px) {
  /* Make header stick to top on mobile */
  .irmanha-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .irmanha-header__topbar-container {
    padding: var(--irmanha-space-3, 12px) 0; /* Remove horizontal padding for full-width scroll */
    overflow: hidden;
  }

  /* Hide desktop layout on mobile */
  .irmanha-header__topbar-desktop {
    display: none !important;
  }

  /* Hide desktop sections individually */
  .irmanha-header__topbar-left,
  .irmanha-header__topbar-center,
  .irmanha-header__topbar-right {
    display: none !important;
  }

  /* Show mobile infinite scroll layout */
  .irmanha-header__topbar-mobile {
    display: block !important;
    width: 100%;
  }

  .irmanha-header__topbar-text {
    margin-bottom: 0px !important;
    font-size: var(--irmanha-text-mobile-lg);
    white-space: nowrap;
    text-align: center;
  }

  /* Mobile header layout: Hamburger | Logo | Cart */
  .irmanha-header__main-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--irmanha-space-4) var(--irmanha-space-5);
    gap: var(--irmanha-space-4);
  }

  .irmanha-header__hamburger {
    display: flex;
    order: 1;
    flex: 0 0 auto;
    border: none !important;
  }

  .irmanha-header__nav-left {
    display: none; /* Hide desktop navigation on mobile */
  }

  .irmanha-header__logo {
    order: 2;
    flex: 1;
    text-align: center;
  }

  .irmanha-header__cart {
    order: 3;
    flex: 0 0 auto;
  }

  .irmanha-header__menu {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--irmanha-space-4);
  }

  .irmanha-header__menu a {
    font-size: var(--irmanha-text-mobile-lg);
  }
}

@media (max-width: 490px) {
  .irmanha-header__topbar-container {
    gap: var(--irmanha-space-2, 8px);
  }
  
  .irmanha-header__nav-left {
    gap: var(--irmanha-space-2);
  }
  
  .irmanha-header__menu {
    gap: var(--irmanha-space-2);
  }
  
  .irmanha-header__logo-img {
    max-height: 40px;
  }

  /* Cart dropdown on mobile */
  .irmanha-header__cart-slide-out {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    transform: translateY(-10px);
    margin: 0;
  }

  .irmanha-header__cart-slide-out[aria-hidden="false"] {
    transform: translateY(0);
  }
}
/* ===== ADDITIONAL SPECIFICITY FOR AJAX-LOADED CONTENT ===== */
/* These rules ensure styles apply even when cart items are loaded via AJAX */
.irmanha-header__cart-slide-out-items.active .irmanha-header__cart-slide-out-item,
.irmanha-header__cart-slide-out-items.active .irmanha-header__cart-dropdown-item {
  display: flex !important;
}

/* Override any WooCommerce mini-cart styles that might interfere */
.irmanha-header__cart-slide-out .woocommerce-mini-cart-item,
.irmanha-header__cart-slide-out .woocommerce-mini-cart-item * {
  all: unset;
}

.irmanha-header__cart-slide-out .irmanha-header__cart-slide-out-item,
.irmanha-header__cart-slide-out .irmanha-header__cart-dropdown-item {
  all: revert;
}
