/* Shared storefront primitives used by header, footer, cards, archives, and PDP. */
.sonify-storefront,
.homepage,
.sonify-pdp,
.sonify-shop {
  color: var(--color-text);
  font-family: var(--font-body);
}

.sonify-storefront-container,
.homepage .container,
.sonify-shop__container {
  box-sizing: border-box;
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--storefront-gutter);
}

/* Keep header chrome edge-to-edge while preserving the shared responsive gutter. */
#masthead .sonify-header-main__inner,
#wide-nav > .flex-row.container {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--storefront-gutter);
}

/* Use the loaded brand font for labels; icon elements retain Flatsome's font. */
#masthead {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

#masthead .header-nav > li > a,
#wide-nav .header-nav > li > a,
.mobile-sidebar .nav-sidebar > li > a {
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  min-height: 2.75rem;
}

#masthead .header-nav > li > a:hover,
#wide-nav .header-nav > li > a:hover,
.mobile-sidebar .nav-sidebar > li > a:hover {
  color: var(--color-accent-dark);
}

#masthead .cart-icon strong {
  font-family: var(--font-body);
  font-weight: 600;
}

/* Dark utility bar */
#top-bar.sol-topbar { position: relative; z-index: 2; background: #141414; color: #e6e6e6; font-family: var(--font-body); }
.sol-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.25rem; padding-inline: var(--storefront-gutter); }
.sol-topbar__links ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.sol-topbar__links li { margin: 0; }
.sol-topbar__links li + li::before { content: "|"; padding-inline: 0.85rem; color: #5c5c5c; }
.sol-topbar__links a { color: #e6e6e6; font-size: 0.75rem; text-decoration: none; }
.sol-topbar__links a:hover { color: #fff; }
.sol-topbar__note { margin: 0; color: #bdbdbd; font-size: 0.75rem; }

/* Main header: logo, wide rounded search, account + cart. */
#masthead { border-bottom-color: #f1f1f1; }
#masthead .flex-left.flex-grow { padding-inline: clamp(1rem, 4vw, 4rem); }
#masthead .header-search-form { width: min(100%, 34rem); }
#masthead .header-search-form .searchform { position: relative; }
#masthead .header-search-form input[type="search"] {
  height: 2.6rem;
  padding-inline: 1.25rem 3rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: #fafafa;
  box-shadow: none;
  font: 400 0.85rem/1 var(--font-body);
}
#masthead .header-search-form .ux-search-submit,
#masthead .header-search-form button[type="submit"] {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  min-height: 2rem;
  width: 2rem;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 50%;
  color: var(--color-text);
  background: transparent !important;
}
#masthead .header-search-form .header-search-form-wrapper,
#masthead .header-search-form .searchform-wrapper { width: 100%; }
#masthead .header-search-form .flex-col:last-child { position: absolute; top: 0; right: 0; bottom: 0; display: flex; align-items: center; }
#masthead .header-search-form .ux-search-submit { position: static !important; transform: none !important; margin-right: 0.4rem !important; }
#masthead .nav-uppercase > li > a { text-transform: none; letter-spacing: 0; }
#masthead .header-divider { border-left-color: var(--color-line); }
#masthead .cart-price { font-family: var(--font-body); font-weight: 600; }

@media (max-width: 849px) {
  .sol-topbar__note { display: none; }
  .sol-topbar__inner { justify-content: center; }
}

/* Reuse the existing drawer before desktop labels run out of horizontal room. */
@media (min-width: 850px) and (max-width: 1099px) {
  #masthead .sonify-header-main__inner > .hide-for-medium {
    display: none !important;
  }

  #masthead .sonify-header-main__inner > .show-for-medium {
    display: flex !important;
    flex: 1 1 0;
  }

  #masthead .show-for-medium.flex-left { order: 1; }
  #masthead .show-for-medium.flex-right { order: 3; }
  #masthead #logo {
    order: 2;
    margin: 0 15px;
    text-align: center;
  }

  #masthead #logo img { margin-inline: auto; }
}

.screen-reader-text,
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  clip-path: none;
  color: var(--color-surface);
  background: var(--color-text);
}

.sonify-storefront a:focus-visible,
.sonify-storefront button:focus-visible,
.homepage a:focus-visible,
.homepage button:focus-visible,
.sonify-pdp a:focus-visible,
.sonify-pdp button:focus-visible,
.sonify-shop a:focus-visible,
.sonify-shop button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.sonify-storefront-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--color-cta);
  border-radius: var(--radius);
  color: var(--color-surface);
  background: var(--color-cta);
  font: 600 0.875rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.sonify-storefront-button:hover {
  border-color: var(--color-accent-dark);
  color: var(--color-surface);
  background: var(--color-accent-dark);
}

.sonify-info-page {
  width: min(100% - 2rem, 780px);
  margin: 3rem auto;
}

.sonify-info-page__title {
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
