/* Fase 3D.2.1B header contract grid */
/* Runtime contract scope only: default header mode; no auth/b2b shell. */
body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] {
  --awa-header-container-max: 1280px;
  --awa-header-container-padding: 24px;
  --awa-header-logo-width: 184px;
  --awa-header-actions-width: 276px;
  --awa-header-search-min: 320px;
  --awa-header-search-max: 760px;
  --awa-header-main-height: 68px;
  --awa-header-nav-height: 46px;
  --awa-header-gap: 18px;
}

body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-main-header__inner[data-awa-header-row="brand-search"],
body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .header-control.awa-nav-bar[data-awa-header-nav="true"] .awa-nav-bar__inner {
  box-sizing: border-box;
  width: min(100%, var(--awa-header-container-max, 1280px));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--awa-header-container-padding, 24px);
  padding-right: var(--awa-header-container-padding, 24px);
}

body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-main-header__inner[data-awa-header-row="brand-search"] {
  display: grid;
  grid-template-columns: minmax(148px, var(--awa-header-logo-width, 172px)) minmax(var(--awa-header-search-min, 320px), 1fr) minmax(240px, var(--awa-header-actions-width, 300px));
  align-items: center;
  column-gap: var(--awa-header-gap, 24px);
  min-height: var(--awa-header-main-height, 72px);
}

body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-primary-row[data-awa-header-primary-row="true"],
body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand[data-awa-header-brand="true"],
body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand-cell[data-awa-header-brand="true"] {
  min-width: 0;
  justify-self: start;
}

body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] {
  min-width: 0;
  width: 100%;
  max-width: var(--awa-header-search-max, 720px);
  justify-self: center;
}

body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-right-col[data-awa-header-right="true"] {
  min-width: 0;
  width: 100%;
  max-width: var(--awa-header-actions-width, 300px);
  justify-self: end;
}

body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .header-control.awa-nav-bar[data-awa-header-nav="true"] {
  min-height: var(--awa-header-nav-height, 48px);
}

@media (max-width: 1199px) and (min-width: 992px) {
  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] {
    --awa-header-container-padding: 20px;
    --awa-header-logo-width: 172px;
    --awa-header-actions-width: 260px;
    --awa-header-gap: 16px;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-main-header__inner[data-awa-header-row="brand-search"] {
    grid-template-columns: minmax(148px, var(--awa-header-logo-width, 172px)) minmax(var(--awa-header-search-min, 320px), 1fr) minmax(210px, var(--awa-header-actions-width, 260px));
  }
}

