/* Trendish v272 — single final header normalization layer.
   Purpose: remove accumulated spacing/overflow conflicts without changing site features. */

/* ---------- shared header geometry ---------- */
.site-header,
.site-header .header-main,
.site-header .header-actions,
.site-header .profile-menu,
.site-header .contact-menu-v132,
.site-header .header-cart-preview-v175{
  overflow:visible!important;
}

.site-header .header-main.header-standard-layout{
  align-items:center!important;
}

.site-header .header-standard-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}

.site-header .header-standard-actions > .profile-menu,
.site-header .header-standard-actions > .contact-menu-v132,
.site-header .header-standard-actions > .header-cart-preview-v175{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  margin:0!important;
  padding:0!important;
}

.site-header .profile-login-link,
.site-header .profile-menu-trigger,
.site-header .contact-menu-v132 .contact-menu-trigger,
.site-header .cart-link-minimal{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:12px!important;
  box-sizing:border-box!important;
  transform:none!important;
}

.site-header .profile-menu-trigger{
  gap:2px!important;
}
.site-header .profile-menu-icon,
.site-header .profile-login-link svg{
  width:24px!important;
  height:24px!important;
}
.site-header .profile-menu-chevron{
  width:8px!important;
  height:6px!important;
  margin:0!important;
}

.site-header .contact-menu-v132{
  z-index:130!important;
}
.site-header .contact-menu-v132 .contact-menu-main-badge{
  width:35px!important;
  height:35px!important;
  flex:0 0 35px!important;
  margin:0!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.82),0 0 12px rgba(237,93,139,.38),inset 0 0 7px rgba(255,255,255,.95)!important;
}
.site-header .contact-menu-v132 .contact-menu-icon{
  width:27px!important;
  height:27px!important;
}
.site-header .contact-menu-v132 .contact-menu-chevron{
  position:absolute!important;
  bottom:-2px!important;
  left:50%!important;
  width:8px!important;
  height:5px!important;
  margin:0!important;
  transform:translateX(-50%)!important;
}
.site-header .contact-menu-v132.is-open .contact-menu-chevron,
.site-header .contact-menu-v132:hover .contact-menu-chevron{
  transform:translateX(-50%) rotate(180deg)!important;
}

.site-header .header-cart-preview-v175{
  z-index:129!important;
}
.site-header .cart-link-minimal .cart-link-icon{
  width:30px!important;
  height:30px!important;
}
.site-header .cart-link-minimal .cart-link-icon svg{
  width:28px!important;
  height:25px!important;
}
.site-header .cart-link-minimal .cart-link-count{
  top:1px!important;
  right:0!important;
  min-width:17px!important;
  height:17px!important;
  padding:0 4px!important;
  font-size:9px!important;
  line-height:17px!important;
  margin:0!important;
}

/* A subtle common hit area on the overlay header makes the three controls feel aligned. */
body.home-overlay-layout .site-header.is-home-overlay .profile-menu-trigger,
body.home-overlay-layout .site-header.is-home-overlay .profile-login-link,
body.home-overlay-layout .site-header.is-home-overlay .cart-link-minimal{
  background:rgba(255,255,255,.10)!important;
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}

/* ---------- desktop ---------- */
@media (min-width:901px){
  body.header-swap-v270 .site-header .header-main.header-standard-layout,
  body.header-swap-v270.home-overlay-layout .site-header.is-home-overlay .header-main.header-standard-layout{
    display:grid!important;
    direction:ltr!important;
    grid-template-columns:minmax(260px,1fr) auto minmax(260px,1fr)!important;
    grid-template-areas:none!important;
    column-gap:24px!important;
    row-gap:0!important;
    min-height:76px!important;
    padding:12px 0!important;
  }

  body.header-swap-v270 .site-header .header-standard-search,
  body.header-swap-v270.home-overlay-layout .site-header.is-home-overlay .header-standard-search{
    grid-column:1!important;
    grid-row:1!important;
    justify-self:start!important;
    align-self:center!important;
    width:min(330px,100%)!important;
    max-width:330px!important;
    margin:0!important;
    direction:rtl!important;
  }

  body.header-swap-v270 .site-header .header-standard-logo,
  body.header-swap-v270.home-overlay-layout .site-header.is-home-overlay .header-standard-logo{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:center!important;
    align-self:center!important;
    margin:0!important;
  }

  body.header-swap-v270 .site-header .header-standard-actions,
  body.header-swap-v270.home-overlay-layout .site-header.is-home-overlay .header-standard-actions{
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    align-self:center!important;
    direction:rtl!important;
    gap:10px!important;
  }

  .site-header .header-standard-actions > .profile-menu,
  .site-header .header-standard-actions > .contact-menu-v132,
  .site-header .header-standard-actions > .header-cart-preview-v175{
    flex-basis:44px!important;
    width:44px!important;
    height:44px!important;
  }
  .site-header .profile-login-link,
  .site-header .profile-menu-trigger,
  .site-header .contact-menu-v132 .contact-menu-trigger,
  .site-header .cart-link-minimal{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }

  /* Cart opens inward, never outside the right edge. */
  .site-header .header-cart-dropdown-v175{
    left:auto!important;
    right:0!important;
    width:min(370px,calc(100vw - 32px))!important;
    max-width:calc(100vw - 32px)!important;
    transform:translateY(-6px)!important;
  }
  .site-header .header-cart-preview-v175:hover .header-cart-dropdown-v175,
  .site-header .header-cart-preview-v175:focus-within .header-cart-dropdown-v175,
  .site-header .header-cart-preview-v175.is-open .header-cart-dropdown-v175{
    transform:translateY(0)!important;
  }
  .site-header .header-cart-dropdown-v175::before{
    left:auto!important;
    right:16px!important;
  }

  .site-header .contact-menu-v132 .contact-menu-dropdown{
    top:calc(100% + 8px)!important;
    width:224px!important;
  }

  /* Portal profile card stays compact and directly below the account button. */
  body > .profile-menu-dropdown.profile-menu-floating-v266{
    width:210px!important;
    max-width:calc(100vw - 24px)!important;
    padding:7px!important;
    border-radius:15px!important;
  }
}

