/**
 * WW ElectricalXShop v4.0.1 — Visual Standardisation Layer
 * Baseline: v4.0.0 Enterprise Commerce Completion Candidate
 * Typography lineage: v3.4.1 Minimum 12px.
 *
 * Purpose:
 * - standardise horizontal gutters and max widths
 * - standardise vertical section rhythm
 * - ensure visible separation between adjacent CTAs
 * - standardise form/card spacing and responsive stacking
 * - preserve locked header proportions
 */

:root{
  --wwx-layout-max:1440px;
  --wwx-gutter-desktop:32px;
  --wwx-gutter-tablet:24px;
  --wwx-gutter-mobile:16px;

  --wwx-space-1:8px;
  --wwx-space-2:16px;
  --wwx-space-3:24px;
  --wwx-space-4:32px;
  --wwx-space-5:40px;
  --wwx-space-6:48px;
  --wwx-space-8:64px;

  --wwx-control-h:48px;
  --wwx-cta-gap:12px;
  --wwx-section-gap:48px;
  --wwx-card-pad:24px;
  --wwx-card-radius:12px;
  --wwx-border:#dce3ec;
}

/* ==========================================================
   GLOBAL CONTENT WIDTH
   Do not alter the locked-header composition.
   ========================================================== */
.wwt-main > .wwt-shell,
.wwx-home > section > .wwt-shell,
.wwt-footer > .wwt-shell,
.wwx-enterprise-page,
.wwx-category-commerce > .wwt-shell,
.wwx-single-product-page > .wwt-shell{
  width:min(var(--wwx-layout-max),calc(100% - (var(--wwx-gutter-desktop) * 2)))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

.wwt-main{
  padding-top:var(--wwx-space-4)!important;
  padding-bottom:var(--wwx-space-6)!important;
}

/* Text-heavy normal pages retain readable line length while their page shell is aligned. */
.wwt-content{
  max-width:960px!important;
}

/* ==========================================================
   SECTION RHYTHM
   ========================================================== */
.wwx-home .wwx-section,
.wwx-home .wwx-brand-offers,
.wwx-home .wwx-mini-campaigns,
.wwx-home .wwx-trade-banner{
  margin-top:0!important;
  margin-bottom:0!important;
  padding-top:var(--wwx-space-6)!important;
  padding-bottom:var(--wwx-space-6)!important;
}

.wwx-home .wwx-benefits{
  margin-top:0!important;
  margin-bottom:0!important;
}

.wwx-category-commerce .wwx-category-heading{
  margin-bottom:var(--wwx-space-3)!important;
}

.wwx-subcategory-strip,
.wwx-enterprise-subcats{
  margin-top:var(--wwx-space-2)!important;
  margin-bottom:var(--wwx-space-3)!important;
}

.wwx-sponsored-category-top,
.wwx-sponsored-category-inline,
.wwx-pdp-sponsor,
.wwx-pdp-merch-section,
.wwx-enterprise-shop-trust{
  margin-top:var(--wwx-space-3)!important;
  margin-bottom:var(--wwx-space-3)!important;
}

.wwx-category-toolbar{
  margin-top:var(--wwx-space-2)!important;
  margin-bottom:var(--wwx-space-3)!important;
  min-height:56px;
  padding:var(--wwx-space-1) var(--wwx-space-2)!important;
  gap:var(--wwx-space-2)!important;
}

.wwx-category-layout{
  gap:var(--wwx-space-3)!important;
}

.wwx-pdp-top{
  gap:var(--wwx-space-3)!important;
  padding-top:var(--wwx-space-2)!important;
  padding-bottom:var(--wwx-space-4)!important;
}

.wwx-pdp-details{
  gap:var(--wwx-space-3)!important;
  margin-top:var(--wwx-space-4)!important;
}

.wwx-pdp-trust-strip{
  margin-top:var(--wwx-space-2)!important;
  margin-bottom:var(--wwx-space-4)!important;
}

.wwx-pdp-merch-section{
  margin-top:var(--wwx-space-6)!important;
}

/* ==========================================================
   CTA / BUTTON SEPARATION
   Never visually fuse two adjacent CTAs.
   ========================================================== */
.wwx-cart-extra-actions,
.wwx-order-support-actions,
.wwx-empty-actions,
.wwx-b2b-actions,
.wwx-rfq-actions,
.wwx-notfound-actions,
.wwx-buy-actions,
.wwx-pdp-secondary-actions,
.wwx-enterprise-product-buttons,
.wwx-enterprise-card-actions,
.wwx-enterprise-single-actions,
.wwx-filter-actions,
.wwx-history-actions,
.wwx-shipment-actions,
.wwx-phase4-actions,
.wwx-ai-actions,
.wwx-hero-actions,
.wwx-trade-actions{
  gap:var(--wwx-cta-gap)!important;
}

.wwx-pdp-buy-now{
  margin-top:var(--wwx-cta-gap)!important;
}

.wwx-pdp-secondary-actions{
  margin-top:var(--wwx-cta-gap)!important;
}

.wwx-pdp-business-link{
  margin-top:var(--wwx-space-1)!important;
}

.wwx-cart-extra-actions,
.wwx-order-support-actions,
.wwx-empty-actions,
.wwx-shipment-actions,
.wwx-phase4-actions{
  margin-top:var(--wwx-space-2)!important;
  margin-bottom:var(--wwx-space-2)!important;
}

/* Adjacent generic buttons/CTAs inside known commerce action regions. */
.wwx-commerce-page-intro + *,
.wwx-checkout-intro + *,
.wwx-thankyou-actions + *{
  margin-top:var(--wwx-space-3);
}

.woocommerce .button + .button,
.woocommerce button.button + button.button,
.woocommerce a.button + a.button{
  margin-left:var(--wwx-space-1);
}

/* Do not add artificial space to product-card single action rows. */
.wwx-product-card .button + .button{
  margin-left:0;
}

/* ==========================================================
   CARDS / PANELS / FORMS
   ========================================================== */
.wwx-pdp-buy-card,
.wwx-pdp-trade-card,
.wwx-pdp-help-card,
.wwx-enterprise-product,
.wwx-enterprise-empty,
.wwx-enterprise-login,
.wwx-rewards-card,
.wwx-gift-balance,
.wwx-seller-kpis article,
.wwx-commerce-page-intro,
.wwx-checkout-intro,
.wwx-cart-service-note,
.wwx-thankyou-actions,
.wwx-order-card,
.wwx-return-card,
.wwx-review-card,
.wwx-history-card{
  border-radius:var(--wwx-card-radius)!important;
}

.wwx-enterprise-page > header,
.wwx-commerce-page-intro,
.wwx-checkout-intro{
  margin-bottom:var(--wwx-space-4)!important;
}

.woocommerce form .form-row{
  margin-bottom:var(--wwx-space-2)!important;
}

.woocommerce form .form-row label{
  margin-bottom:var(--wwx-space-1)!important;
}

.woocommerce input.input-text,
.woocommerce select,
.woocommerce textarea,
.wwx-seller-apply input,
.wwx-seller-apply textarea,
.wwx-gift-balance input{
  min-height:var(--wwx-control-h);
  border-radius:8px!important;
}

.woocommerce textarea,
.wwx-seller-apply textarea{
  padding:12px!important;
}

/* Checkout columns get reliable breathing room. */
.woocommerce-checkout .col2-set{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:var(--wwx-space-4)!important;
  width:100%!important;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2{
  float:none!important;
  width:100%!important;
}

.woocommerce-checkout #order_review_heading{
  margin-top:var(--wwx-space-5)!important;
  margin-bottom:var(--wwx-space-2)!important;
}

.woocommerce-checkout #order_review{
  padding:var(--wwx-space-3)!important;
  border:1px solid var(--wwx-border);
  border-radius:var(--wwx-card-radius);
  background:#fff;
}

