/* Chevron icon color variables for dark/light mode compatibility */
:root {
  --chevron-color: #ffffff; /* Default white for dark theme */
}

[data-theme="light"] {
  --chevron-color: #0d0d0d; /* Black for light theme */
}

[data-theme="light"] .mobile-menu .menu-item-has-children > a::after {
  content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%230d0d0d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="light"] .mobile-menu--tertiary .menu-item-has-children > a::after {
  content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%230d0d0d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --chevron-color: #0d0d0d; /* Black for light theme */
  }

  :root:not([data-theme="dark"])
    .mobile-menu
    .menu-item-has-children
    > a::after {
    content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%230d0d0d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  :root:not([data-theme="dark"])
    .mobile-menu--tertiary
    .menu-item-has-children
    > a::after {
    content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%230d0d0d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--headerBackground);
  z-index: var(--z-dropdown);
  padding: 12px 0;
  transition: background-color 0.2s ease;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
  gap: 16px;
}

.header-center {
  justify-content: center;
}

.header-right {
  justify-content: flex-end;
  gap: 20px;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.site-header .menu a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header .menu a:hover {
  opacity: 0.85;
}

/* Menu Badge Styles */
.menu-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: top;
  line-height: 1.2;
}

.menu-badge--new {
  position: relative;
  top: -2px;
}

/* Mobile-specific badge adjustments */
@media (max-width: 1024px) {
  .menu-badge {
    font-size: 9px;
    padding: 1px 4px;
    margin-left: 4px;
  }

  .menu-badge--new {
    top: -1px;
  }
}

/* Hide desktop submenus - keep mobile functionality */
@media (min-width: 1025px) {
  .menu--primary .sub-menu {
    display: none;
  }

  .menu--secondary .sub-menu {
    display: none;
  }
}

/* Tertiary menu specific styles */
.tertiary-nav {
  margin-right: 20px;
}

.menu--tertiary {
  gap: 16px;
}

.menu--tertiary a {
  font-size: 13px;
  font-weight: 600;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
}

.site-brand .brand-symbol {
  display: none;
  width: 28px;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -14px;
  margin-top: -15px;
}

.site-brand .custom-logo {
  max-height: 32px;
  width: auto;
}

.site-brand .brand-logo {
  width: 160px;
  height: auto;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-transform: uppercase;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  width: 22px;
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  /* Ensure proper visibility on all devices */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Header Back Button */
.header-back-button {
  display: none;
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.header-back-button .back-button-icon {
  width: 22px;
  display: block;
  filter: brightness(0) invert(1); /* Makes the SVG white */
}

/* Hide back button on desktop - only show on mobile */
@media (min-width: 1025px) {
  .header-back-button {
    display: none !important;
  }
}

/* Show back button on single product pages on mobile only, hide hamburger */
@media (max-width: 1024px) {
  body.single-product .header-back-button {
    display: block !important;
    margin-right: 9px;
  }

  body.single-product .hamburger {
    display: none !important;
  }
}

.hamburger-icon {
  display: block;
  filter: brightness(0) invert(1); /* Makes the SVG white */
  transition: transform 0.3s ease;
}

/* Search Toggle Button */
.search-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.search-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Show search toggle on mobile, but hide on single product pages */
@media (max-width: 1024px) {
  .search-toggle--mobile {
    display: block;
  }

  /* Hide search icon on single product pages on mobile */
  body.single-product .search-toggle--mobile {
    display: none;
  }
}

/* Hide search toggle on desktop (will use menu item instead) */
@media (min-width: 1025px) {
  .search-toggle--mobile {
    display: none;
  }
}

/* Search Overlay */
.search-overlay-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--z-dropdown);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.2s, opacity 0.2s ease;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  color: #000;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
}

/* Search Panel Header */
.search-panel-header {
  padding: 20px 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: #666;
  z-index: 2;
}

.search-back {
  background: transparent;
  border: 0;
  color: #666;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-back-icon {
  width: 20px;
  height: 20px;
  display: block;
  filter: invert(1); /* Invert for light mode */
}

.search-input {
  width: 100%;
  padding: 10px 10px 10px 48px;
  border: 1px solid #e5e5e5;
  font-size: 16px;
  background: #fff;
  color: #000;
  outline: none;
  transition: border-color 0.2s ease, padding-right 0.2s ease;
}

