/*
 * EquiPart front-end enhancements (Bootstrap + WP blocks).
 */

body.equipart {
  background: var(--wp--preset--color--paper-gray);
}

/* Apple-like typography rendering (especially noticeable in nav + footer). */
.equipart-header,
.equipart-header a,
.equipart-footer,
.equipart-footer a {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ensure common UI elements inherit the theme font (WooCommerce + WPForms). */
button,
input,
select,
textarea,
.woocommerce,
.wpforms-container {
  font-family: inherit;
}

/* Prevent horizontal scroll caused by full-bleed sections (e.g., hero cover using 100vw). */
html, body {
  width: 100%;
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
.wp-site-blocks { overflow-x: clip; }
@supports not (overflow: clip) {
  .wp-site-blocks { overflow-x: hidden; }
}

/* Softer, more natural underline (avoid the "heavy" look on long links). */
a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: auto;
}
a:hover { text-decoration-thickness: 1px; }

.wp-site-blocks > header,
.wp-site-blocks > main,
.wp-site-blocks > footer {
  width: 100%;
}

/* Header */
.equipart-header {
  background: var(--wp--preset--color--white);
}

/* Keep header content aligned with the same width as headings/content blocks */
.equipart-header .container {
  max-width: var(--wp--style--global--content-size);
}

.equipart-header .wp-block-site-logo img { max-height: 42px; width: auto; }
.equipart-header .wp-block-navigation a { font-weight: 600; }

/* Navigation spacing + dropdown styling */
.equipart-header .wp-block-navigation__container {
  gap: 1.25rem;
}
.equipart-header .wp-block-navigation a {
  padding: 0.35rem 0.2rem;
}
.equipart-header .wp-block-navigation .wp-block-navigation__submenu-container {
  background: #fff;
  border: 1px solid rgba(18,22,31,0.08);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 14px 34px rgba(0,0,0,0.14);
  min-width: 220px;
}
.equipart-header .wp-block-navigation .wp-block-navigation__submenu-container a {
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
}
.equipart-header .wp-block-navigation .wp-block-navigation__submenu-container a:hover {
  /* Match site accent (Bootstrap primary blue) */
  background: rgba(13,110,253,0.10);
}

/* Footer */
.equipart-footer .equipart-footer-nav {
  --equipart-footer-link-gap: 0.5rem;
}

/* Make footer links look like plain section links (no blue underline, no bullets) */
.equipart-footer .equipart-footer-nav a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 0.15rem 0;
}
.equipart-footer .equipart-footer-nav a:hover {
  text-decoration: none;
  opacity: 0.9;
}
.equipart-footer .equipart-footer-nav ul,
.equipart-footer .equipart-footer-nav .wp-block-navigation__container {
  list-style: none;
  padding-left: 0;
  margin: 0;
  gap: var(--equipart-footer-link-gap);
}
.equipart-footer .equipart-footer-nav li {
  margin: 0;
}

