/* VZAY 5.1.3 — My Account layout stabilization and responsive polish. */
body.woocommerce-account .vzay-content-layout,
body.woocommerce-account .vzay-entry-content,
body.woocommerce-account .vzay-woocommerce-wrap {
  max-width: 1480px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: clamp(96px, 9vw, 132px) clamp(16px, 4vw, 56px) 88px !important;
  overflow: visible !important;
}
body.woocommerce-account .vzay-page-header { display:none !important; }
body.woocommerce-account article.page,
body.woocommerce-account .entry-content { width:100% !important; max-width:none !important; }
body.woocommerce-account .woocommerce {
  display: block !important;
  max-width: none !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
}
body.woocommerce-account .woocommerce-notices-wrapper { width:100%; margin:0 0 18px; }

/* Robust top navigation: avoids fragile float/grid collisions from Woo defaults. */
body.woocommerce-account .woocommerce-MyAccount-navigation {
  position: sticky !important;
  z-index: 20;
  top: 88px !important;
  float: none !important;
  width: 100% !important;
  margin: 0 0 24px !important;
  padding: 8px !important;
  border: 1px solid rgba(35,72,63,.12) !important;
  border-radius: 22px !important;
  background: rgba(248,243,235,.92) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 42px rgba(48,40,34,.08) !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation:before { display:none !important; }
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display:flex !important;
  align-items:center;
  gap:6px !important;
  width:100%;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  overflow-x:auto;
  scrollbar-width:none;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display:none; }
body.woocommerce-account .woocommerce-MyAccount-navigation li { flex:1 0 auto; min-width:150px; margin:0 !important; }
body.woocommerce-account .woocommerce-MyAccount-navigation a {
  display:flex !important;
  justify-content:center;
  align-items:center;
  gap:9px;
  min-height:48px !important;
  padding:10px 15px !important;
  border-radius:15px !important;
  text-align:center;
  white-space:nowrap;
  color:var(--vzay-ink-soft) !important;
  font-size:.86rem !important;
  font-weight:750 !important;
  transform:none !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation a:before {
  position:static !important;
  width:auto !important;
  flex:0 0 auto;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
  background:var(--vzay-forest) !important;
  color:#fff7ef !important;
  box-shadow:0 10px 24px rgba(35,72,63,.16);
}
body.woocommerce-account .woocommerce-MyAccount-content {
  float:none !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
}

/* Dashboard hero. */
body.woocommerce-account .vzay-account-welcome {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(230px,320px) !important;
  align-items:center !important;
  gap:28px !important;
  min-height:250px;
  margin:0 0 18px !important;
  padding:clamp(26px,3.5vw,48px) !important;
}
body.woocommerce-account .vzay-account-welcome__identity {
  min-width:0;
  align-items:center !important;
}
body.woocommerce-account .vzay-account-welcome__identity > div:last-child { min-width:0; }
body.woocommerce-account .vzay-account-welcome__identity h1 {
  max-width:16ch;
  overflow-wrap:anywhere;
}
body.woocommerce-account .vzay-account-welcome__identity p {
  max-width:54ch;
  line-height:1.65;
}
body.woocommerce-account .vzay-account-welcome__status {
  width:100%; min-width:0 !important;
  padding:20px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:22px;
  background:rgba(255,255,255,.07);
}
body.woocommerce-account .vzay-account-welcome__status .vzay-button { width:100%; justify-content:center; }

/* Verification alert: no overlap, no tiny button. */
body.woocommerce-account .vzay-account-alert {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:18px !important;
  padding:20px 22px !important;
  overflow:hidden;
}
body.woocommerce-account .vzay-account-alert > div { min-width:0; }
body.woocommerce-account .vzay-account-alert p { overflow-wrap:anywhere; line-height:1.6; }
body.woocommerce-account .vzay-account-alert form { margin:0 !important; min-width:220px; }
body.woocommerce-account .vzay-account-alert form .vzay-button {
  width:100% !important; min-height:44px; padding:10px 16px !important; white-space:normal; line-height:1.25;
}

/* Stat cards align and never clip. */
body.woocommerce-account .vzay-account-stat-grid {
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:14px !important;
  margin:18px 0 24px !important;
}
body.woocommerce-account .vzay-account-stat-grid > a {
  min-width:0;
  min-height:120px;
  grid-template-columns:auto minmax(0,1fr) !important;
  align-content:center;
}
body.woocommerce-account .vzay-account-stat-grid strong,
body.woocommerce-account .vzay-account-stat-grid small { overflow-wrap:anywhere; }

body.woocommerce-account .vzay-account-dashboard-grid {
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr) !important;
  align-items:start;
}
body.woocommerce-account .vzay-account-panel { min-width:0; overflow:hidden; }
body.woocommerce-account .vzay-account-panel--quick nav a { min-width:0; }
body.woocommerce-account .vzay-account-panel--quick nav div { min-width:0; }
body.woocommerce-account .vzay-account-panel--quick nav strong,
body.woocommerce-account .vzay-account-panel--quick nav small { overflow-wrap:anywhere; }