.search-input:focus {
  border-color: #000;
}

/* Add right padding when clear button is visible */
.search-input-container.has-clear .search-input {
  padding-right: 40px;
}

.search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: 0;
  color: #666;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.search-clear:hover {
  opacity: 1;
}

.search-clear svg {
  width: 16px;
  height: 16px;
  display: block;
}

.search-close {
  position: absolute;
  right: 16px;
  background: transparent;
  border: 0;
  color: #666;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-basis: 100%;
}

.search-results-count {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.search-view-all {
  font-size: 14px;
  color: #000;
  text-decoration: none;
  font-weight: 500;
}

.search-view-all:hover {
  text-decoration: underline;
}

/* Search Panel Content */
.search-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 20px;
}

/* Suggestions Row (Trending + Recently Viewed) */
.search-suggestions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

/* Search Results */
.search-results {
  display: none;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  row-gap: 28px;
  margin-top: 20px;
}

/* Search products grid styling */
.search-products {
  gap: 70px 20px !important;
}

.search-result-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.search-result-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.search-result-item:hover .search-result-image img {
  transform: scale(1.05);
}

.search-result-content {
  padding: 16px;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #000;
  line-height: 1.3;
}

.search-result-price {
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

/* Search Loading State */
.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #666;
}

.search-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e5e5;
  border-top: 3px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Search No Results */
.search-no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #666;
  text-align: center;
}

.search-no-results p {
  margin: 0;
  font-size: 16px;
}

/* Trending Searches */
.trending-searches {
  margin-bottom: 24px;
  padding: 30px 0 20px 0;
  border-bottom: none;
  display: none; /* Hidden by default, shown only when there are trending searches */
}

.trending-searches-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.trending-icon {
  color: #666;
  flex-shrink: 0;
}

.trending-searches-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d0d0d;
  margin: 0;
}

.trending-searches-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.trending-searches-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.trending-search-item {
  background: #f5f5f5;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #0d0d0d;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.trending-search-item:hover {
  background: #e5e5e5;
}

.trending-search-item:active {
  background: #d5d5d5;
}

/* Recently Viewed */
.recently-viewed {
  min-width: 260px;
  padding: 25px 0 0;
}

.recently-viewed-header {
  display: flex;
  align-items: center;
  justify-content: start;
  margin-bottom: 12px;
  gap: 12px;
}

.recently-viewed-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d0d0d;
  margin: 0;
}

.recently-viewed-clear {
  background: #f5f5f5;
  border: 0;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0d0d0d;
  cursor: pointer;
}

.recently-viewed-clear:hover {
  background: #e5e5e5;
}

.recently-viewed-list {
  display: flex;
  gap: 8px;
}

.recently-viewed-item {
  display: block;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  background: #f5f5f5;
}

.recently-viewed-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark Mode Support for Trending Searches */
@media (prefers-color-scheme: dark) {
  .trending-icon {
    color: #999;
  }

  .trending-searches-title {
    color: #fff;
  }

  .trending-search-item {
    background: #333;
    color: #fff;
  }

  .trending-search-item:hover {
    background: #444;
  }

  .trending-search-item:active {
    background: #555;
  }

  .recently-viewed-title {
    color: #fff;
  }
  .recently-viewed-clear {
    background: #333;
    color: #fff;
  }
  .recently-viewed-clear:hover {
    background: #444;
  }
  .recently-viewed-item {
    border-color: #333;
    background: #222;
  }
}

/* Mobile Trending Searches */
@media (max-width: 1024px) {
  .search-suggestions {
    display: block;
  }

  .trending-searches {
    margin-bottom: 20px;
    padding: 30px 0 16px 0;
  }

  .trending-searches-header {
    margin-bottom: 12px;
  }

  .trending-searches-title {
    font-size: 13px;
  }

  .trending-search-item {
    font-size: 13px;
    padding: 6px 12px;
  }

  .recently-viewed {
    margin-top: 8px;
    padding: 0;
  }
}

/* Search States */
.search-open .search-overlay-wrap {
  visibility: visible;
  opacity: 1;
}

.search-open .search-overlay {
  opacity: 1;
  visibility: visible;
}

.search-open .search-panel {
  transform: translateY(0);
}

