/* Zen Feng Customer Center — commercial account design system. */
.zf-customer-center .woocommerce {
  --zfcc-paper: #faf6f0;
  --zfcc-surface: #fffdfa;
  --zfcc-ink: #292723;
  --zfcc-muted: #645f57;
  --zfcc-cinnabar: #9a2820;
  --zfcc-cinnabar-deep: #762018;
  --zfcc-gold: #8e732c;
  --zfcc-gold-soft: #f6efdf;
  --zfcc-blue: #315f7f;
  --zfcc-blue-deep: #244f70;
  --zfcc-line: #ddcfae;
  --zfcc-focus: #0e6572;
  width: min(100%, 1140px);
  max-width: 1140px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: clamp(2rem, 4.5vw, 4rem) clamp(1rem, 3.5vw, 2.25rem) calc(3rem + env(safe-area-inset-bottom));
  color: var(--zfcc-ink);
  scroll-padding-block: calc(5.5rem + env(safe-area-inset-top)) calc(7rem + env(safe-area-inset-bottom));
}
.zf-customer-center .woocommerce *,
.zf-customer-center .woocommerce *::before,
.zf-customer-center .woocommerce *::after { box-sizing: border-box; }
.zf-customer-center .woocommerce::after { display: block; clear: both; content: ""; }
.zf-customer-center .woocommerce > .woocommerce-notices-wrapper,
.zf-customer-center .woocommerce > .woocommerce-form-login,
.zf-customer-center .woocommerce > .woocommerce-form-register,
.zf-customer-center .woocommerce > .woocommerce-MyAccount-content { max-width: 100%; }

/* Authenticated shell: one compact task rail and one content surface. */
.zf-customer-center .woocommerce-MyAccount-navigation,
.zf-customer-center .woocommerce-MyAccount-content { float: none; width: auto; }
.zf-customer-center .woocommerce-MyAccount-navigation {
  float: left;
  width: min(100%, 242px);
  margin: 0;
  padding: .7rem;
  border: 1px solid var(--zfcc-line);
  border-radius: 14px;
  background: rgba(255, 253, 250, .96);
  box-shadow: 0 8px 28px rgba(66, 47, 24, .05);
}
.zf-customer-center .woocommerce-MyAccount-navigation ul {
  display: grid;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.zf-customer-center .woocommerce-MyAccount-navigation li { margin: 0; }
.zf-customer-center .woocommerce-MyAccount-navigation a {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: .65rem;
  padding: .7rem .8rem;
  color: var(--zfcc-blue);
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.zf-customer-center .woocommerce-MyAccount-navigation a::before {
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  place-items: center;
  color: var(--zfcc-gold);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: .82rem;
  content: "•";
}
.zf-customer-center .woocommerce-MyAccount-navigation-link--dashboard a::before { content: "概"; }
.zf-customer-center .woocommerce-MyAccount-navigation-link--edit-account a::before { content: "帳"; }
.zf-customer-center .woocommerce-MyAccount-navigation-link--edit-address a::before { content: "址"; }
.zf-customer-center .woocommerce-MyAccount-navigation-link--customer-logout { margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--zfcc-line); }
.zf-customer-center .woocommerce-MyAccount-navigation-link--customer-logout a { color: #76433a; }
.zf-customer-center .woocommerce-MyAccount-navigation-link--customer-logout a::before { content: "退"; }
.zf-customer-center .woocommerce-MyAccount-navigation .is-active a,
.zf-customer-center .woocommerce-MyAccount-navigation a:hover {
  color: #fff;
  border-color: var(--zfcc-cinnabar);
  background: var(--zfcc-cinnabar);
}
.zf-customer-center .woocommerce-MyAccount-navigation .is-active a::before,
.zf-customer-center .woocommerce-MyAccount-navigation a:hover::before { color: #fff4d6; }
.zf-customer-center .woocommerce-MyAccount-content { min-width: 0; margin-left: min(100%, 270px); }

/* Anonymous authentication: preserve exactly one theme-owned mobile switcher. */
.zf-customer-center #customer_login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: start;
}
.zf-customer-center #customer_login .u-column1,
.zf-customer-center #customer_login .u-column2,
.zf-customer-center .woocommerce-form-login,
.zf-customer-center .woocommerce-form-register { float: none; width: auto; margin: 0; }
.zf-customer-center #customer_login .u-column1,
.zf-customer-center #customer_login .u-column2 {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--zfcc-line);
  border-radius: 14px;
  background: var(--zfcc-surface);
  box-shadow: 0 8px 28px rgba(66, 47, 24, .05);
}
.zf-customer-center #customer_login h2 {
  margin: 0 0 1rem;
  color: var(--zfcc-cinnabar);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.3;
}
.zf-customer-center .zfcc-account-tabs { display: none !important; }

