/* =========================================================================
   My Account page (/my-account/ + endpoints)
   Scoped to body.woocommerce-account so nothing leaks to other pages.
   Uses the shared --fmke-* tokens from style.css.
   ========================================================================= */

body.woocommerce-account {
  /* Icons (Lucide-style strokes) used as CSS masks so they inherit currentColor */
  --fmke-i-dashboard: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");
  --fmke-i-orders: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E");
  --fmke-i-downloads: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m-5-5 5 5 5-5M4 21h16'/%3E%3C/svg%3E");
  --fmke-i-address: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-6.2 7-11a7 7 0 1 0-14 0c0 4.8 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
  --fmke-i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M4.5 20.5c1.7-3.6 5-5.5 7.5-5.5s5.8 1.9 7.5 5.5'/%3E%3C/svg%3E");
  --fmke-i-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath d='M2.5 10h19'/%3E%3C/svg%3E");
  --fmke-i-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4m7 14 5-5-5-5m5 5H9'/%3E%3C/svg%3E");
  --fmke-i-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20.5s-8-4.9-8-11A4.5 4.5 0 0 1 12 7a4.5 4.5 0 0 1 8 2.5c0 6.1-8 11-8 11z'/%3E%3C/svg%3E");
  --fmke-i-store: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9l1.5-5h13L20 9M4 9v11h16V9M4 9a2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0 5 0'/%3E%3C/svg%3E");
  --fmke-i-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m10 8 4 4-4 4'/%3E%3C/svg%3E");
  --fmke-i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");

  --fmke-acct-surface: #F6F3EE;
}

/* ---- Page frame ------------------------------------------------------ */
body.woocommerce-account .site-content {
  background: var(--fmke-acct-surface);
  padding: 8px 0 48px;
}
body.woocommerce-account .site-content > .col-full {
  max-width: 1280px;
}
/* Storefront reserves a sidebar column even when empty — use the full width. */
body.woocommerce-account .content-area {
  float: none !important;
  width: 100% !important;
  margin-right: 0 !important;
}
body.woocommerce-account .widget-area { display: none !important; }

body.woocommerce-account .hentry { margin-bottom: 0; }
body.woocommerce-account .entry-header { margin: 0 0 22px; padding: 0; border: 0; }
body.woocommerce-account .entry-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--fmke-dark);
  margin: 28px 0 0;
  padding-bottom: 12px;
  position: relative;
}
body.woocommerce-account .entry-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 4px;
  border-radius: 4px;
  background: var(--fmke-primary);
}
body.woocommerce-account:not(.logged-in) .entry-title { text-align: center; }
body.woocommerce-account:not(.logged-in) .entry-title::after { left: 50%; transform: translateX(-50%); }
body.woocommerce-account .entry-content { margin: 0; }

/* Kill Storefront's clearfix pseudo-elements — inside a grid they'd become
   empty grid items and punch holes in the layout. */
body.woocommerce-account .woocommerce::before,
body.woocommerce-account .woocommerce::after,
body.woocommerce-account .col2-set::before,
body.woocommerce-account .col2-set::after,
body.woocommerce-account .u-columns::before,
body.woocommerce-account .u-columns::after { display: none !important; }

/* ---- Shared form controls ------------------------------------------- */
body.woocommerce-account .woocommerce form .form-row {
  float: none !important;
  width: 100% !important;
  margin: 0 0 16px;
  padding: 0;
}
body.woocommerce-account .woocommerce form .form-row label,
body.woocommerce-account .woocommerce form fieldset legend {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fmke-dark);
}
body.woocommerce-account .woocommerce form .form-row label.woocommerce-form__label-for-checkbox,
body.woocommerce-account .woocommerce form .form-row label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
body.woocommerce-account .woocommerce form .required { color: var(--fmke-sale); text-decoration: none; }