/* Hero */
.equipart-hero.wp-block-cover {
  /* Full-bleed cover image without 100vw (avoids subtle scrollbar/viewport shifts). */
  width: calc(100% + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
  max-width: none;
  margin-left: calc(-1 * var(--wp--style--root--padding-left));
  margin-right: calc(-1 * var(--wp--style--root--padding-right));
  border-radius: 0;
}

/* No dark overlay on the hero image (keep the photo crisp) */
.equipart-hero .wp-block-cover__background {
  opacity: 0 !important;
}

.equipart-hero .wp-block-cover__inner-container {
  max-width: 1320px;
  margin: 0 auto;
}
.equipart-hero h1 { letter-spacing: -0.02em; }
.equipart-hero .equipart-hero-card {
  /* Opacity is configurable via EquiPart theme options (or theme.json custom var) */
  background: rgba(255,255,255,var(--wp--custom--hero-card-opacity, 0.85));
  border-radius: 1.25rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  backdrop-filter: blur(6px);
}

/* Hero card alignment: keep the glass panel perfectly centered */
.equipart-hero .wp-block-group.container{
  max-width: var(--wp--style--global--content-size);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}
.equipart-hero .wp-block-group.container > .equipart-hero-card{
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  position: relative;
  left: 0;
  right: 0;
}

/* Cards */
.equipart-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid rgba(18,22,31,0.08);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* Keep the three landing-page CTA cards visually consistent
   (scope to the landing-page card group so other templates don't get forced tall cards) */
@media (min-width: 782px) {
  /* Make the three landing-page CTA cards keep equal heights across widths
     (matches the approach used on the Resellers template). */
  .equipart-cta-cards.wp-block-columns {
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
  }
  .equipart-cta-cards .wp-block-column { display: flex; }

.equipart-cta-cards .equipart-card {
    flex: 1;
    min-height: 320px;
    display: flex;
    flex-direction: column;
  }
  .equipart-cta-cards .equipart-card .wp-block-buttons { margin-top: auto; }

/* Keep a clean headline→description rhythm (avoid artificial gaps).
     Equal height is handled by flex + min-height; no need to reserve empty lines. */
  .equipart-cta-cards .equipart-card h3 {
    line-height: 1.2;
    text-wrap: balance;
    margin-bottom: 0.6rem;
  }
  .equipart-cta-cards .equipart-card p.equipart-muted {
    margin-top: 0;
  }
}
.equipart-card .equipart-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,110,253,0.10);
  font-size: 22px;
}
.equipart-card h3 { margin-top: 0.75rem; }

/* Buttons: align WP buttons with Bootstrap feel */
.wp-block-button .wp-block-button__link {
  border-radius: 0.75rem;
  padding: 0.75rem 1.15rem;
  font-weight: 700;
}

/* Forms focus styling (WP 6.9 ships form styling via theme.json but focus styles may be missing) */
input:focus, textarea:focus, select:focus, button:focus {
  outline: 3px solid rgba(13,110,253,0.25);
  outline-offset: 2px;
}

/* WooCommerce */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border-radius: 0.75rem;
  font-weight: 700;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-weight: 700; }

/* Small helpers */
.equipart-muted { color: rgba(18,22,31,0.70); }
.equipart-mono { font-family: var(--wp--preset--font-family--mono); }

.equipart-hero-quote { margin-top: 0.75rem; }

/* Form-first templates (consulenza / stock): keep the form centered and easy to scan */
.equipart-form-page .equipart-form-card{
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.equipart-form-page .equipart-form-notes{
  margin-top: 0.85rem;
}

/* Template H1 titles (optional helper class) */
.equipart-page-title{
  font-size: var(--wp--preset--font-size--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: var(--wp--preset--spacing--6);
}

/* Resellers: keep the 3 benefit cards stable while resizing (desktop/tablet) */
@media (min-width: 768px) {
  .equipart-reseller-benefits.wp-block-columns { align-items: stretch; }
  .equipart-reseller-benefits .wp-block-column { display: flex; }
  .equipart-reseller-benefits .equipart-card {
    flex: 1;
    min-height: 320px;
    display: flex;
    flex-direction: column;
  }
  /* Reserve vertical space so headings/wraps don't make the whole row jump */
  .equipart-reseller-benefits .equipart-card h3 {
    line-height: 1.2;
    min-height: calc(2 * 1.2em);
    text-wrap: balance;
  }
  .equipart-reseller-benefits .equipart-card .equipart-muted {
    line-height: 1.45;
    min-height: calc(4 * 1.45em);
  }
}

/* Mobile navigation (iPhone / responsive menu overlay) */
@media (max-width: 782px) {
  /* Center the responsive menu items instead of right aligning */
  .equipart-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    align-items: center;
    text-align: center;
    padding-top: 5.25rem; /* leave space for close button */
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

.equipart-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
  }

.equipart-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
  .equipart-header .wp-block-navigation__responsive-container.is-menu-open a.wp-block-navigation-item__content {
    font-size: 1.35rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

/* Give the close button breathing room */
  .equipart-header .wp-block-navigation__responsive-container-close {
    top: 1.25rem;
    right: 1.25rem;
    padding: 0.5rem;
  }
}
/* EquiPart: TranslatePress custom language switcher (flags only) */
.equipart-trp-switcher{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-left:10px;
}
.equipart-trp-switcher .equipart-trp-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:16px;
  border-radius:3px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.12);
  background:transparent;
}
.equipart-trp-switcher .equipart-trp-flag img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.equipart-trp-switcher .equipart-trp-flag.is-current{
  border-color: rgba(0,0,0,.28);
}