/* Dashboard surface and meaningful profile-completion states. */
.zfcc-dashboard { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); }
.zfcc-dashboard > * { min-width: 0; }
.zfcc-dashboard__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.45rem, 3.5vw, 2.3rem);
  border: 1px solid var(--zfcc-line);
  border-radius: 14px;
  background: linear-gradient(118deg, rgba(255,253,250,.98), rgba(248,241,226,.92));
  box-shadow: 0 10px 30px rgba(66, 47, 24, .06);
}
.zfcc-dashboard__hero-copy { max-width: 670px; }
.zfcc-eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .6rem;
  color: var(--zfcc-gold);
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.35;
}
.zfcc-eyebrow::before { width: 22px; height: 2px; flex: 0 0 22px; background: var(--zfcc-gold); content: ""; }
.zfcc-dashboard__title,
.zfcc-endpoint-intro h2 {
  margin: 0;
  color: var(--zfcc-cinnabar);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 650;
  line-height: 1.28;
}
.zfcc-dashboard__lead,
.zfcc-endpoint-intro > p:not(.zfcc-eyebrow) {
  max-width: 62ch;
  margin: .8rem 0 0;
  color: var(--zfcc-muted);
  line-height: 1.8;
}
.zfcc-dashboard__status {
  display: grid;
  min-width: 252px;
  margin: 0;
  border-left: 1px solid var(--zfcc-line);
}
.zfcc-dashboard__status div { padding: .55rem 0 .55rem 1.15rem; }
.zfcc-dashboard__status div + div { border-top: 1px solid var(--zfcc-line); }
.zfcc-dashboard__status dt { color: var(--zfcc-muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; }
.zfcc-dashboard__status dd { margin: .2rem 0 0; color: var(--zfcc-blue); font-weight: 750; }
.zfcc-dashboard__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.zfcc-card {
  display: flex;
  min-width: 0;
  min-height: 252px;
  flex-direction: column;
  padding: clamp(1.3rem, 2.8vw, 1.65rem);
  border: 1px solid var(--zfcc-line);
  border-radius: 14px;
  background: var(--zfcc-surface);
  box-shadow: 0 8px 28px rgba(66, 47, 24, .05);
}
.zfcc-card--profile { border-color: rgba(154, 40, 32, .32); background: linear-gradient(138deg, #fffdfa, #fff8f2); }
.zfcc-card--address { border-color: rgba(142, 115, 44, .38); }
.zfcc-card__heading { display: flex; align-items: flex-start; gap: .8rem; }
.zfcc-card__mark {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  place-items: center;
  color: #fff;
  border-radius: 9px;
  background: var(--zfcc-cinnabar);
  box-shadow: 0 5px 12px rgba(154, 40, 32, .16);
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-weight: 750;
}
.zfcc-card__mark--gold { color: #59431a; background: #f0deae; box-shadow: none; }
.zfcc-card__mark--blue { background: var(--zfcc-blue); box-shadow: none; }
.zfcc-card .zfcc-eyebrow { margin-bottom: .42rem; }
.zfcc-card h2 { margin: 0; color: var(--zfcc-blue-deep); font-family: "Noto Serif TC", "Songti TC", serif; font-size: 1.35rem; line-height: 1.35; }
.zfcc-card > p { margin: .95rem 0 1.25rem; color: var(--zfcc-muted); line-height: 1.72; }
.zfcc-card .zfcc-button { margin-top: auto; }
.zfcc-dashboard__support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border-left: 3px solid var(--zfcc-gold);
  border-radius: 0 10px 10px 0;
  background: var(--zfcc-gold-soft);
}
.zfcc-dashboard__support h2 { margin: 0; color: var(--zfcc-blue-deep); font-family: "Noto Serif TC", "Songti TC", serif; font-size: 1.22rem; }
.zfcc-dashboard__support p:not(.zfcc-eyebrow) { max-width: 58ch; margin: .55rem 0 0; color: var(--zfcc-muted); line-height: 1.7; }
.zfcc-dashboard__support-actions { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.zfcc-session { margin: 0; padding: .25rem 0; text-align: right; }

/* Account details and address book retain native WooCommerce forms. */
.zfcc-endpoint-intro {
  margin: 0 0 1rem;
  padding: clamp(1.25rem, 3vw, 1.65rem);
  border: 1px solid var(--zfcc-line);
  border-radius: 14px;
  background: var(--zfcc-surface);
  box-shadow: 0 8px 28px rgba(66, 47, 24, .05);
}
.zfcc-endpoint-intro h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.zf-customer-center .woocommerce-EditAccountForm,
.zf-customer-center .woocommerce-address-fields,
.zf-customer-center .woocommerce-Addresses .woocommerce-Address {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.7rem);
  border: 1px solid var(--zfcc-line);
  border-radius: 14px;
  background: var(--zfcc-surface);
  box-shadow: 0 8px 28px rgba(66, 47, 24, .05);
}
.zf-customer-center .woocommerce-Addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.zf-customer-center .woocommerce-Addresses .woocommerce-Address { width: auto; float: none; }
.zf-customer-center .woocommerce-EditAccountForm fieldset { margin: 1.5rem 0; padding: 1.15rem; border: 1px solid var(--zfcc-line); border-radius: 10px; }
.zf-customer-center .woocommerce-EditAccountForm legend { padding: 0 .35rem; color: var(--zfcc-blue-deep); font-family: "Noto Serif TC", "Songti TC", serif; font-weight: 750; }

/* Buttons: restrict primary red to actual primary actions; never style every third-party .button alike. */
.zfcc-button,
.zf-customer-center .woocommerce button[name="login"],
.zf-customer-center .woocommerce button[name="register"],
.zf-customer-center .woocommerce button[name="save_account_details"],
.zf-customer-center .woocommerce .woocommerce-address-fields button[type="submit"],
.zf-customer-center .woocommerce button[name="zflev_resend_action"] {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1.05rem;
  color: #fff !important;
  font-family: inherit;
  font-size: 1rem !important;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  text-indent: 0 !important;
  text-shadow: none;
  border: 1px solid var(--zfcc-cinnabar) !important;
  border-radius: 9px;
  background-color: var(--zfcc-cinnabar) !important;
  background-image: none !important;
  box-shadow: 0 5px 12px rgba(154, 40, 32, .13);
  opacity: 1 !important;
}
.zfcc-button:hover,
.zf-customer-center .woocommerce button[name="login"]:hover,
.zf-customer-center .woocommerce button[name="register"]:hover,
.zf-customer-center .woocommerce button[name="save_account_details"]:hover,
.zf-customer-center .woocommerce .woocommerce-address-fields button[type="submit"]:hover,
.zf-customer-center .woocommerce button[name="zflev_resend_action"]:hover {
  color: #fff !important;
  border-color: var(--zfcc-cinnabar-deep) !important;
  background-color: var(--zfcc-cinnabar-deep) !important;
}
.zfcc-button--outline {
  color: var(--zfcc-blue) !important;
  border-color: rgba(49, 95, 127, .82) !important;
  background-color: transparent !important;
  box-shadow: none;
}
.zfcc-button--outline:hover { color: #fff !important; border-color: var(--zfcc-blue-deep) !important; background-color: var(--zfcc-blue-deep) !important; }
.zfcc-text-link { display: inline-flex; min-height: 44px; align-items: center; gap: .35rem; color: var(--zfcc-cinnabar); font-weight: 750; text-underline-offset: .18em; }

/* Fields and feedback. */
.zf-customer-center .woocommerce form .form-row { margin: 0 0 1rem; }
.zf-customer-center .woocommerce form label { display: inline-block; margin: 0 0 .45rem; color: var(--zfcc-ink); font-weight: 750; }
.zf-customer-center .woocommerce form .optional { color: var(--zfcc-muted); font-weight: 500; }
.zf-customer-center .woocommerce form input[type="text"],
.zf-customer-center .woocommerce form input[type="email"],
.zf-customer-center .woocommerce form input[type="password"],
.zf-customer-center .woocommerce form input[type="tel"],
.zf-customer-center .woocommerce form select,
.zf-customer-center .woocommerce form textarea {
  min-height: 46px;
  padding: .65rem .75rem;
  color: var(--zfcc-ink);
  border: 1px solid #6d6a64;
  border-radius: 9px;
  background: #fff;
}
.zf-customer-center .woocommerce form textarea { min-height: 104px; }
.zf-customer-center .woocommerce form .description { display: block; margin-top: .38rem; color: var(--zfcc-muted); font-size: .9rem; line-height: 1.6; }
.zf-customer-center .woocommerce form .show-password-input { display: inline-flex; width: 44px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.zf-customer-center .woocommerce form .woocommerce-password-strength + .woocommerce-password-hint { min-height: 44px; }
.zf-customer-center .woocommerce form .woocommerce-form__label-for-checkbox { display: inline-flex; min-height: 44px; align-items: center; gap: .5rem; }
.zf-customer-center .woocommerce form input[type="checkbox"] { inline-size: 1.15rem; block-size: 1.15rem; }
.zf-customer-center .woocommerce form .lost_password a,
.zf-customer-center .woocommerce a[href*="loginSocial=google"],
.zf-customer-center .woocommerce-Address-title a { display: inline-flex; min-height: 44px; align-items: center; }
.zf-customer-center .zf-google-social-login { clear: both; margin: 1rem 0; }
.zf-customer-center .zf-google-social-login__button .nsl-container,
.zf-customer-center .zf-google-social-login__button .nsl-container-buttons,
.zf-customer-center .zf-google-social-login__button a[href*="loginSocial=google"] { max-width: 100%; }
.zfcc-registration-pending { margin: 0 0 1rem; padding: 1rem 1.1rem; color: var(--zfcc-blue-deep); border-left: 3px solid var(--zfcc-gold); border-radius: 0 7px 7px 0; background: var(--zfcc-gold-soft); line-height: 1.65; }
.zfcc-registration-pending strong { display: block; color: var(--zfcc-cinnabar); font-family: "Noto Serif TC", "Songti TC", serif; font-size: 1.08rem; }
.zfcc-registration-pending p { margin: .45rem 0 0; }
.zfcc-email-registration-pending form.woocommerce-form-register > :not(.zfcc-registration-pending):not(.zf-google-social-login) { display: none !important; }
.zfcc-email-registration-pending form.woocommerce-form-register .zf-google-social-login { margin: 0; }
.zf-customer-center .woocommerce-privacy-policy-text a { display: inline-flex; min-height: 44px; align-items: center; }

.zf-customer-center a:focus-visible,
.zf-customer-center button:focus-visible,
.zf-customer-center input:focus-visible,
.zf-customer-center select:focus-visible,
.zf-customer-center textarea:focus-visible,
.zf-customer-center [role="tab"]:focus-visible {
  outline: 3px solid var(--zfcc-focus) !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fffdfa;
}
.zf-customer-center :is(a, button, input, select, textarea) { scroll-margin-block: calc(5.5rem + env(safe-area-inset-top)) calc(7rem + env(safe-area-inset-bottom)); }

@media (max-width: 900px) {
  .zf-customer-center .woocommerce-MyAccount-navigation { float: none; width: auto; margin: 0 0 1rem; }
  .zf-customer-center .woocommerce-MyAccount-navigation ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zf-customer-center .woocommerce-MyAccount-navigation-link--customer-logout { margin-top: 0; padding-top: 0; border-top: 0; }
  .zf-customer-center .woocommerce-MyAccount-content { margin-left: 0; }
  .zfcc-dashboard__hero { flex-direction: column; }
  .zfcc-dashboard__status { width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--zfcc-line); border-left: 0; }
  .zfcc-dashboard__status div { padding: .75rem 0 0; }
  .zfcc-dashboard__status div + div { padding-left: .9rem; border-top: 0; border-left: 1px solid var(--zfcc-line); }
}

@media (max-width: 760px) {
  .zf-customer-center .woocommerce { padding-top: 1.7rem; padding-bottom: calc(8.4rem + env(safe-area-inset-bottom)); scroll-padding-bottom: calc(8.4rem + env(safe-area-inset-bottom)); }
  .zf-customer-center .woocommerce-MyAccount-content,
  .zf-customer-center .zfcc-dashboard,
  .zf-customer-center .zfcc-dashboard__hero,
  .zf-customer-center .zfcc-dashboard__grid,
  .zf-customer-center .zfcc-card,
  .zf-customer-center .zfcc-dashboard__support { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; margin-inline: 0 !important; }
  .zf-customer-center #customer_login { grid-template-columns: 1fr; gap: 0; }
  .zf-customer-center #customer_login .u-column1,
  .zf-customer-center #customer_login .u-column2 { padding: 1.15rem; border-radius: 12px; }
  .zf-customer-center .zf-account-mobile-switch { margin-top: 0; }
  .zf-customer-center .zf-account-mobile-mode-button { min-height: 46px; }
  body.zf-account-mobile-modes[data-zf-account-mobile-mode="login"] .zflev-resend-activation { display: none; }
  .zf-customer-center .woocommerce-MyAccount-navigation { padding: .55rem; }
  .zf-customer-center .woocommerce-MyAccount-navigation ul { grid-auto-rows: 48px; grid-template-columns: 1fr 1fr; gap: .4rem; align-items: stretch; }
  .zf-customer-center .woocommerce-MyAccount-navigation li { display: flex; min-width: 0; margin: 0 !important; padding: 0 !important; }
  .zf-customer-center .woocommerce-MyAccount-navigation a { width: 100%; min-height: 48px; height: 48px; align-self: stretch; justify-content: center; min-width: 0; margin: 0 !important; padding: .35rem .45rem; font-size: .88rem; text-align: center; }
  .zf-customer-center .woocommerce-MyAccount-navigation a::before { display: none; }
  .zfcc-dashboard__status { grid-template-columns: 1fr; }
  .zfcc-dashboard__status div,
  .zfcc-dashboard__status div + div { padding: .68rem 0 0; border-top: 1px solid var(--zfcc-line); border-left: 0; }
  .zfcc-dashboard__status div:first-child { padding-top: 0; border-top: 0; }
  .zfcc-dashboard__grid { grid-template-columns: 1fr; }
  .zfcc-card { min-height: 0; }
  .zfcc-card .zfcc-button { width: 100%; }
  .zfcc-dashboard__support { align-items: flex-start; flex-direction: column; }
  .zfcc-dashboard__support-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .zfcc-dashboard__support-actions .zfcc-text-link { justify-content: space-between; }
  .zfcc-session { text-align: left; }
  .zf-customer-center .woocommerce-Addresses { grid-template-columns: 1fr; gap: .75rem; }
  .zf-customer-center .woocommerce-Addresses > p { margin: .15rem 0 .85rem; color: var(--zfcc-muted); font-size: .95rem; line-height: 1.65; }
  .zf-customer-center .woocommerce-Addresses .woocommerce-Address { display: grid; min-height: 0; gap: .85rem; padding: 1.1rem; align-content: start; }
  .zf-customer-center .woocommerce-Addresses .woocommerce-Address-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0; }
  .zf-customer-center .woocommerce-Addresses .woocommerce-Address-title h3 { margin: 0; color: var(--zfcc-cinnabar); font-family: "Noto Serif TC", "Songti TC", serif; font-size: 1.45rem; line-height: 1.3; }
  .zf-customer-center .woocommerce-Addresses .woocommerce-Address-title a { min-height: 40px; margin: 0; padding: .25rem 0; color: var(--zfcc-cinnabar); font-size: .95rem; font-weight: 700; line-height: 1.35; text-align: right; text-decoration: underline; text-underline-offset: .16em; }
  .zf-customer-center .woocommerce-Addresses .woocommerce-Address address,
  .zf-customer-center .woocommerce-Addresses .woocommerce-Address > p { margin: 0; color: var(--zfcc-ink); font-size: .98rem; font-style: normal; line-height: 1.65; }
  .zf-customer-center .zfcc-endpoint-intro { margin-bottom: .75rem; padding: 1.05rem; }
  .zf-customer-center .zfcc-endpoint-intro h2 { font-size: 1.55rem; }
  .zf-customer-center .zfcc-endpoint-intro > p:not(.zfcc-eyebrow) { margin-top: .55rem; font-size: .98rem; line-height: 1.65; }
  .zf-customer-center .woocommerce-EditAccountForm fieldset { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .zf-customer-center *, .zf-customer-center *::before, .zf-customer-center *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