body.woocommerce-account .woocommerce input.input-text,
body.woocommerce-account .woocommerce input[type="text"],
body.woocommerce-account .woocommerce input[type="email"],
body.woocommerce-account .woocommerce input[type="tel"],
body.woocommerce-account .woocommerce input[type="password"],
body.woocommerce-account .woocommerce textarea,
body.woocommerce-account .woocommerce select,
body.woocommerce-account .woocommerce .select2-container--default .select2-selection--single {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  min-height: 46px;
  border: 1.5px solid var(--fmke-border);
  border-radius: 10px;
  background: #fff;
  color: var(--fmke-dark);
  font-size: 14.5px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
body.woocommerce-account .woocommerce .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  padding: 0 8px;
}
body.woocommerce-account .woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }
body.woocommerce-account .woocommerce input:focus,
body.woocommerce-account .woocommerce textarea:focus,
body.woocommerce-account .woocommerce select:focus,
body.woocommerce-account .woocommerce .select2-container--open .select2-selection--single {
  outline: none;
  border-color: var(--fmke-primary);
  box-shadow: 0 0 0 3px rgba(255,106,0,.16);
}
body.woocommerce-account .woocommerce input[type="checkbox"],
body.woocommerce-account .woocommerce input[type="radio"] {
  width: 17px; height: 17px;
  accent-color: var(--fmke-primary);
  margin: 0;
}
body.woocommerce-account .woocommerce form em,
body.woocommerce-account .woocommerce form .description {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
  color: var(--fmke-muted);
}
/* Show/hide password toggle (WooCommerce 6+) */
body.woocommerce-account .woocommerce .password-input { position: relative; display: block; }
body.woocommerce-account .woocommerce .password-input input { padding-right: 46px; }
body.woocommerce-account .woocommerce .show-password-input {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; margin: 0;
  background-color: transparent; border: 0; border-radius: 8px; cursor: pointer;
  opacity: .6;
}
body.woocommerce-account .woocommerce .show-password-input:hover { opacity: 1; }

/* Buttons */
body.woocommerce-account .woocommerce a.button,
body.woocommerce-account .woocommerce button.button,
body.woocommerce-account .woocommerce input.button,
body.woocommerce-account .woocommerce .woocommerce-Button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--fmke-primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
body.woocommerce-account .woocommerce a.button:hover,
body.woocommerce-account .woocommerce button.button:hover,
body.woocommerce-account .woocommerce input.button:hover,
body.woocommerce-account .woocommerce .woocommerce-Button:hover {
  background: var(--fmke-primary-dark);
  box-shadow: var(--fmke-shadow-hover);
  transform: translateY(-1px);
}
body.woocommerce-account .woocommerce .woocommerce-form-login__submit,
body.woocommerce-account .woocommerce .woocommerce-form-register__submit,
body.woocommerce-account .woocommerce form.lost_reset_password .button { width: 100%; }

body.woocommerce-account .woocommerce a { color: var(--fmke-primary-dark); }
body.woocommerce-account .woocommerce a:hover { color: var(--fmke-primary); }
body.woocommerce-account .woocommerce .woocommerce-LostPassword { margin: 14px 0 0; text-align: center; font-size: 13.5px; }
body.woocommerce-account .woocommerce .woocommerce-LostPassword a { font-weight: 700; }
body.woocommerce-account .woocommerce .woocommerce-privacy-policy-text p { font-size: 12px; color: var(--fmke-muted); line-height: 1.5; }

/* Notices inside the account area */
body.woocommerce-account .woocommerce-notices-wrapper { grid-area: notices; }
body.woocommerce-account .woocommerce-notices-wrapper:empty { display: none; }
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
  border-radius: 10px;
  margin: 0 0 18px;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button { float: none; margin-left: auto; }

/* =========================================================================
   LOGGED OUT — Login / Register / Lost password
   ========================================================================= */
body.woocommerce-account:not(.logged-in) .woocommerce { max-width: 980px; margin: 0 auto; }