/* Desktop Search Styles */
@media (min-width: 1025px) {
  .search-panel {
    min-width: 1000px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }

  .search-open .search-panel {
    transform: translateX(-50%) translateY(0);
  }

  .search-results-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
    row-gap: 40px;
  }

  .search-result-image {
    height: 240px;
  }

  .search-result-title {
    font-size: 16px;
  }

  .search-result-price {
    font-size: 16px;
  }
}

/* Mobile Search Styles */
@media (max-width: 1024px) {
  .search-panel {
    height: 100vh;
  }

  .search-results-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    row-gap: 32px;
  }

  .search-result-image {
    height: 180px;
  }
}

/* Dark Mode Support for Search */
@media (prefers-color-scheme: dark) {
  .search-panel {
    background: #1a1a1a;
    color: #fff;
  }
  .search-icon {
    color: #999;
  }
  .search-back-icon {
    filter: none; /* No invert for dark mode */
  }

  .search-input {
    background: #2a2a2a;
    color: #fff;
    border-color: #333;
  }

  .search-input:focus {
    border-color: #fff;
  }

  .search-input::placeholder {
    color: #999;
  }

  .search-clear {
    color: #999;
  }

  .search-clear:hover {
    color: #fff;
  }

  .search-close {
    color: #999;
  }

  .search-results-count {
    color: #999;
  }

  .search-view-all {
    color: #fff;
  }

  .search-view-all:hover {
    color: #ccc;
  }

  .search-result-item {
    background: #2a2a2a;
    border-color: #333;
  }

  .search-result-item:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  }

  .search-result-image {
    background: #333;
  }

  .search-result-title {
    color: #fff;
  }

  .search-result-price {
    color: #fff;
  }

  .search-loading {
    color: #999;
  }

  .search-spinner {
    border-color: #333;
    border-top-color: #fff;
  }

  .search-no-results {
    color: #999;
  }

  .search-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
}

/* Mobile Nav Panel */
.mobile-nav-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--z-dropdown);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.2s, opacity 0.2s ease;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 80vw;
  max-width: 400px;
  height: 100vh;
  background: var(--background);
  color: var(--text);
  transform: translateX(-100%);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 30px 0;
}