@media (min-width: 992px) {
  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand-cell[data-awa-header-brand="true"] .logo {
    max-width: var(--awa-header-logo-width, 184px) !important;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand-cell[data-awa-header-brand="true"] .logo img {
    width: 100% !important;
    max-width: var(--awa-header-logo-width, 184px) !important;
    height: auto !important;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .header-control.awa-nav-bar[data-awa-header-nav="true"] .awa-nav-bar__inner {
    display: grid !important;
    grid-template-columns: minmax(220px, 248px) minmax(0, 1fr) auto;
    column-gap: 14px;
    align-items: center;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-categories.menu_left_home1 {
    width: 100%;
    max-width: 248px;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-categories.menu_left_home1 .our_categories.title-category-dropdown {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 14px;
    font-weight: 600;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-primary-nav.menu_primary {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] {
    --awa-header-container-padding: 16px;
    --awa-header-actions-width: 220px;
    --awa-header-search-min: 280px;
    --awa-header-gap: 16px;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-main-header__inner[data-awa-header-row="brand-search"] {
    grid-template-columns: minmax(132px, 172px) minmax(280px, 1fr);
    grid-template-areas: "brand actions" "search search";
    row-gap: 8px;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-primary-row[data-awa-header-primary-row="true"] {
    grid-area: brand;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] {
    grid-area: search;
    max-width: none;
    justify-self: stretch;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-right-col[data-awa-header-right="true"] {
    grid-area: actions;
  }
}

@media (max-width: 767px) {
  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] {
    --awa-header-container-padding: 12px;
    --awa-header-gap: 8px;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-main-header__inner[data-awa-header-row="brand-search"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "primary" "search" "actions";
    row-gap: 8px;
    column-gap: 8px;
    min-width: 0;
    max-width: 100%;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-primary-row[data-awa-header-primary-row="true"] {
    display: grid;
    grid-area: primary;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas: "toggle brand cart";
    align-items: center;
    column-gap: 8px;
    min-width: 0;
    width: 100%;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-mobile-toggle[data-awa-nav-toggle="true"] {
    grid-area: toggle;
    justify-self: start;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand[data-awa-header-brand="true"],
  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand-cell[data-awa-header-brand="true"] {
    grid-area: brand;
    justify-self: center;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand-cell[data-awa-header-brand="true"] .logo {
    max-width: 148px !important;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-brand-cell[data-awa-header-brand="true"] .logo img {
    width: 100% !important;
    max-width: 148px !important;
    height: auto !important;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-cart-link {
    grid-area: cart;
    justify-self: end;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] {
    grid-area: search;
    max-width: none;
    justify-self: stretch;
    width: 100%;
    margin: 0;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] #search_mini_form {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Fase 3D.2.5: limpeza visual da busca mobile (uma única lupa visível). */
  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] #search_mini_form .actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    box-sizing: border-box;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] #search_mini_form :is(.actions .action.search, button.action.search) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] #search_mini_form :is(.actions .action.search, button.action.search)::before {
    content: none !important;
    display: none !important;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-search-col[data-awa-header-search-row="true"] #search_mini_form input#search {
    font-size: 16px !important;
    min-height: 44px;
    box-sizing: border-box;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .awa-header-right-col[data-awa-header-right="true"] {
    grid-area: actions;
    max-width: none;
    justify-self: stretch;
  }

  body:not(.b2b-auth-shell) .awa-site-header[data-awa-header-mode="default"] .header-control.awa-nav-bar[data-awa-header-nav="true"] .awa-nav-bar__inner {
    max-width: 100%;
  }

  /* Fase 3D.2.5: barra B2B integrada ao header (sem aparência de remendo). */
  body:not(.b2b-auth-shell) .page-wrapper .top-header.awa-utility-bar.awa-b2b-promo-bar {
    min-height: 34px;
    border-bottom: 1px solid color-mix(in srgb, var(--awa-border, #e5e5e5) 78%, transparent);
  }

  body:not(.b2b-auth-shell) .page-wrapper .top-header.awa-utility-bar.awa-b2b-promo-bar .awa-b2b-promo-bar__inner {
    min-height: 34px;
    padding-inline: var(--awa-header-container-padding, 12px);
    gap: 6px;
    align-items: center;
  }

  body:not(.b2b-auth-shell) .page-wrapper .top-header.awa-utility-bar.awa-b2b-promo-bar :is(.awa-b2b-promo-bar__text, .awa-b2b-promo-bar__lead, .awa-b2b-promo-bar__lead-long, .awa-b2b-promo-bar__lead-short, .awa-b2b-promo-bar__tail) {
    font-size: 12px;
    line-height: 1.35;
  }

  body:not(.b2b-auth-shell) .page-wrapper .top-header.awa-utility-bar.awa-b2b-promo-bar .awa-b2b-promo-bar__cta {
    font-weight: 600;
    text-underline-offset: 2px;
  }

  body:not(.b2b-auth-shell) .page-wrapper .top-header.awa-utility-bar.awa-b2b-promo-bar .awa-b2b-promo-close {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
  }

  body:is(.cms-index-index, .cms-home, .cms-homepage_ayo_home5):not(.b2b-auth-shell) .top-home-content--above-fold {
    margin-top: 0;
    padding-top: 8px;
  }

  body:is(.cms-index-index, .cms-home, .cms-homepage_ayo_home5):not(.b2b-auth-shell) .top-home-content--above-fold .awa-hero-inline-cta {
    padding: 8px 12px 2px !important;
  }

  body:is(.cms-index-index, .cms-home, .cms-homepage_ayo_home5):not(.b2b-auth-shell) .top-home-content--above-fold .wrapper_slider.visible-xs .awa-hero-swiper__nav {
    width: 30px;
    height: 30px;
    margin-top: 0;
    opacity: 0.76;
  }

  body:is(.cms-index-index, .cms-home, .cms-homepage_ayo_home5):not(.b2b-auth-shell) .top-home-content--above-fold .wrapper_slider.visible-xs .awa-hero-swiper__nav::after {
    font-size: 10px;
  }

  body:is(.cms-index-index, .cms-home, .cms-homepage_ayo_home5):not(.b2b-auth-shell) .top-home-content--above-fold + .top-home-content {
    padding-top: 12px;
  }
}

/* PLP/search mobile P1: top hierarchy and spacing lock */
@media (max-width: 767px) {
  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper {
    overflow-x: hidden;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper .awa-site-header[data-awa-header-mode="default"] .header-wrapper-sticky {
    margin-bottom: 0;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper .awa-site-header[data-awa-header-mode="default"] .awa-main-header__inner[data-awa-header-row="brand-search"] {
    row-gap: 6px;
    padding-bottom: 4px;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.page-main, .page-main.container) {
    padding-top: 6px !important;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.nav-breadcrumbs, .nav-breadcrumbs .breadcrumbs, .nav-breadcrumbs .container, .breadcrumbs) {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    padding-block: 2px !important;
    min-height: 0;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.page-title-wrapper, .page-title-wrapper.category-title) {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    padding-top: 0 !important;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.columns.layout, .columns.layout.layout-2-col) {
    padding-inline: 10px !important;
  }

  /* Fase 3D.2.5: topo PLP mobile com ordem previsível e sem vazios excessivos. */
  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.toolbar, .toolbar-products) {
    margin-top: 6px !important;
    margin-bottom: 8px !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.columns.layout, .columns.layout.layout-2-col, .column.main, .products.wrapper, .products-grid, .products.list, .products.list.items) {
    max-width: 100%;
    box-sizing: border-box;
  }

  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.products-grid ol.products.list, ol.products.list.items) {
    margin-top: 8px !important;
  }
}

@media (max-width: 390px) {
  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.columns.layout, .columns.layout.layout-2-col) {
    padding-inline: 8px !important;
  }
}

@media (max-width: 360px) {
  body#html-body:is(.catalog-category-view, .catalogsearch-result-index) .page-wrapper :is(.page-main, .page-main.container) {
    padding-top: 4px !important;
  }
}