/* Header placement: keep compact and reorder on mobile */
.equipart-header .equipart-nav-area{
  gap:10px;
}
.equipart-header .equipart-nav-area > .wp-block-navigation{
  order:0;
}
.equipart-header .equipart-nav-area .equipart-trp-switcher{
  order:1;
}
@media (max-width: 782px){
  .equipart-header .equipart-nav-area > .wp-block-navigation{
    order:1;
  }
  .equipart-header .equipart-nav-area .equipart-trp-switcher{
    order:0;
    margin-left:0;
    margin-right:10px; /* left of hamburger */
  }
}

/* =========================================
   WooCommerce — eBay-like catalog feel
   ========================================= */

body.equipart-woocommerce {
  background: var(--wp--preset--color--paper-gray);
}

.equipart-shop-page {
  background: var(--wp--preset--color--paper-gray);
}

/* Shop sub-navigation (shop-only templates include this template part) */
.equipart-shop-subnav {
  background: #fff;
  border-bottom: 1px solid rgba(18,22,31,0.08);
}
.equipart-shop-subnav .container,
.equipart-shop-subnav .container-xxl {
  /* Keep the subnav items grouped (avoid the “too wide” spread on large screens). */
  max-width: var(--wp--style--global--content-size);
}
.equipart-shop-subnav__inner {
  gap: 1rem;
  padding-left: 0;
  padding-right: 0;
  align-items: center;
}
.equipart-shop-subnav__links {
  gap: 0.85rem;
}
.equipart-shop-subnav__links a {
  text-decoration: none;
  padding: 0.35rem 0.45rem;
  border-radius: 0.6rem;
  font-weight: 600;
}
.equipart-shop-subnav__links a:hover {
  background: rgba(18,22,31,0.06);
}

.equipart-shop-subnav__tools {
  gap: 0.75rem;
  align-items: center;
  margin-left: auto;
}
.equipart-shop-subnav__tools .wc-block-product-search {
  margin: 0;
  max-width: 420px;
}
.equipart-shop-subnav__tools .wc-block-product-search__field {
  border-radius: 999px;
  border: 1px solid rgba(18,22,31,0.18);
  padding: 0.55rem 0.9rem;
  width: min(360px, 42vw);
  min-width: 220px;
}

/* Shop search: keep a calm “marketplace” blue focus/hover (avoid Bootstrap-success green). */
.equipart-shop-subnav__tools .wc-block-product-search__field:focus,
.equipart-shop-page .wc-block-product-search__field:focus {
  border-color: rgba(6,106,171,0.55);
  outline: 3px solid rgba(6,106,171,0.20);
  outline-offset: 2px;
}
.equipart-shop-subnav__tools .wc-block-product-search__button,
.equipart-shop-page .wc-block-product-search__button {
  background: #ffffff;
  border: 1px solid rgba(18,22,31,0.18);
  color: rgba(18,22,31,0.85);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
}
.equipart-shop-subnav__tools .wc-block-product-search__button:hover,
.equipart-shop-page .wc-block-product-search__button:hover {
  background: rgba(6,106,171,0.08);
  border-color: rgba(6,106,171,0.35);
}