.woocommerce-cart .cart_totals{
  padding:var(--wwx-space-3);
  border:1px solid var(--wwx-border);
  border-radius:var(--wwx-card-radius);
}

/* My Account: stable navigation/content separation. */
.woocommerce-account .woocommerce{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:var(--wwx-space-4);
  align-items:start;
}

.woocommerce-account .woocommerce-MyAccount-navigation{
  width:100%!important;
  float:none!important;
}

.woocommerce-account .woocommerce-MyAccount-content{
  width:100%!important;
  float:none!important;
  min-width:0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul{
  margin:0!important;
  padding:var(--wwx-space-1)!important;
  border:1px solid var(--wwx-border);
  border-radius:var(--wwx-card-radius);
  background:#fff;
}

.woocommerce-account .woocommerce-MyAccount-navigation li{
  margin:0!important;
}

.woocommerce-account .woocommerce-MyAccount-navigation a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 12px!important;
  border-radius:8px;
}

/* ==========================================================
   CATEGORY / SEARCH
   ========================================================== */
.wwx-intelligent-filters{
  padding:var(--wwx-space-2)!important;
  border-radius:var(--wwx-card-radius)!important;
}

.wwx-intelligent-filters form > section{
  padding-top:var(--wwx-space-2)!important;
  padding-bottom:var(--wwx-space-2)!important;
}

.wwx-intelligent-filters form > section + section{
  border-top:1px solid var(--wwx-border);
}

.wwx-price-fields{
  gap:var(--wwx-space-1)!important;
}

.wwx-subcategory-strip{
  gap:var(--wwx-space-2)!important;
}

.wwx-subcategory-strip > a{
  padding:var(--wwx-space-2)!important;
  border-radius:var(--wwx-card-radius)!important;
}

.wwx-enterprise-subcat-track{
  gap:var(--wwx-space-2)!important;
}

.wwx-enterprise-subcat-track a{
  padding:var(--wwx-space-2)!important;
}