/* Two-column (login + register) */
body.woocommerce-account:not(.logged-in) .u-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
body.woocommerce-account:not(.logged-in) .u-columns > .u-column1,
body.woocommerce-account:not(.logged-in) .u-columns > .u-column2 {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* Cards: each column when two-up, otherwise the lone form */
body.woocommerce-account:not(.logged-in) .u-columns > .u-column1,
body.woocommerce-account:not(.logged-in) .u-columns > .u-column2,
body.woocommerce-account:not(.logged-in) .woocommerce > form.woocommerce-form-login,
body.woocommerce-account:not(.logged-in) .woocommerce > form.lost_reset_password {
  background: #fff;
  border: 1px solid var(--fmke-border);
  border-radius: 16px;
  box-shadow: var(--fmke-shadow);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
/* Orange top accent on each card */
body.woocommerce-account:not(.logged-in) .u-columns > .u-column1::before,
body.woocommerce-account:not(.logged-in) .u-columns > .u-column2::before,
body.woocommerce-account:not(.logged-in) .woocommerce > form.woocommerce-form-login::before,
body.woocommerce-account:not(.logged-in) .woocommerce > form.lost_reset_password::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--fmke-primary), #FFA24D);
}
body.woocommerce-account:not(.logged-in) .u-columns > .u-column2::before { background: linear-gradient(90deg, var(--fmke-dark), #3E6B52); }

body.woocommerce-account:not(.logged-in) .woocommerce h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--fmke-dark);
  margin: 4px 0 18px;
}
/* Login-only layout (registration disabled): centered card + heading */
body.woocommerce-account:not(.logged-in) .woocommerce > form.woocommerce-form-login,
body.woocommerce-account:not(.logged-in) .woocommerce > form.lost_reset_password {
  max-width: 460px;
  margin: 0 auto 24px;
}
body.woocommerce-account:not(.logged-in) .woocommerce > h2 { max-width: 460px; margin: 0 auto 14px; }

/* Remember-me row + submit */
body.woocommerce-account .woocommerce-form-login .woocommerce-form-login__rememberme { margin: 4px 0 16px; }
body.woocommerce-account .woocommerce form.woocommerce-form-login .form-row:last-of-type { margin-bottom: 0; }