/* Mobile behavior: slide from bottom, 85vh height, full width */
@media (max-width: 1024px) {
  .mobile-nav-panel {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 80vh;
    max-width: none;
    transform: translateY(100%);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-open .mobile-nav-panel {
    transform: translateY(0);
  }

  /* Prevent pull-to-refresh when mobile menu is open */
  body.mobile-open {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  /* Ensure close button has proper touch target and is not affected by drag */
  .mobile-nav-header .mobile-nav-close {
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
  }
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  background: var(--background);
  flex-shrink: 0;
}

.mobile-nav-header span {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
}

.mobile-nav-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.mobile-nav-close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.3s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close:hover {
  color: var(--text);
}

.mobile-nav {
  margin-top: 0;
}

.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  display: block;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* Mobile menu badge styles */
.mobile-menu .menu-badge {
  font-size: 10px;
  padding: 1px 3px;
  margin-left: 6px;
  vertical-align: middle;
  top: -8px;
}

.menu-item {
  width: fit-content;
}

/* Mobile menu dropdown styles */
.mobile-menu .menu-item-has-children > a {
  position: relative;
  padding-right: 25px;
  max-width: fit-content;
}

.mobile-menu .menu-item-has-children > a::after {
  content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  transition: transform 0.2s ease;
}

.mobile-menu .menu-item-has-children.mobile-submenu-open > a::after {
  transform: translateY(-50%) rotate(90deg);
}

.mobile-menu .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  margin: 0 -16px;
  padding: 0 16px;
}

.mobile-menu .menu-item-has-children.mobile-submenu-open .sub-menu {
  max-height: 500px;
}

.mobile-menu .sub-menu {
  list-style: none;
}

.mobile-menu .sub-menu a {
  margin: 10px 0 0 5px;
  padding: 5px 0 5px 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.mobile-menu .sub-menu a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* Tertiary menu in mobile panel - same style as primary menu */
.mobile-nav--tertiary {
  margin-top: 10px;
}

.mobile-menu--tertiary a {
  color: var(--text);
  text-decoration: none;
  padding: 0;
  display: block;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.mobile-menu--tertiary a:hover {
  color: var(--accent);
}

/* Tertiary menu dropdown styles (inherit from primary menu) */
.mobile-menu--tertiary .menu-item-has-children > a {
  position: relative;
  padding-right: 40px;
}

.mobile-menu--tertiary .menu-item-has-children > a::after {
  content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 3L7.5 6L4.5 9' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.mobile-menu--tertiary .menu-item-has-children.mobile-submenu-open > a::after {
  transform: translateY(-50%) rotate(90deg);
}

.mobile-menu--tertiary .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  margin: 0 -16px;
  padding: 0 16px;
}

.mobile-menu--tertiary .menu-item-has-children.mobile-submenu-open .sub-menu {
  max-height: 500px;
}

.mobile-menu--tertiary .sub-menu {
  list-style: none;
}

.mobile-menu--tertiary .sub-menu a {
  padding: 12px 0 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.mobile-menu--tertiary .sub-menu a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* Mobile Header Tiles - Horizontal carousel like category tiles */
.mobile-nav-panel .tiles-3 {
  padding: 10px 0;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.mobile-nav-panel .tiles-3 .tile {
  flex: 0 0 calc(75% - 20px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 350px;
  max-height: 400px;
  border: 1px solid var(--border);
}

.mobile-nav-panel .tiles-3 .tile img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.mobile-nav-panel .tiles-3 .tile-overlay {
  opacity: 1;
  visibility: visible;
  justify-content: flex-start;
}

.mobile-nav-panel .tiles-3 .tile-content {
  text-align: left;
  max-width: none;
  padding: 0px 16px 25px 16px;
}

.mobile-nav-panel .tiles-3 .tile-description {
  font-size: 14px;
  margin: 0 0 16px 0;
}

.mobile-nav-panel .tiles-3 .tile-button {
  padding: 10px 20px;
  font-size: 11px;
  min-width: 120px;
}

/* Hide tile-label in mobile menu (overlay is always visible) */
.mobile-nav-panel .tiles-3 .tile-label {
  display: none;
}

/* Hide scrollbar but keep functionality */
.mobile-nav-panel .tiles-3::-webkit-scrollbar {
  display: none;
}

.mobile-nav-panel .tiles-3 {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mobile-open .mobile-nav-wrap {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s linear 0s, opacity 0.2s ease;
}

.mobile-open .mobile-nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* Hide WhatsApp button initially - show after 100px scroll */
/* Exclude product pages - button should be visible normally */
body:not(.single-product) .qlwapp__button.qlwapp__button--bubble {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body:not(.single-product) .qlwapp__button.qlwapp__button--bubble.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Hide WhatsApp button when mobile menu is open */
body.mobile-open .qlwapp__button.qlwapp__button--bubble {
  display: none;
}

/* Hide WhatsApp button when sticky add-to-cart is visible */
body:has(.sticky-add-to-cart.visible) .qlwapp__button.qlwapp__button--bubble {
  display: none;
}

/* Hide WhatsApp button when cart drawer is open */
body.cart-open
  .qlwapp__container.qlwapp__container--rounded
  .qlwapp__button--bubble {
  display: none;
}

body.search-open
  .qlwapp__container.qlwapp__container--rounded
  .qlwapp__button--bubble {
  display: none;
}

/* Desktop: slide from left */
@media (min-width: 1025px) {
  .mobile-open .mobile-nav-panel {
    transform: translateX(0);
  }
}

@media (max-width: 1024px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-left {
    order: 1;
    margin-bottom: 5px;
  }

  /* Add margin-right only when search icon is not rendered (single product pages) */
  body.single-product .header-left {
    margin-right: 38px;
  }

  .header-center {
    order: 2;
  }

  .header-right {
    order: 3;
  }

  .menu--primary {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 1024px) and (min-width: 641px) {
  /* Hide search item in secondary menu on mobile */
  .secondary-nav .menu--secondary .menu-item-search,
  .secondary-nav .menu--secondary .menu-item-10979 {
    display: none !important;
  }
}

/* Hide search item in mobile tertiary menu */
@media (max-width: 1024px) {
  .mobile-menu--tertiary .menu-item-search,
  .mobile-menu--tertiary .menu-item-10979 {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .secondary-nav {
    display: none;
  }

  .site-brand .brand-logo {
    width: 135px;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .site-brand .brand-symbol {
    display: block;
    width: 28px;
    height: auto;
    margin-left: 10px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -15px;
  }

  .menu--secondary {
    display: none;
  }

  .menu--tertiary {
    display: none;
  }

  .mobile-nav-panel {
    max-width: none;
  }

  /* Further reduce padding on small screens */
  .mobile-nav-header {
    padding: 12px 16px;
  }

  /* Change logo to symbol when header is sticky on mobile */
  .site-header.is-scrolled .site-brand .brand-logo {
    opacity: 0;
    transform: scale(0.8);
  }

  .site-header.is-scrolled .site-brand .brand-symbol {
    opacity: 1;
    transform: scale(1);
  }
}

/* Desktop logo to symbol transition on scroll */
@media (min-width: 641px) {
  .site-brand .brand-symbol {
    display: block;
  }

  .site-header.is-scrolled .site-brand .brand-logo {
    opacity: 0;
    transform: scale(0.8);
  }

  .site-header.is-scrolled .site-brand .brand-symbol {
    opacity: 1;
    transform: scale(1);
  }
}

/* Front page: transparent header overlaying hero */
.has-hero-header .site-header {
  background: transparent;
}

/* Front page: transparent header overlaying hero */
.tax-product_cat .site-header {
  background: transparent;
}

/* When scrolled, force black background even on front page */
.site-header.is-scrolled,
.has-hero-header .site-header.is-scrolled {
  background: var(--headerBackground) !important;
}

.tax-product_cat .site-header.is-scrolled {
  background: var(--headerBackground) !important;
}

/* Scroll Prevention Styles */
.scroll-locked {
  overflow: hidden !important;
}

/* Prevent content shift when scrollbar disappears */
.scroll-locked {
  padding-right: var(--scrollbar-width, 0);
}

/* Promo Bar Styles */
.promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--accent);
  z-index: 999;
  padding: 12px 0;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

/* Clickable promo bar styles */
.promo-bar[href] {
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.promo-bar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.promo-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

/* Adjust header position when promo bar is present */
body:has(.promo-bar) .site-header {
  top: 38px; /* Height of promo bar */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .promo-bar {
    padding: 10px 0;
  }

  .promo-text {
    font-size: 10px;
  }

  /* Adjust header position for mobile */
  body:has(.promo-bar) .site-header {
    top: 31px; /* Reduced promo bar height on mobile */
  }

  /* Adjust site content padding for mobile */
  body:has(.promo-bar):not(.has-hero-header) .site-content {
    padding-top: 83px; /* Mobile promo bar + header height */
  }

  body:not(.has-hero-header):not(:has(.promo-bar)) .site-content {
    padding-top: 40px; /* Reduced by 43px when promo bar is not active on mobile */
  }

  body:has(.promo-bar).has-hero-header .site-content {
    padding-top: 30px; /* Just mobile promo bar height */
  }
}

@media (max-width: 480px) {
  .promo-text {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .promo-bar-content {
    padding: 0 15px;
  }
}

body:not(.has-hero-header):not(:has(.promo-bar)) .site-content {
  padding-top: 46px; /* Reduced by 43px when promo bar is not active */
}

body:not(.has-hero-header):has(.promo-bar) .site-content {
  padding-top: 80px; /* Original padding when promo bar is present */
}

body.archive:has(.promo-bar) .site-content {
  padding-top: 30px; /* Original padding when promo bar is present */
}

#menu-account {
  margin-bottom: 2px;
}

/* Mega Menu Styles */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--background);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: var(--z-overlay);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mega-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 60px;
  padding: 40px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.mega-menu-column {
  display: flex;
  flex-direction: column;
}

.mega-menu-heading {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 20px 0;
  padding-bottom: 8px;
}

.mega-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-menu-links li {
  margin: 0;
}

.mega-menu-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  display: block;
  padding: 4px 0;
}

.mega-menu-links a:hover {
  color: var(--accent);
}

/* Header state when mega menu is open */
.site-header.mega-menu-open {
  background: var(--headerBackground);
}

/* Hide mega menu on mobile */
@media (max-width: 1024px) {
  .mega-menu {
    display: none;
  }
}