.search-results .wwx-category-results,
.wwx-category-results{
  min-width:0;
}

/* ==========================================================
   PRODUCT GRID / PRODUCT CARDS
   ========================================================== */
.woocommerce ul.products,
.woocommerce-page ul.products{
  row-gap:var(--wwx-space-3)!important;
}

.wwx-enterprise-grid{
  gap:var(--wwx-space-2)!important;
}

.wwx-enterprise-product{
  padding:var(--wwx-space-2)!important;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.wwt-footer{
  margin-top:0!important;
}

.wwt-footer-grid{
  gap:var(--wwx-space-4)!important;
  padding-top:var(--wwx-space-6)!important;
  padding-bottom:var(--wwx-space-5)!important;
}

.wwt-footer-bottom{
  padding-top:var(--wwx-space-3)!important;
  padding-bottom:var(--wwx-space-3)!important;
}

/* ==========================================================
   TABLET
   ========================================================== */
@media (max-width:1180px){
  .wwt-main > .wwt-shell,
  .wwx-home > section > .wwt-shell,
  .wwt-footer > .wwt-shell,
  .wwx-enterprise-page,
  .wwx-category-commerce > .wwt-shell,
  .wwx-single-product-page > .wwt-shell{
    width:min(var(--wwx-layout-max),calc(100% - (var(--wwx-gutter-tablet) * 2)))!important;
  }

  .wwx-home .wwx-section,
  .wwx-home .wwx-brand-offers,
  .wwx-home .wwx-mini-campaigns,
  .wwx-home .wwx-trade-banner{
    padding-top:var(--wwx-space-5)!important;
    padding-bottom:var(--wwx-space-5)!important;
  }

  .woocommerce-account .woocommerce{
    grid-template-columns:220px minmax(0,1fr);
    gap:var(--wwx-space-3);
  }

  .woocommerce-checkout .col2-set{
    gap:var(--wwx-space-3)!important;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */
@media (max-width:767px){
  .wwt-main > .wwt-shell,
  .wwx-home > section > .wwt-shell,
  .wwt-footer > .wwt-shell,
  .wwx-enterprise-page,
  .wwx-category-commerce > .wwt-shell,
  .wwx-single-product-page > .wwt-shell{
    width:calc(100% - (var(--wwx-gutter-mobile) * 2))!important;
  }

  .wwt-main{
    padding-top:var(--wwx-space-3)!important;
    padding-bottom:var(--wwx-space-4)!important;
  }

  .wwx-home .wwx-section,
  .wwx-home .wwx-brand-offers,
  .wwx-home .wwx-mini-campaigns,
  .wwx-home .wwx-trade-banner{
    padding-top:var(--wwx-space-4)!important;
    padding-bottom:var(--wwx-space-4)!important;
  }

  .wwx-category-layout,
  .wwx-pdp-details{
    gap:var(--wwx-space-2)!important;
  }

  .wwx-category-toolbar{
    gap:var(--wwx-space-1)!important;
    padding:var(--wwx-space-1)!important;
  }

  .wwx-cart-extra-actions,
  .wwx-order-support-actions,
  .wwx-empty-actions,
  .wwx-b2b-actions,
  .wwx-rfq-actions,
  .wwx-notfound-actions,
  .wwx-buy-actions,
  .wwx-pdp-secondary-actions,
  .wwx-enterprise-single-actions,
  .wwx-filter-actions,
  .wwx-history-actions,
  .wwx-shipment-actions,
  .wwx-phase4-actions{
    grid-template-columns:1fr!important;
    flex-direction:column!important;
    gap:var(--wwx-cta-gap)!important;
  }

  .woocommerce .button + .button,
  .woocommerce button.button + button.button,
  .woocommerce a.button + a.button{
    margin-left:0;
    margin-top:var(--wwx-space-1);
  }

  .woocommerce-checkout .col2-set{
    display:block!important;
  }

  .woocommerce-checkout .col2-set .col-2{
    margin-top:var(--wwx-space-4)!important;
  }

  .woocommerce-checkout #order_review{
    padding:var(--wwx-space-2)!important;
  }

  .woocommerce-account .woocommerce{
    display:block;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation{
    margin-bottom:var(--wwx-space-3)!important;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation ul{
    display:flex;
    gap:var(--wwx-space-1);
    overflow-x:auto;
    padding:var(--wwx-space-1)!important;
    scroll-snap-type:x proximity;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li{
    flex:0 0 auto;
    scroll-snap-align:start;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation a{
    min-height:48px;
    white-space:nowrap;
  }

  .wwt-footer-grid{
    gap:var(--wwx-space-4)!important;
    padding-top:var(--wwx-space-4)!important;
    padding-bottom:var(--wwx-space-4)!important;
  }
}

/* Keep reduced motion preference intact. */
@media (prefers-reduced-motion:reduce){
  html:focus-within{
scroll-behavior:auto}
}