/* Register form (Dokan customer/vendor choice) */
body.woocommerce-account .woocommerce form .user-role {
  display: flex; gap: 8px; flex-wrap: wrap;
}
body.woocommerce-account .woocommerce form .user-role label.radio {
  flex: 1 1 140px;
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
  padding: 11px 14px;
  border: 1.5px solid var(--fmke-border);
  border-radius: 10px;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
body.woocommerce-account .woocommerce form .user-role label.radio:has(input:checked) {
  border-color: var(--fmke-primary);
  background: var(--fmke-primary-light);
}

/* Mobile tabs (injected by account-style.js, only shown <= 782px) */
.fmke-acct-tabs { display: none; }

@media (max-width: 782px) {
  body.woocommerce-account .entry-title { font-size: 25px; margin-top: 20px; }

  body.woocommerce-account:not(.logged-in) .u-columns { grid-template-columns: 1fr; gap: 18px; }
  .fmke-acct-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid var(--fmke-border);
    border-radius: 999px;
  }
  .fmke-acct-tabs button {
    flex: 1;
    padding: 11px 12px;
    border: 0; border-radius: 999px;
    background: transparent;
    color: var(--fmke-muted);
    font-size: 14px; font-weight: 800;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
  }
  .fmke-acct-tabs button[aria-selected="true"] { background: var(--fmke-primary); color: #fff; }

  /* Only hide the inactive card once JS has set up the tabs */
  .fmke-acct-has-tabs[data-fmke-tab="login"] > .u-column2,
  .fmke-acct-has-tabs[data-fmke-tab="register"] > .u-column1 { display: none !important; }

  body.woocommerce-account:not(.logged-in) .u-columns > .u-column1,
  body.woocommerce-account:not(.logged-in) .u-columns > .u-column2,
  body.woocommerce-account:not(.logged-in) .woocommerce > form.woocommerce-form-login,
  body.woocommerce-account:not(.logged-in) .woocommerce > form.lost_reset_password { padding: 22px 18px; border-radius: 14px; }
}

/* =========================================================================
   LOGGED IN — sidebar nav + content card
   ========================================================================= */
body.woocommerce-account.logged-in .woocommerce {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas:
    "notices notices"
    "user    content"
    "nav     content"
    ".       content";
  column-gap: 24px;
  align-items: start;
}

/* User card */
.fmke-acct-user {
  grid-area: user;
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--fmke-primary), #FF8A2B);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,106,0,.22);
}
.fmke-acct-user__avatar {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  border: 2px solid rgba(255,255,255,.55);
  font-size: 20px; font-weight: 800;
}
.fmke-acct-user__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fmke-acct-user__name { font-size: 15.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmke-acct-user__email { font-size: 12px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Navigation */
body.woocommerce-account .woocommerce-MyAccount-navigation {
  grid-area: nav;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: #fff;
  border: 1px solid var(--fmke-border);
  border-radius: 16px;
  box-shadow: var(--fmke-shadow);
  padding: 8px;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0; padding: 0;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; border: 0; }
body.woocommerce-account .woocommerce-MyAccount-navigation li + li { margin-top: 2px; }
body.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--fmke-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease;
}
/* Icon (replaces Storefront's icon-font ::before) */
body.woocommerce-account .woocommerce-MyAccount-navigation li a::before,
.fmke-acct-tile__ico::before {
  content: "" !important;
  font-family: inherit !important;
  flex: 0 0 auto;
  display: inline-block !important;
  width: 20px; height: 20px;
  margin: 0 !important;
  background-color: currentColor;
  -webkit-mask: var(--fmke-ico, var(--fmke-i-dot)) center / contain no-repeat;
          mask: var(--fmke-ico, var(--fmke-i-dot)) center / contain no-repeat;
  color: var(--fmke-primary);
  opacity: 1;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  background: var(--fmke-primary-light);
  color: var(--fmke-primary-dark);
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--fmke-primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255,106,0,.28);
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a::before { color: #fff; }
body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--fmke-border);
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a { color: var(--fmke-sale); }
body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a::before { color: var(--fmke-sale); }
body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover { background: #FDECEC; color: var(--fmke-sale); }

/* Endpoint → icon map (shared by nav links and dashboard tiles) */
.woocommerce-MyAccount-navigation-link--dashboard,       .fmke-acct-tile--dashboard       { --fmke-ico: var(--fmke-i-dashboard); }
.woocommerce-MyAccount-navigation-link--orders,          .fmke-acct-tile--orders          { --fmke-ico: var(--fmke-i-orders); }
.woocommerce-MyAccount-navigation-link--downloads,       .fmke-acct-tile--downloads       { --fmke-ico: var(--fmke-i-downloads); }
.woocommerce-MyAccount-navigation-link--edit-address,    .fmke-acct-tile--edit-address    { --fmke-ico: var(--fmke-i-address); }
.woocommerce-MyAccount-navigation-link--payment-methods, .fmke-acct-tile--payment-methods { --fmke-ico: var(--fmke-i-card); }
.woocommerce-MyAccount-navigation-link--edit-account,    .fmke-acct-tile--edit-account    { --fmke-ico: var(--fmke-i-user); }
.woocommerce-MyAccount-navigation-link--customer-logout  { --fmke-ico: var(--fmke-i-logout); }
.woocommerce-MyAccount-navigation-link--wishlist,        .fmke-acct-tile--wishlist,
.woocommerce-MyAccount-navigation-link--my-wishlist,     .fmke-acct-tile--my-wishlist     { --fmke-ico: var(--fmke-i-heart); }
[class*="MyAccount-navigation-link--"][class*="vendor"], [class*="fmke-acct-tile--"][class*="vendor"],
[class*="MyAccount-navigation-link--"][class*="seller"], [class*="fmke-acct-tile--"][class*="seller"],
[class*="MyAccount-navigation-link--"][class*="dokan"],  [class*="fmke-acct-tile--"][class*="dokan"] { --fmke-ico: var(--fmke-i-store); }

/* Content card */
body.woocommerce-account .woocommerce-MyAccount-content {
  grid-area: content;
  float: none !important;
  width: auto !important;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--fmke-border);
  border-radius: 16px;
  box-shadow: var(--fmke-shadow);
  padding: 28px;
  color: var(--fmke-dark);
  line-height: 1.6;
}
body.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type { margin-top: 0; font-size: 16px; }
body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-MyAccount-content h3,
body.woocommerce-account .woocommerce-MyAccount-content legend {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--fmke-dark);
}
body.woocommerce-account .woocommerce-MyAccount-content h2 { font-size: 22px; margin: 0 0 14px; }
body.woocommerce-account .woocommerce-MyAccount-content h3 { font-size: 18px; margin: 0 0 10px; }
body.woocommerce-account .woocommerce-MyAccount-content mark {
  background: var(--fmke-primary-light);
  color: var(--fmke-primary-dark);
  padding: 2px 9px;
  border-radius: 6px;
  font-weight: 800;
}