.equipart-shop-page .wc-block-product-search {
  max-width: 560px;
}
.equipart-shop-page .wc-block-product-search__fields {
  gap: 0.6rem;
}

@media (max-width: 600px) {
  .equipart-shop-subnav__tools .wc-block-product-search {
    max-width: none;
    width: 100%;
  }
  .equipart-shop-subnav__tools .wc-block-product-search__field {
    min-width: 0;
    width: 100%;
  }
}

.equipart-shop-page .container-xxl {
  padding-left: clamp(1rem, 2vw, 1.5rem);
  padding-right: clamp(1rem, 2vw, 1.5rem);
}

.equipart-shop-auth {
  margin-left: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.equipart-shop-auth a {
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 0.65rem;
  color: rgba(18,22,31,0.85);
}
.equipart-shop-auth a:hover {
  background: rgba(6,106,171,0.08);
  color: rgba(18,22,31,0.95);
}
.equipart-shop-auth a.is-current {
  background: rgba(6,106,171,0.12);
}

@media (max-width: 781px) {
  .equipart-shop-subnav__inner {
    padding-left: clamp(1rem, 2vw, 1.5rem);
    padding-right: clamp(1rem, 2vw, 1.5rem);
  }
  .equipart-shop-subnav__left,
  .equipart-shop-subnav__tools {
    width: 100%;
    justify-content: space-between;
  }
  .equipart-shop-subnav__tools .wc-block-product-search {
    flex: 1;
    max-width: none;
  }
  .equipart-shop-subnav__tools .wc-block-product-search__field {
    width: 100%;
    min-width: 0;
  }
}

/* Shared “panel” styling (cart/checkout/confirmation + single product shell) */
.equipart-checkout-shell,
.equipart-product-shell {
  background: #fff;
  border: 1px solid rgba(18,22,31,0.08);
  border-radius: 1.25rem;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.equipart-shop-breadcrumbs {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Breadcrumbs alignment: keep inside the same container rhythm (avoid “stuck to the left” feel). */
.equipart-shop-page .wc-block-breadcrumbs,
.equipart-shop-page .woocommerce-breadcrumb {
  margin-left: 0;
  padding-left: 0;
}

.equipart-shop-toolbar {
  padding: 0.25rem 0;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

/* Product grid cards */
.equipart-product-grid {
  margin-top: 0.75rem;
}

/* Ensure the Shop grid expands across the container (some Woo blocks default to flex / fixed widths). */
.wp-block-woocommerce-product-template.equipart-product-grid,
.wp-block-woocommerce-product-collection.equipart-product-grid,
ul.wc-block-grid__products.equipart-product-grid,
ul.products.equipart-product-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-block-woocommerce-product-template.equipart-product-grid > li,
ul.wc-block-grid__products.equipart-product-grid > li,
ul.products.equipart-product-grid > li {
  list-style: none;
  margin: 0;
}

.equipart-product-card {
  background: #fff;
  border: 1px solid rgba(18,22,31,0.10);
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  padding: 0.95rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.equipart-product-card:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}

.equipart-product-card .wp-block-woocommerce-product-image img {
  border-radius: 0.8rem;
}

.equipart-product-title {
  margin-top: 0.75rem;
}
.equipart-product-title a {
  text-decoration: none;
}
.equipart-product-title a:hover {
  text-decoration: underline;
  /* Keep underline elegant and consistent */
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.equipart-product-price {
  margin-top: 0.35rem;
  font-weight: 800;
  font-size: 1.1rem;
}

/* Keep the “buy” action anchored at the bottom like marketplace listings */
.equipart-product-button {
  margin-top: auto;
}

/* Woo blocks buttons: keep consistent with the theme */
.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  border-radius: 0.85rem !important;
  font-weight: 800 !important;
}

/* Inputs */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-select select {
  border-radius: 0.75rem;
}

/* Single product */
.equipart-product-h1 {
  letter-spacing: -0.01em;
}
.equipart-product-price-single {
  font-size: 1.45rem;
  font-weight: 900;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

/* =========================================
   WooCommerce — My Account (eBay-like)
========================================= */

/* The My Account layout is already wrapped in a Bootstrap container in the block template.
   Avoid adding a second “container” here, which can create extra side padding and
   width jank between endpoints (eg. Dashboard vs Downloads). */
body.woocommerce-account .woocommerce {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.woocommerce-account .woocommerce-notices-wrapper {
  width: 100%;
  margin: 0 0 1.25rem;
}

body.woocommerce-account .woocommerce-error,
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info {
  margin: 0;
  border-radius: 1rem;
}

/* Logged-out: keep login/register ready for 2-column layout, aligned to the left */
body.woocommerce-account.logged-out .equipart-myaccount-layout {
  display: block !important;
}

@media (min-width: 768px) {
  body.woocommerce-account.logged-out #customer_login {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    gap: 2.25rem;
    align-items: flex-start;
    justify-content: flex-start;
  }

body.woocommerce-account.logged-out #customer_login .u-column1,
  body.woocommerce-account.logged-out #customer_login .u-column2 {
    flex: 0 0 440px;
    max-width: 440px;
  }
}

body.woocommerce-account form.woocommerce-form-login,
body.woocommerce-account form.woocommerce-form-register {
  margin: 1.25rem 0 0;
  /* Prevent the login box from stretching across very wide viewports.
     This also leaves room for the registration box on the right when enabled. */
  width: 100%;
  max-width: 440px;
}

body.woocommerce-account .woocommerce form .form-row {
  margin: 0 0 1rem;
}

body.woocommerce-account .woocommerce form .input-text,
body.woocommerce-account .woocommerce form input[type="text"],
body.woocommerce-account .woocommerce form input[type="email"],
body.woocommerce-account .woocommerce form input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 0.85rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

body.woocommerce-account .woocommerce form .input-text:focus,
body.woocommerce-account .woocommerce form input[type="text"]:focus,
body.woocommerce-account .woocommerce form input[type="email"]:focus,
body.woocommerce-account .woocommerce form input[type="password"]:focus {
  outline: none;
  border-color: rgba(6,106,171,.65);
  box-shadow: 0 0 0 3px rgba(6,106,171,.18);
}

body.woocommerce-account .woocommerce form .button,
body.woocommerce-account .woocommerce button.button {
  border-radius: 0.9rem;
  padding: 0.8rem 1.15rem;
  border: none;
  background: #066aab;
  color: #fff;
  transition: transform .12s ease, background-color .15s ease;
}

body.woocommerce-account .woocommerce form .button:hover,
body.woocommerce-account .woocommerce button.button:hover {
  background: #055d96;
}

body.woocommerce-account .woocommerce a:hover {
  color: #055d96;
}

/* Keep underline consistent and light on account pages */
body.woocommerce-account .woocommerce a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
body.woocommerce-account .woocommerce a:hover {
  text-decoration-thickness: 1px;
}

/* WooCommerce notices (Blocks + classic): prevent the brief “thick/black” border flash. */
.wc-block-components-notice-banner,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  box-shadow: none !important;
  outline: none !important;
  border-width: 1px !important;
}
.wc-block-components-notice-banner:focus,
.wc-block-components-notice-banner:focus-visible {
  outline: none !important;
}
.wc-block-components-notice-banner.is-error {
  border-color: rgba(214, 54, 55, 0.35) !important;
}

/* Logged-in: modern 2-column layout */
@media (min-width: 768px) {
  body.woocommerce-account .equipart-myaccount-layout {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
  }

  /* Keep the right column width stable even when it only contains a small notice (e.g. empty Downloads). */
  body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-content {
    flex: 1 1 auto;
    min-width: 0;
  }

  body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-navigation {
    flex: 0 0 320px;
  }
}

/* Remove the extra left/right padding added by the editor wrapper on Woo account pages. */
body.woocommerce-account .entry-content.wp-block-post-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Make “empty state” notices stretch full width so the column doesn’t look squeezed. */
body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-content .woocommerce-message,
body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-content .woocommerce-error,
body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-content .woocommerce-info,
body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-content .wc-block-components-notice-banner {
  width: 100% !important;
  max-width: none !important;
}

/* My Account: reduce excessive inner padding so the surface aligns visually
   with other container-xxl sections and removes the large empty side areas. */
body.woocommerce-account .equipart-myaccount-surface {
  padding: 1.25rem !important;
}

@media (min-width: 768px) {
  body.woocommerce-account .equipart-myaccount-surface {
    padding: 2rem !important;
  }
}

/* Safari/iOS: prevent brief SVG/image flicker during navigation/refresh. */
body.woocommerce-account .woocommerce-MyAccount-navigation svg,
body.woocommerce-account .woocommerce-MyAccount-navigation img,
body.woocommerce-account .equipart-myaccount-profile svg,
body.woocommerce-account .equipart-myaccount-profile img,
body.woocommerce-account .equipart-myaccount-tiles svg,
body.woocommerce-account .equipart-myaccount-tiles img {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
  /* Override Woo defaults (float/width) so it aligns perfectly with container-xxl */
  float: none !important;
  width: auto !important;
  flex: 0 0 320px;
  max-width: 320px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: none;
}

body.woocommerce-account .woocommerce-MyAccount-content {
  /* Override Woo defaults (float/width) so the content column does not shrink on
     endpoints with little content (e.g. Downloads). */
  float: none !important;
  width: auto !important;
  max-width: none !important;
}

body.woocommerce-account .equipart-myaccount-layout .woocommerce-MyAccount-content {
  flex: 1 1 auto;
  min-width: 0;
}

.equipart-myaccount-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  margin: 0 0 1rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.06);
}

.equipart-myaccount-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: #0b2240;
  color: #fff;
}