/* Forms and endpoint pages. */
body.woocommerce-account .vzay-account-page-heading,
body.woocommerce-account .vzay-account-form-section,
body.woocommerce-account .vzay-account-address-card,
body.woocommerce-account .vzay-account-order-card { max-width:none !important; }
body.woocommerce-account .vzay-account-form-section input,
body.woocommerce-account .vzay-account-form-section select,
body.woocommerce-account .vzay-account-form-section textarea { width:100% !important; max-width:100% !important; box-sizing:border-box; }

@media (max-width:1100px) {
  body.woocommerce-account .vzay-content-layout,
  body.woocommerce-account .vzay-entry-content,
  body.woocommerce-account .vzay-woocommerce-wrap { padding-top:104px !important; }
  body.woocommerce-account .woocommerce-MyAccount-navigation { top:76px !important; }
  body.woocommerce-account .vzay-account-welcome { grid-template-columns:1fr !important; }
  body.woocommerce-account .vzay-account-welcome__status { max-width:520px; }
  body.woocommerce-account .vzay-account-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  body.woocommerce-account .vzay-account-dashboard-grid { grid-template-columns:1fr !important; }
}

@media (max-width:700px) {
  body.woocommerce-account .vzay-content-layout,
  body.woocommerce-account .vzay-entry-content,
  body.woocommerce-account .vzay-woocommerce-wrap { padding:86px 14px 64px !important; }
  body.woocommerce-account .woocommerce-MyAccount-navigation {
    position:relative !important;
    top:auto !important;
    margin-bottom:16px !important;
    border-radius:18px !important;
    padding:6px !important;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation li { min-width:max-content; }
  body.woocommerce-account .woocommerce-MyAccount-navigation a { min-height:43px !important; font-size:.78rem !important; padding:8px 12px !important; }
  body.woocommerce-account .vzay-account-welcome {
    min-height:0;
    padding:22px 18px !important;
    border-radius:24px !important;
  }
  body.woocommerce-account .vzay-account-welcome__identity {
    display:grid !important;
    grid-template-columns:72px minmax(0,1fr);
    gap:15px !important;
  }
  body.woocommerce-account .vzay-account-avatar { width:72px !important; height:72px !important; }
  body.woocommerce-account .vzay-account-welcome__identity h1 { font-size:clamp(2rem,10vw,3rem) !important; }
  body.woocommerce-account .vzay-account-welcome__identity p { grid-column:1/-1; }
  body.woocommerce-account .vzay-account-welcome__status { padding:16px; }
  body.woocommerce-account .vzay-account-alert { grid-template-columns:1fr !important; padding:17px !important; }
  body.woocommerce-account .vzay-account-alert form { min-width:0; width:100%; }
  body.woocommerce-account .vzay-account-stat-grid { grid-template-columns:1fr 1fr !important; gap:10px !important; }
  body.woocommerce-account .vzay-account-stat-grid > a { min-height:104px; padding:15px !important; }
  body.woocommerce-account .vzay-account-stat-grid strong { font-size:1.35rem !important; }
  body.woocommerce-account .vzay-account-panel { padding:20px 16px !important; border-radius:22px !important; }
  body.woocommerce-account .vzay-account-panel__head { display:grid !important; }
  body.woocommerce-account .vzay-account-recent-orders > a { grid-template-columns:1fr !important; gap:9px !important; }
}

@media (max-width:430px) {
  body.woocommerce-account .vzay-account-stat-grid { grid-template-columns:1fr !important; }
  body.woocommerce-account .vzay-account-welcome__identity { grid-template-columns:58px minmax(0,1fr); }
  body.woocommerce-account .vzay-account-avatar { width:58px !important; height:58px !important; }
}

/* v5.1.4 — drawer scroll containment fix */
body.vzay-menu-open { overflow: hidden !important; }
.vzay-mobile-panel:not([hidden]) {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: var(--vzay-drawer-top, 122px) !important;
  bottom: 0 !important;
  z-index: 9998 !important;
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.vzay-mobile-panel > .vzay-shell {
  min-height: max-content;
  padding-top: 20px !important;
  padding-bottom: 54px !important;
}
.vzay-mobile-panel .vzay-drawer-account-card,
.vzay-mobile-panel .vzay-mobile-priority-actions,
.vzay-mobile-panel .vzay-search-wrap--mobile,
.vzay-mobile-panel .vzay-nav--mobile,
.vzay-mobile-panel .vzay-discovery-drawer,
.vzay-mobile-panel .vzay-mobile-account {
  flex: 0 0 auto;
}
.vzay-mobile-panel .vzay-nav--mobile { margin-bottom: 22px; }
.vzay-mobile-panel .vzay-mobile-account { padding-bottom: 22px; }

@media (max-width: 782px) {
  .vzay-mobile-panel:not([hidden]) {
    top: var(--vzay-drawer-top, 104px) !important;
  }
  .vzay-mobile-panel > .vzay-shell {
    width: min(100% - 28px, 720px) !important;
    padding-top: 14px !important;
    padding-bottom: 72px !important;
  }
  .vzay-drawer-account-card {
    grid-template-columns: 58px minmax(0,1fr) !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  .vzay-drawer-account-card__avatar { width: 58px !important; height: 58px !important; }
  .vzay-drawer-account-card__copy h2 { font-size: 1.45rem !important; }
  .vzay-drawer-account-card__copy p { font-size: .84rem !important; }
  .vzay-drawer-account-card__actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 8px !important;
  }
  .vzay-drawer-account-card__actions .vzay-button { grid-column: 1 / -1; }
  .vzay-mobile-priority-actions {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .vzay-mobile-priority-actions > a { min-height: 108px !important; padding: 18px !important; }
  .vzay-nav--mobile .menu { grid-template-columns: 1fr !important; }
  .vzay-nav--mobile .menu > li > a { min-height: 48px; display:flex; align-items:center; }
}

/* v5.1.5 — logged-out account page + scroll safety */
html { min-height:100%; }
body.woocommerce-account {
  min-height:100vh !important;
  height:auto !important;
}
body.woocommerce-account:not(.vzay-menu-open):not(.vzay-drawer-open) {
  overflow-x:hidden !important;
  overflow-y:auto !important;
}
body.woocommerce-account main,
body.woocommerce-account .vzay-main,
body.woocommerce-account .vzay-content-layout,
body.woocommerce-account article.page,
body.woocommerce-account .entry-content,
body.woocommerce-account .woocommerce {
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
}

/* WooCommerce can output its own page title on some account configurations. */
body.woocommerce-account .woocommerce > h1:first-child,
body.woocommerce-account .entry-content > h1:first-child,
body.woocommerce-account .woocommerce-account-title,
body.woocommerce-account .page-title.entry-title { display:none !important; }

/* Logged-out account screen must never inherit the signed-in account grid. */
body.woocommerce-account:not(.logged-in) .woocommerce {
  display:block !important;
  width:100% !important;
  max-width:1180px !important;
  margin:0 auto !important;
  padding:0 !important;
}
body.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-navigation,
body.woocommerce-account:not(.logged-in) .woocommerce-MyAccount-content { display:none !important; }
body.woocommerce-account:not(.logged-in) .u-columns,
body.woocommerce-account:not(.logged-in) #customer_login {
  width:100% !important;
  max-width:1120px !important;
  margin:0 auto !important;
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:clamp(20px,3vw,34px) !important;
  align-items:start !important;
}
body.woocommerce-account:not(.logged-in) .u-column1,
body.woocommerce-account:not(.logged-in) .u-column2,
body.woocommerce-account:not(.logged-in) .col-1,
body.woocommerce-account:not(.logged-in) .col-2 {
  float:none !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
}
body.woocommerce-account:not(.logged-in) .u-column1 > h2,
body.woocommerce-account:not(.logged-in) .u-column2 > h2,
body.woocommerce-account:not(.logged-in) #customer_login > div > h2 {
  margin:0 0 14px !important;
  font-family:var(--vzay-serif) !important;
  font-size:clamp(2rem,3.6vw,3.4rem) !important;
  line-height:1 !important;
  color:var(--vzay-forest) !important;
}
body.woocommerce-account:not(.logged-in) form.login,
body.woocommerce-account:not(.logged-in) form.register,
body.woocommerce-account:not(.logged-in) form.woocommerce-ResetPassword {
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 !important;
  padding:clamp(24px,3vw,38px) !important;
  box-sizing:border-box !important;
  border-radius:28px !important;
}
body.woocommerce-account:not(.logged-in) form.login p,
body.woocommerce-account:not(.logged-in) form.register p,
body.woocommerce-account:not(.logged-in) form.woocommerce-ResetPassword p,
body.woocommerce-account:not(.logged-in) .form-row {
  float:none !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  margin:0 0 16px !important;
  box-sizing:border-box !important;
}
body.woocommerce-account:not(.logged-in) form label {
  display:block !important;
  width:100% !important;
  margin:0 0 7px !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  line-height:1.45 !important;
  font-weight:750 !important;
  color:var(--vzay-forest) !important;
}
body.woocommerce-account:not(.logged-in) form input[type="text"],
body.woocommerce-account:not(.logged-in) form input[type="email"],
body.woocommerce-account:not(.logged-in) form input[type="password"],
body.woocommerce-account:not(.logged-in) form input[type="tel"] {
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  min-height:52px !important;
  padding:12px 15px !important;
  box-sizing:border-box !important;
  font-size:1rem !important;
}
body.woocommerce-account:not(.logged-in) .password-input { display:block !important; width:100% !important; }
body.woocommerce-account:not(.logged-in) .woocommerce-form-login__rememberme {
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin-bottom:14px !important;
}
body.woocommerce-account:not(.logged-in) .woocommerce-form-login__rememberme input { width:auto !important; }
body.woocommerce-account:not(.logged-in) button.button,
body.woocommerce-account:not(.logged-in) .woocommerce-button {
  min-height:48px !important;
  padding:11px 22px !important;
}
body.woocommerce-account:not(.logged-in) .lost_password { margin-top:14px !important; }

/* If registration is disabled and only one column exists, use a comfortable single-column card. */
body.woocommerce-account:not(.logged-in) #customer_login:has(.u-column1:only-child),
body.woocommerce-account:not(.logged-in) .u-columns:has(.u-column1:only-child) {
  grid-template-columns:minmax(0,640px) !important;
  justify-content:center !important;
}

@media(max-width:780px){
  body.woocommerce-account:not(.logged-in) .u-columns,
  body.woocommerce-account:not(.logged-in) #customer_login {
    grid-template-columns:1fr !important;
    max-width:620px !important;
  }
  body.woocommerce-account:not(.logged-in) form.login,
  body.woocommerce-account:not(.logged-in) form.register,
  body.woocommerce-account:not(.logged-in) form.woocommerce-ResetPassword {
    padding:22px 18px !important;
    border-radius:22px !important;
  }
}