/* Dashboard quick-link tiles */
.fmke-acct-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
body.woocommerce-account .woocommerce-MyAccount-content a.fmke-acct-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--fmke-border);
  border-radius: 14px;
  background: #fff;
  color: var(--fmke-dark);
  font-weight: 800;
  font-size: 14.5px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
body.woocommerce-account .woocommerce-MyAccount-content a.fmke-acct-tile:hover {
  border-color: var(--fmke-primary);
  box-shadow: var(--fmke-shadow-hover);
  transform: translateY(-2px);
  color: var(--fmke-dark);
}
.fmke-acct-tile__ico {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--fmke-primary-light);
  transition: background .15s ease;
}
.fmke-acct-tile:hover .fmke-acct-tile__ico { background: var(--fmke-primary); }
.fmke-acct-tile:hover .fmke-acct-tile__ico::before { color: #fff; }
.fmke-acct-tile__txt { flex: 1; }
.fmke-acct-tile__go {
  width: 14px; height: 14px; flex: 0 0 auto;
  background-color: var(--fmke-muted);
  -webkit-mask: var(--fmke-i-arrow) center / contain no-repeat;
          mask: var(--fmke-i-arrow) center / contain no-repeat;
  transition: transform .15s ease, background-color .15s ease;
}
.fmke-acct-tile:hover .fmke-acct-tile__go { transform: translateX(3px); background-color: var(--fmke-primary); }

/* ---- Orders table ---------------------------------------------------- */
body.woocommerce-account table.shop_table,
body.woocommerce-account table.woocommerce-orders-table {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 18px;
  background: transparent;
}
body.woocommerce-account table.shop_table th {
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid var(--fmke-border);
  background: transparent;
  color: var(--fmke-muted);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
}
body.woocommerce-account table.shop_table tbody th {
  padding: 14px 12px;
  border-bottom: 1px solid var(--fmke-border);
  color: var(--fmke-dark);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
}
body.woocommerce-account table.shop_table td {
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid var(--fmke-border);
  background-color: transparent;
  vertical-align: middle;
  font-size: 14px;
}
body.woocommerce-account table.shop_table tbody tr:hover td { background-color: #FFFAF4; }
body.woocommerce-account table.shop_table tfoot th,
body.woocommerce-account table.shop_table tfoot td { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--fmke-dark); font-weight: 700; }
body.woocommerce-account table.shop_table .amount { color: var(--fmke-primary-dark); font-weight: 800; }
body.woocommerce-account .woocommerce-orders-table__cell-order-number a { font-size: 14.5px; font-weight: 800; color: var(--fmke-primary-dark); text-decoration: none; }
body.woocommerce-account .woocommerce-orders-table__cell-order-date { color: var(--fmke-muted); }

/* Status: coloured dot (drawn as a background so ::before stays free for the
   mobile data-title label) + coloured text */
body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-status {
  padding-left: 28px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--fmke-st, var(--fmke-muted));
  background-image: radial-gradient(circle closest-side, currentColor 98%, transparent 100%);
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 9px 9px;
}
body.woocommerce-account .woocommerce-orders-table__row--status-completed  { --fmke-st: #1E8E3E; }
body.woocommerce-account .woocommerce-orders-table__row--status-processing { --fmke-st: #1A73E8; }
body.woocommerce-account .woocommerce-orders-table__row--status-pending,
body.woocommerce-account .woocommerce-orders-table__row--status-on-hold    { --fmke-st: #B7791F; }
body.woocommerce-account .woocommerce-orders-table__row--status-cancelled,
body.woocommerce-account .woocommerce-orders-table__row--status-failed     { --fmke-st: var(--fmke-sale); }

/* Row action buttons: small, View = soft, Pay = solid, Cancel = outline */
body.woocommerce-account .woocommerce-orders-table__cell-order-actions { text-align: right; white-space: nowrap; }
body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
  padding: 8px 16px !important;
  font-size: 12.5px !important;
  margin: 0 0 0 6px;
}
body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.view,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button.button.view {
  background: var(--fmke-primary-light) !important;
  color: var(--fmke-primary-dark) !important;
}
body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.view:hover { background: var(--fmke-primary) !important; color: #fff !important; }
body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.cancel {
  background: transparent !important;
  color: var(--fmke-sale) !important;
  box-shadow: inset 0 0 0 1.5px var(--fmke-sale);
}
body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button.cancel:hover { background: var(--fmke-sale) !important; color: #fff !important; }

/* Pagination under orders/downloads */
body.woocommerce-account .woocommerce-pagination { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
body.woocommerce-account .woocommerce-pagination .button { margin: 0 !important; }

/* ---- Order view ------------------------------------------------------ */
body.woocommerce-account .woocommerce-order-details,
body.woocommerce-account .woocommerce-customer-details { margin-top: 26px; }
body.woocommerce-account .woocommerce-columns--addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body.woocommerce-account .woocommerce-columns--addresses .woocommerce-column { float: none !important; width: auto !important; }
body.woocommerce-account .woocommerce-order-details .order-again { margin-top: 14px; }

/* ---- Addresses ------------------------------------------------------- */
body.woocommerce-account .woocommerce-Addresses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
body.woocommerce-account .woocommerce-Addresses .woocommerce-Address {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 20px;
  border: 1.5px dashed #E8D5C2;
  border-radius: 14px;
  background: #FFFCF8;
}
body.woocommerce-account .woocommerce-Address-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
body.woocommerce-account .woocommerce-Address-title h3 { margin: 0; font-size: 17px; }
body.woocommerce-account .woocommerce-Address-title a.edit {
  float: none;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--fmke-primary-light);
  color: var(--fmke-primary-dark);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}
body.woocommerce-account .woocommerce-Address-title a.edit:hover { background: var(--fmke-primary); color: #fff; }
body.woocommerce-account .woocommerce-Address address { font-style: normal; color: var(--fmke-dark); line-height: 1.7; }

/* ---- Edit address / Edit account forms ------------------------------- */
body.woocommerce-account .woocommerce-address-fields__field-wrapper,
body.woocommerce-account form.woocommerce-EditAccountForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}
body.woocommerce-account .woocommerce-address-fields__field-wrapper .clear,
body.woocommerce-account form.woocommerce-EditAccountForm .clear { display: none; }
body.woocommerce-account .woocommerce-address-fields__field-wrapper .form-row-wide,
body.woocommerce-account form.woocommerce-EditAccountForm .form-row-wide,
body.woocommerce-account form.woocommerce-EditAccountForm > p:not(.form-row),
body.woocommerce-account form.woocommerce-EditAccountForm > fieldset { grid-column: 1 / -1; }
body.woocommerce-account form.woocommerce-EditAccountForm fieldset {
  margin: 8px 0 18px;
  padding: 20px;
  border: 1px solid var(--fmke-border);
  border-radius: 14px;
  background: #FFFCF8;
  display: grid;
  grid-template-columns: 1fr;
}
body.woocommerce-account form.woocommerce-EditAccountForm fieldset legend {
  padding: 0 10px;
  font-size: 16px;
  width: auto;
}
body.woocommerce-account form.woocommerce-EditAccountForm fieldset .form-row:last-child { margin-bottom: 0; }
body.woocommerce-account .woocommerce-MyAccount-content form > p > .button,
body.woocommerce-account .woocommerce-MyAccount-content form > p > button { margin-top: 4px; }

/* ---- Downloads / payment methods ------------------------------------ */
body.woocommerce-account .woocommerce-MyAccount-content table .button { padding: 8px 16px; font-size: 12.5px; }

/* =========================================================================
   Tablet + mobile
   ========================================================================= */
@media (max-width: 1024px) {
  body.woocommerce-account.logged-in .woocommerce { grid-template-columns: 240px minmax(0, 1fr); column-gap: 18px; }
  body.woocommerce-account .woocommerce-MyAccount-content { padding: 22px; }
}

@media (max-width: 782px) {
  body.woocommerce-account.logged-in .woocommerce {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "notices" "user" "nav" "content";
  }
  .fmke-acct-user { margin-bottom: 12px; padding: 14px; }
  .fmke-acct-user__avatar { width: 42px; height: 42px; font-size: 18px; }

  /* Nav → horizontally scrolling pill strip */
  body.woocommerce-account .woocommerce-MyAccount-navigation {
    padding: 6px;
    margin-bottom: 14px !important;
    border-radius: 999px;
    overflow: hidden;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    position: relative; /* offsetParent for the active-pill scroll in account-style.js */
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
  body.woocommerce-account .woocommerce-MyAccount-navigation li { flex: 0 0 auto; scroll-snap-align: center; }
  body.woocommerce-account .woocommerce-MyAccount-navigation li + li { margin-top: 0; }
  body.woocommerce-account .woocommerce-MyAccount-navigation li a {
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation li a::before { width: 17px; height: 17px; }
  body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 0; padding-top: 0; border-top: 0;
  }

  body.woocommerce-account .woocommerce-MyAccount-content { padding: 18px 16px; border-radius: 14px; }
  body.woocommerce-account .woocommerce-MyAccount-content h2 { font-size: 20px; }
  .fmke-acct-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  body.woocommerce-account .woocommerce-MyAccount-content a.fmke-acct-tile { flex-wrap: wrap; padding: 14px; gap: 6px; font-size: 13.5px; }
  .fmke-acct-tile__go { display: none; }
  .fmke-acct-tile__txt { flex-basis: 100%; }

  /* Orders table → one card per order */
  body.woocommerce-account table.woocommerce-orders-table thead { display: none; }
  body.woocommerce-account table.woocommerce-orders-table,
  body.woocommerce-account table.woocommerce-orders-table tbody { display: block; }
  body.woocommerce-account table.woocommerce-orders-table tr {
    display: block;
    margin: 0 0 12px;
    padding: 6px 14px;
    border: 1px solid var(--fmke-border);
    border-radius: 14px;
    background: #fff;
  }
  body.woocommerce-account table.woocommerce-orders-table tbody tr:hover td,
  body.woocommerce-account table.woocommerce-orders-table tbody tr:nth-child(2n) td { background-color: transparent; }
  body.woocommerce-account table.woocommerce-orders-table td,
  body.woocommerce-account table.woocommerce-orders-table tbody th {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px dashed var(--fmke-border);
    text-align: right !important;
  }
  body.woocommerce-account table.woocommerce-orders-table td:last-child { border-bottom: 0; }
  body.woocommerce-account table.woocommerce-orders-table td::before,
  body.woocommerce-account table.woocommerce-orders-table tbody th::before {
    float: none;
    flex: 0 0 auto;
    content: attr(data-title);
    color: var(--fmke-muted);
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
  }
  /* Total cell has label + amount + "for N items" — keep value parts together */
  body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-total { justify-content: flex-end; gap: 6px; }
  body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-total::before { margin-right: auto; }

  /* No dot on mobile — the label/value layout already separates them */
  body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-status {
    padding-left: 0;
    background-image: none;
  }
  body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 12px;
  }
  body.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before { display: none; }
  body.woocommerce-account .woocommerce-orders-table__cell-order-actions .button { margin: 0 0 0 6px; }

  /* Other tables (order view, downloads) keep their default responsive stack,
     just tidied */
  body.woocommerce-account table.shop_table_responsive:not(.woocommerce-orders-table) td { padding: 10px 4px; }

  body.woocommerce-account .woocommerce-address-fields__field-wrapper,
  body.woocommerce-account form.woocommerce-EditAccountForm,
  body.woocommerce-account .woocommerce-columns--addresses { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce-account .woocommerce a.button,
  body.woocommerce-account .woocommerce button.button,
  .fmke-acct-tile,
  .fmke-acct-tile__go { transition: none !important; transform: none !important; }
}

/* =========================================================================
   Live-site fixes (theme / Dokan rules that out-ranked the styles above)
   ========================================================================= */

/* 1. No underlines anywhere in the account area (Storefront underlines every <a>) */
body.woocommerce-account .woocommerce a,
body.woocommerce-account .woocommerce a:hover,
body.woocommerce-account .woocommerce a:focus,
body.woocommerce-account .woocommerce a:active { text-decoration: none !important; }
/* In-text links stay recognisable by colour + weight instead */
body.woocommerce-account .woocommerce-MyAccount-content p a:not(.button):not(.dokan-btn):not(.dokan-btn-theme) { font-weight: 700; }

/* 2. Notices: Storefront forces white text (it assumes a solid blue/green box),
      which vanished on our light orange background. */
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-error {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  position: relative;
  box-sizing: border-box;
  padding: 14px 18px 14px 48px !important;
  background: var(--fmke-primary-light) !important;
  color: var(--fmke-dark) !important;
  border: 1px solid #F6D9BC !important;
  border-left: 4px solid var(--fmke-primary) !important;
  border-radius: 12px !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
}
body.woocommerce-account .woocommerce-error {
  background: #FDECEC !important;
  border-color: #F5C2C0 !important;
  border-left-color: var(--fmke-sale) !important;
}
body.woocommerce-account .woocommerce-info::before,
body.woocommerce-account .woocommerce-message::before,
body.woocommerce-account .woocommerce-error::before {
  position: absolute !important;
  left: 16px !important;
  top: 15px !important;
  margin: 0 !important;
}
body.woocommerce-account .woocommerce-info li,
body.woocommerce-account .woocommerce-error li,
body.woocommerce-account .woocommerce-message li { color: inherit !important; }
/* Action button goes to the right of the text instead of before it */
body.woocommerce-account .woocommerce-info .button,
body.woocommerce-account .woocommerce-message .button,
body.woocommerce-account .woocommerce-error .button,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button {
  order: 2;
  float: none !important;
  margin: 0 0 0 auto !important;
  padding: 9px 18px !important;
  font-size: 13px !important;
}

/* 3. Dokan's "Go to Vendor Dashboard" (and any other .dokan-btn) → theme button */
body.woocommerce-account .woocommerce-MyAccount-content a.dokan-btn,
body.woocommerce-account .woocommerce-MyAccount-content a.dokan-btn-theme,
body.woocommerce-account .woocommerce-MyAccount-content .dokan-btn-theme,
body.woocommerce-account .woocommerce-MyAccount-content a[href*="/dashboard"]:not(.fmke-acct-tile):not(.button) {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 24px !important;
  background: var(--fmke-primary) !important;
  background-image: none !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  text-shadow: none !important;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
body.woocommerce-account .woocommerce-MyAccount-content a.dokan-btn:hover,
body.woocommerce-account .woocommerce-MyAccount-content a.dokan-btn-theme:hover,
body.woocommerce-account .woocommerce-MyAccount-content a[href*="/dashboard"]:not(.fmke-acct-tile):not(.button):hover {
  background: var(--fmke-primary-dark) !important;
  color: #fff !important;
  box-shadow: var(--fmke-shadow-hover) !important;
  transform: translateY(-1px);
}

/* 4. Navigation: the theme's padding / borders / icon placement beat ours.
      Force: icon on the LEFT, label next to it, even padding, no divider lines. */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul li + li { margin-top: 2px !important; }
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border: 0 !important;
  text-align: left !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
  order: 0 !important;
  float: none !important;
  position: static !important;
  margin: 0 !important;
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
}
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a::after { content: none !important; display: none !important; }
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid var(--fmke-border) !important;
}

@media (max-width: 782px) {
  body.woocommerce-account .woocommerce-MyAccount-navigation ul li + li { margin-top: 0 !important; }
  body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    padding: 10px 16px !important;
    gap: 8px !important;
    font-size: 13px !important;
    white-space: nowrap;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
    width: 17px !important; height: 17px !important; flex-basis: 17px !important;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important;
  }
  body.woocommerce-account .woocommerce-info,
  body.woocommerce-account .woocommerce-message,
  body.woocommerce-account .woocommerce-error { padding: 14px 16px 14px 44px !important; }
  body.woocommerce-account .woocommerce-info .button,
  body.woocommerce-account .woocommerce-message .button { margin: 2px 0 0 0 !important; }
}

/* User card on small screens: centre the avatar and name in the card */
@media (max-width: 782px) {
  .fmke-acct-user {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 18px 14px;
    text-align: center;
  }
  .fmke-acct-user__meta { align-items: center; max-width: 100%; }
  .fmke-acct-user__name,
  .fmke-acct-user__email { max-width: 100%; text-align: center; }
}
