﻿/* Header layout. XTRA owns logos, labels, links, colors, borders and typography.
 * Native header_2: logo, navigation, then search trigger and cart.
 * Native header_4: mobile menu, centered logo, cart, then search.
 */
#site_header { box-shadow: 0 7px 22px rgba(48, 58, 35, .08); }
#site_header .logo { display: block; }
#site_header .logo img { display: block; height: auto; object-fit: contain; }
#site_header .cz_elm[class*="search_header_"],
#site_header .search_with_icon,
#site_header .outer_search,
#site_header .search { max-width: 100%; }
#site_header .search { margin: 0; }
#site_header .search input[name="s"] { box-sizing: border-box; width: 100%; min-height: 50px; margin: 0; }
#site_header .search button { width: 48px; min-height: 48px; margin: 1px; border-radius: 9px; }
/* The global XTRA button hover resets transform; retain this absolute button's centering. */
#site_header .header_2 .search button { transform: translateY(-50%); }
#site_header .search input[name="s"]::placeholder { opacity: .8; }
#site_header .search:focus-within { outline: 2px solid #74815b; outline-offset: 3px; border-radius: 10px; }
#site_header a:focus-visible,
#site_header [role="button"]:focus-visible,
#site_header button:focus-visible { outline: 2px solid #74815b; outline-offset: 4px; }
/* XTRA's global focus reset is !important. Keep keyboard focus inside the panel. */
body #menu_header_4 :is(a, [role="button"]):focus-visible { outline: 2px solid currentColor !important; outline-offset: -3px; }