/* ---------- mobile/tablet ---------- */
@media (max-width:900px){
  .site-header .header-main.header-standard-layout,
  body.home-overlay-layout .site-header.is-home-overlay .header-main.header-standard-layout{
    display:grid!important;
    direction:ltr!important;
    grid-template-columns:58px minmax(72px,1fr) auto!important;
    grid-template-areas:"logo search actions"!important;
    align-items:center!important;
    width:calc(100% - 16px)!important;
    max-width:none!important;
    min-height:58px!important;
    column-gap:6px!important;
    row-gap:0!important;
    margin:0 auto!important;
    padding:7px 0!important;
  }

  .site-header .header-standard-logo,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo{
    grid-area:logo!important;
    justify-self:start!important;
    align-self:center!important;
    width:58px!important;
    max-width:58px!important;
    margin:0!important;
    transform:none!important;
  }
  .site-header .header-standard-logo .site-logo-visual,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo .site-logo-visual,
  .site-header .header-standard-logo .site-logo-visual img,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo .site-logo-visual img{
    width:58px!important;
    max-width:58px!important;
    height:28px!important;
    max-height:28px!important;
    object-fit:contain!important;
    margin:0!important;
  }

  .site-header .header-standard-search,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-search{
    grid-area:search!important;
    justify-self:stretch!important;
    align-self:center!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    min-height:34px!important;
    height:34px!important;
    margin:0!important;
    border-radius:10px!important;
    overflow:hidden!important;
  }
  .site-header .header-standard-search input,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-search input{
    min-width:0!important;
    height:34px!important;
    min-height:34px!important;
    padding:5px 7px!important;
    font-size:10px!important;
  }
  .site-header .header-standard-search button,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-search button{
    width:29px!important;
    min-width:29px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
  }

  .site-header .header-standard-actions,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-actions{
    grid-area:actions!important;
    justify-self:end!important;
    align-self:center!important;
    direction:rtl!important;
    gap:4px!important;
    min-width:0!important;
  }

  .site-header .header-standard-actions > .profile-menu,
  .site-header .header-standard-actions > .contact-menu-v132,
  .site-header .header-standard-actions > .header-cart-preview-v175{
    flex:0 0 35px!important;
    width:35px!important;
    height:35px!important;
  }
  .site-header .profile-login-link,
  .site-header .profile-menu-trigger,
  .site-header .contact-menu-v132 .contact-menu-trigger,
  .site-header .cart-link-minimal{
    width:35px!important;
    min-width:35px!important;
    height:35px!important;
    min-height:35px!important;
    border-radius:10px!important;
  }

  .site-header .profile-menu-chevron,
  .site-header .contact-menu-v132 .contact-menu-chevron{
    display:none!important;
  }
  .site-header .profile-menu-icon,
  .site-header .profile-login-link svg{
    width:22px!important;
    height:22px!important;
  }
  .site-header .contact-menu-v132 .contact-menu-main-badge{
    width:31px!important;
    height:31px!important;
    flex-basis:31px!important;
    box-shadow:0 0 0 2px rgba(255,255,255,.82),0 0 9px rgba(237,93,139,.34),inset 0 0 6px rgba(255,255,255,.95)!important;
  }
  .site-header .contact-menu-v132 .contact-menu-icon{
    width:24px!important;
    height:24px!important;
  }
  .site-header .cart-link-minimal .cart-link-icon{
    width:27px!important;
    height:27px!important;
  }
  .site-header .cart-link-minimal .cart-link-icon svg{
    width:25px!important;
    height:22px!important;
  }
  .site-header .cart-link-minimal .cart-link-count{
    top:-2px!important;
    right:-2px!important;
    min-width:15px!important;
    height:15px!important;
    font-size:8px!important;
    line-height:15px!important;
  }

  /* Keep dropdowns inside the viewport. */
  .site-header .profile-menu-dropdown{
    top:calc(100% + 8px)!important;
    right:0!important;
    left:auto!important;
    width:min(210px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    margin:0!important;
    padding:7px!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 16px 38px rgba(30,23,27,.18)!important;
    transform:translateY(-5px)!important;
    z-index:2147483000!important;
  }
  .site-header .profile-menu.is-open .profile-menu-dropdown,
  .site-header .profile-menu:focus-within .profile-menu-dropdown{
    transform:translateY(0)!important;
  }
  .site-header .profile-menu-dropdown::before{
    right:12px!important;
    left:auto!important;
  }

  .site-header .contact-menu-v132 .contact-menu-dropdown{
    position:fixed!important;
    top:64px!important;
    right:12px!important;
    left:auto!important;
    width:min(224px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    margin:0!important;
    transform:translateY(-5px)!important;
    z-index:2147482999!important;
  }
  .site-header .contact-menu-v132.is-open .contact-menu-dropdown{
    transform:translateY(0)!important;
  }
  .site-header .contact-menu-v132 .contact-menu-dropdown::before,
  .site-header .contact-menu-v132 .contact-menu-dropdown::after{
    display:none!important;
  }

  .site-header .header-cart-dropdown-v175{
    position:fixed!important;
    top:64px!important;
    right:12px!important;
    left:12px!important;
    width:auto!important;
    max-width:none!important;
    max-height:calc(100dvh - 80px)!important;
    margin:0!important;
    overflow:auto!important;
    border-radius:16px!important;
    transform:translateY(-5px)!important;
    z-index:2147482998!important;
  }
  .site-header .header-cart-preview-v175.is-open .header-cart-dropdown-v175,
  .site-header .header-cart-preview-v175:focus-within .header-cart-dropdown-v175{
    transform:translateY(0)!important;
  }
  .site-header .header-cart-dropdown-v175::before,
  .site-header .header-cart-dropdown-v175::after{
    display:none!important;
  }

  .site-header .header-cart-empty-v175{
    padding:22px 16px 18px!important;
  }
  .site-header .header-cart-empty-icon-v175{
    width:52px!important;
    height:52px!important;
  }
  .site-header .header-cart-empty-v175 strong{
    font-size:14px!important;
  }
  .site-header .header-cart-empty-v175 small{
    font-size:10px!important;
    text-align:center!important;
  }

  /* Nav stays active and below the action/dropdown layer. */
  .site-header .main-nav,
  body.home-overlay-layout .site-header.is-home-overlay .home-mobile-nav{
    z-index:120!important;
    pointer-events:auto!important;
  }
}

@media (max-width:360px){
  .site-header .header-main.header-standard-layout,
  body.home-overlay-layout .site-header.is-home-overlay .header-main.header-standard-layout{
    grid-template-columns:48px minmax(56px,1fr) auto!important;
    width:calc(100% - 10px)!important;
    column-gap:4px!important;
    min-height:54px!important;
    padding:5px 0!important;
  }
  .site-header .header-standard-logo,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo,
  .site-header .header-standard-logo .site-logo-visual,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo .site-logo-visual,
  .site-header .header-standard-logo .site-logo-visual img,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo .site-logo-visual img{
    width:48px!important;
    max-width:48px!important;
  }
  .site-header .header-standard-logo .site-logo-visual img,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-logo .site-logo-visual img{
    height:25px!important;
    max-height:25px!important;
  }
  .site-header .header-standard-actions,
  body.home-overlay-layout .site-header.is-home-overlay .header-standard-actions{
    gap:3px!important;
  }
  .site-header .header-standard-actions > .profile-menu,
  .site-header .header-standard-actions > .contact-menu-v132,
  .site-header .header-standard-actions > .header-cart-preview-v175,
  .site-header .profile-login-link,
  .site-header .profile-menu-trigger,
  .site-header .contact-menu-v132 .contact-menu-trigger,
  .site-header .cart-link-minimal{
    flex-basis:33px!important;
    width:33px!important;
    min-width:33px!important;
    height:33px!important;
    min-height:33px!important;
  }
  .site-header .contact-menu-v132 .contact-menu-main-badge{
    width:29px!important;
    height:29px!important;
    flex-basis:29px!important;
  }
  .site-header .header-standard-search input{
    font-size:9px!important;
    padding-inline:5px!important;
  }
  .site-header .header-standard-search button{
    width:26px!important;
    min-width:26px!important;
  }
  .site-header .contact-menu-v132 .contact-menu-dropdown,
  .site-header .header-cart-dropdown-v175{
    top:59px!important;
  }
}

/* Compact account pages keep the same clean alignment, just slightly shorter. */
body.compact-account-header-v258 .site-header.compact-account-header-v258 .header-main.header-standard-layout{
  min-height:54px!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
}