.equipart-myaccount-meta {
  min-width: 0;
}

.equipart-myaccount-name {
  font-weight: 700;
  line-height: 1.2;
}

.equipart-myaccount-email {
  opacity: 0.7;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipart-myaccount-logout {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  text-decoration: none;
  color: rgba(0,0,0,0.75);
}

.equipart-myaccount-logout:hover {
  color: #055d96;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  /* tighter vertical rhythm */
  gap: 0.15rem;
  /* stable height so the profile block can sit at the bottom without jumps */
  min-height: 520px;
}

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

body.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  /* slightly tighter than before (reduces perceived gaps) */
  padding: 0.5rem 0.85rem;
  border-radius: 0.95rem;
  /* Navigation items should look like buttons/labels, not underlined links. */
  text-decoration: none !important;
  color: rgba(0,0,0,0.85);
  transition: background-color .15s ease, color .15s ease;
}

/* Monochrome icons for My Account navigation */
body.woocommerce-account .woocommerce-MyAccount-navigation .equipart-myaccount-nav-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: rgba(0,0,0,0.55);
}
body.woocommerce-account .woocommerce-MyAccount-navigation .equipart-myaccount-nav-icon svg {
  width: 18px;
  height: 18px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
  background: rgba(6,106,171,0.10);
  text-decoration: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
  background: rgba(6,106,171,0.14);
  color: #0b2240;
  font-weight: 700;
  text-decoration: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-content {
  /* Borderless content area (outer wrapper already provides the panel). */
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.5rem 0 0;
  box-shadow: none;
}

.equipart-myaccount-welcome h2 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
}