/* Native cart title replaces the previous CSS-generated text. */
#site_header .elms_shop_cart .shop_icon {
 box-sizing: border-box;
 display: inline-flex !important;
 align-items: center;
 justify-content: center;
 gap: 10px;
 width: 136px !important;
 min-height: 50px;
 height: auto !important;
 padding: 8px 14px;
 text-decoration: none;
 transition: filter 160ms ease;
}
#site_header .shop_icon > i { flex: 0 0 26px; width: 26px; height: 28px; line-height: 28px; border: 0; }
#site_header .shop_icon > span { margin: 0; white-space: nowrap; }
#site_header .shop_icon [data-count]::after { top: -5px; right: -6px; min-width: 16px; height: 16px; padding: 0 2px; line-height: 16px; border: 2px solid #45552c; }
#site_header .shop_icon:hover { filter: brightness(1.08); }
#site_header .cz_cart_items {
 box-sizing: border-box;
 width: 360px;
 max-width: calc(100vw - 32px);
 padding: 20px;
 color: #303a23;
 background-color: #fbf9f4;
 border: 1px solid #e0e4d6;
 border-radius: 12px;
 box-shadow: 0 14px 32px rgba(48, 58, 35, .12);
}
@media screen and (min-width: 769px) {
 #site_header .header_2 > .row {
  box-sizing: border-box;
  width: calc(100% - 80px) !important;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0;
 }
 #site_header .header_2 > .row > .clr {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 200px;
  align-items: center;
  gap: 32px;
  min-height: 104px;
 }
 #site_header .header_2 .elms_left,
 #site_header .header_2 .elms_center,
 #site_header .header_2 .elms_right { position: static; width: auto; min-width: 0; margin: 0; transform: none; }
 #site_header .header_2 .elms_left { justify-self: start; }
 #site_header .header_2 .elms_right { justify-self: end; display: flex; align-items: center; gap: 12px; }
 #site_header .header_2 .elms_center > div { display: flex; justify-content: center; width: 100%; }
 #site_header .header_2 .cz_elm { float: none; }
 #site_header .header_2 .xtra-search-icon { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; line-height: 1; }
 #site_header .header_2 .search_style_icon_dropdown .outer_search { box-sizing: border-box; width: 400px; max-width: calc(100vw - 48px); margin-top: 16px; animation: kp-search-enter 180ms ease-out; }
 #site_header .header_2 .search_style_icon_dropdown .search { width: 100% !important; }
 #site_header .header_2 .elms_row > .clr::before,
 #site_header .header_2 .elms_row > .clr::after { display: none; }
 #site_header #menu_header_2 { display: flex; align-items: center; gap: 14px; padding: 0; margin: 0; }
 #site_header #menu_header_2 > li.cz { padding: 0; }
 #site_header #menu_header_2 > li.cz > a { display: flex; align-items: center; gap: 9px; box-sizing: border-box; min-height: 44px; line-height: 1.7; white-space: nowrap; text-decoration: none; }
 #site_header #menu_header_2 > li.cz > a > .cz_indicator { position: static; margin: 0; font-size: 11px; transform: none; }
 #site_header #menu_header_2 > li.cz > a > .cz_indicator::before { content: "\f107"; }
 #site_header #menu_header_2 .cz > .sub-menu { box-sizing: border-box; min-width: 240px; }
 #site_header #menu_header_2 .sub-menu .cz > a { box-sizing: border-box; min-height: 44px; line-height: 1.8; }
}
@media screen and (min-width: 769px) and (max-width: 1100px) {
 #site_header .header_2 > .row { width: calc(100% - 48px) !important; }
 #site_header .header_2 > .row > .clr { grid-template-columns: 140px minmax(0, 1fr) 200px; gap: 16px; }
 #site_header #menu_header_2 { gap: 4px; }
 #site_header #menu_header_2 > li.cz > a { padding-inline: 8px; font-size: 14px; }
}
@media screen and (min-width: 769px) and (max-width: 940px) {
 #site_header .header_2 > .row { width: calc(100% - 32px) !important; }
 #site_header .header_2 > .row > .clr { grid-template-columns: 112px minmax(0, 1fr) 112px; gap: 12px; }
 #site_header .header_2 .logo img { max-width: 112px; }
 #site_header .header_2 .elms_shop_cart .shop_icon { width: 50px !important; padding: 8px; }
 #site_header .header_2 .shop_icon > span { display: none; }
}
@media screen and (max-width: 768px) {
 #site_header .header_4 > .row { box-sizing: border-box; width: calc(100% - 32px) !important; margin: 0 auto; padding: 0 0 14px; }
 #site_header .header_4 > .row > .clr { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: 78px 48px; column-gap: 14px; row-gap: 0; align-items: center; }
 #site_header .header_4 .elms_left,
 #site_header .header_4 .elms_right { position: static; display: block; width: auto; min-width: 0; margin: 0; transform: none; }
 #site_header .header_4 .elms_left { grid-column: 1; grid-row: 1; }
 #site_header .header_4 .elms_right { grid-column: 3; grid-row: 1; }
 #site_header .header_4 .elms_center,
 #site_header .header_4 .elms_center > div { display: contents; }
 #site_header .header_4 .cz_elm { float: none; margin: 0 !important; }
 #site_header .header_4 .cz_elm[class*="logo_header_"] { grid-column: 2; grid-row: 1; justify-self: center; }
 #site_header .header_4 .cz_elm[class*="search_header_"] { grid-column: 1 / -1; grid-row: 2; width: 100%; }
 #site_header .header_4 .search { width: 100% !important; }
 #site_header .header_4 .search input[name="s"] { min-height: 48px; }
 #site_header .header_4 .search button { min-height: 46px; width: 46px; }
 #site_header .header_4 .elms_shop_cart .shop_icon { width: 44px !important; min-height: 44px; padding: 8px; }
 #site_header .header_4 i.icon_mobile_offcanvas_menu { box-sizing: border-box; width: 44px; height: 44px; line-height: 42px; }
 #site_header .header_4 .elms_row > .clr::before,
 #site_header .header_4 .elms_row > .clr::after { display: none; }
}
/* The existing native off-canvas menu retains opening, closing and submenus. */
body #menu_header_4 { box-sizing: border-box; font-family: inherit; }
body #menu_header_4 .cz > a { box-sizing: border-box; min-height: 44px; line-height: 1.9; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
body #menu_header_4 .cz .cz > a { min-height: 44px; }
/* Keep the mobile social icons calm; XTRA's shared icon effect remains elsewhere. */
body #menu_header_4 .cz_social a:hover i { animation: none; transform: none; }
@keyframes kp-search-enter { from { transform: translateY(-6px); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { #site_header .shop_icon, body #menu_header_4 .cz > a { transition: none; } #site_header .header_2 .search_style_icon_dropdown .outer_search { animation: none; } }