.equipart-myaccount-welcome p {
  margin: 0;
  opacity: 0.75;
}

.equipart-myaccount-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.equipart-myaccount-tile {
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1.15rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.equipart-myaccount-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.08);
  border-color: rgba(6,106,171,0.25);
}

.equipart-myaccount-tile-icon svg {
  width: 42px;
  height: 42px;
  display: block;
  color: rgba(0,0,0,0.75);
}

.equipart-myaccount-tile-label {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.equipart-myaccount-tile-sub {
  opacity: 0.7;
  font-size: 0.95rem;
}

/* === 1.0.4.10 – Woo / My Account refinements ================================ */

/* Reduce layout shift when navigating between My Account endpoints. */
body.woocommerce-account .equipart-myaccount-layout {
  align-items: stretch;
}
body.woocommerce-account .woocommerce-MyAccount-content {
  min-height: 60vh;
}

/* Ensure notices span the available column width (prevents narrow/centered banners on sparse endpoints). */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-message,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-error,
body.woocommerce-account .woocommerce-MyAccount-content .wc-block-components-notice-banner {
  width: 100%;
  max-width: 100%;
}

/* Keep the page width stable on desktop (prevents a ~15–20px “dance” when the
   vertical scrollbar appears/disappears during initial load / endpoint switches). */
html {
  scrollbar-gutter: stable;
}
@media (min-width: 992px) {
  body.woocommerce-account {
    overflow-y: scroll;
  }
}

/* Logged-in My Account: no extra inner padding inside the panel. */
body.logged-in.woocommerce-account .equipart-myaccount-layout {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Logged-out My Account (login/register): keep comfortable inner padding
   so the title/form don't stick to the bubble edge. */
body.woocommerce-account:not(.logged-in) .woocommerce {
  padding: 1.75rem;
}

/* Keep the outer Woo wrapper neutral on logged-in My Account to avoid width/padding shifts. */
body.woocommerce-account.logged-in .woocommerce {
  padding: 0;
  margin: 0;
  max-width: none;
}



/* Logged-out My Account (login/register): restore a comfortable inner padding
   so the login form doesn't feel glued to the panel edge. */
body:not(.logged-in).woocommerce-account .equipart-myaccount-bubble {
  padding: 1.25rem !important;
}
@media (min-width: 768px) {
  body:not(.logged-in).woocommerce-account .equipart-myaccount-bubble {
    padding: 2rem !important;
  }
}

/* Center the login/register columns inside the container, with sensible widths.
   (When registration is disabled, Woo only outputs the login column.) */
body:not(.logged-in).woocommerce-account .woocommerce #customer_login {
  max-width: 1040px;
  margin: 0 auto;
}
body:not(.logged-in).woocommerce-account .woocommerce #customer_login .u-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}
body:not(.logged-in).woocommerce-account .woocommerce #customer_login .u-column1,
body:not(.logged-in).woocommerce-account .woocommerce #customer_login .u-column2 {
  flex: 1 1 420px;
  max-width: 520px;
}

/* Prevent the login form from expanding infinitely on wide screens. */
body:not(.logged-in).woocommerce-account .woocommerce form.woocommerce-form-login,
body:not(.logged-in).woocommerce-account .woocommerce form.woocommerce-form-register {
  width: 100%;
  max-width: 520px;
}

/* WooCommerce catalog sorting – match site accent (blue) and improve height. */
.woocommerce .woocommerce-ordering select,
.woocommerce-page .woocommerce-ordering select,
.wp-block-woocommerce-catalog-sorting select,
.wc-block-catalog-sorting select,
.woocommerce .woocommerce-ordering .orderby {
  height: 44px;
  padding: 0.5rem 2.25rem 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background-color: #fff;
  line-height: 1.1;
}

.woocommerce .woocommerce-ordering select:hover,
.woocommerce-page .woocommerce-ordering select:hover,
.wp-block-woocommerce-catalog-sorting select:hover,
.wc-block-catalog-sorting select:hover {
  border-color: rgba(13,110,253,0.55);
}

.woocommerce .woocommerce-ordering select:focus,
.woocommerce-page .woocommerce-ordering select:focus,
.wp-block-woocommerce-catalog-sorting select:focus,
.wc-block-catalog-sorting select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.18);
  outline: 0;
}
