.twcf-toast {
  position: fixed;
  left: 20px;
  bottom: 24px;
  z-index: 999999;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #171717;
  color: #fff;
  line-height: 1.8;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.twcf-toast.is-visible { transform: translateY(0); opacity: 1; }
body.twcf-login-modal-open { overflow: hidden; touch-action: none; }
.twcf-login-modal { position: fixed; inset: 0; z-index: 2147483000; display: none; direction: rtl; pointer-events: none; }
.twcf-login-modal.is-open { display: block; pointer-events: auto; }
.twcf-login-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.twcf-login-panel {
  position: relative;
  width: min(430px, calc(100vw - 28px));
  margin: 7vh auto;
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  overflow: hidden;
  color: #222;
}
.twcf-login-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.twcf-login-icon { width: 42px; height: 42px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: #f7f1e6; font-size: 22px; flex: 0 0 auto; }
.twcf-icon-button { appearance: none; border: 0; width: 38px; height: 38px; border-radius: 14px; background: #f5f5f5; color: #222; font-size: 24px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: 0 0 auto; }
.twcf-login-panel h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.twcf-login-intro, .twcf-login-note, .twcf-otp-help { margin: 0 0 14px; color: #666; line-height: 1.9; font-size: 14px; }
.twcf-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 18px; overflow: hidden; background: #f4f4f4; padding: 4px; margin: 14px 0; gap: 4px; }
.twcf-auth-tab { min-height: 42px; border: 0 !important; border-radius: 14px !important; background: transparent !important; color: #444 !important; box-shadow: none !important; padding: 8px 10px !important; cursor: pointer; font-weight: 700; overflow: hidden; }
.twcf-auth-tab.is-active { background: #fff !important; color: #111 !important; box-shadow: 0 4px 16px rgba(0,0,0,.08) !important; }
.twcf-login-step { display: none; }
.twcf-login-step.is-active { display: block; }
.twcf-login-form label, .twcf-otp-form label { display: block; margin-bottom: 12px; }
.twcf-login-form label span, .twcf-otp-form label span { display: block; margin-bottom: 6px; font-weight: 700; color: #333; }
.twcf-login-form input, .twcf-otp-form input { width: 100%; min-height: 48px; border: 1px solid #e4e4e4; border-radius: 16px; padding: 10px 13px; background: #fafafa; box-shadow: none; direction: rtl; }
.twcf-login-form input:focus, .twcf-otp-form input:focus { outline: none; border-color: #c7a45b; background: #fff; }
.twcf-primary-button { width: 100%; border: 0 !important; border-radius: 16px !important; min-height: 48px; padding: 11px 16px !important; background: #1d1d1d !important; color: #fff !important; cursor: pointer; font-weight: 800; text-align: center; display: inline-flex; align-items: center; justify-content: center; line-height: 1.7; }
.twcf-primary-button:disabled, .twcf-primary-button.is-loading { opacity: .7; cursor: wait; }
.twcf-link-button { width: 100%; min-height: 40px; margin-top: 8px; border: 0 !important; background: transparent !important; color: #444 !important; cursor: pointer; text-decoration: underline; }
.twcf-link-button:disabled { opacity: .55; cursor: not-allowed; }
.twcf-otp-timer { margin-bottom: 10px; color: #6f5a2f; font-weight: 700; }
.twcf-login-message { min-height: 24px; margin-top: 12px; font-size: 14px; line-height: 1.8; color: #217a3c; }
.twcf-login-message.is-error { color: #b42318; }
.add_to_cart_button.twcf-in-cart, .ajax_add_to_cart.twcf-in-cart { padding-inline: 14px !important; min-height: 38px; line-height: 1.7 !important; white-space: nowrap; overflow: visible; }
.twcf-mini-cart-qty { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.twcf-mini-qty-btn { width: 28px; height: 28px; border-radius: 9px; border: 1px solid #ddd; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.twcf-mini-qty-input { width: 54px !important; height: 30px !important; min-height: 30px !important; padding: 2px 6px !important; text-align: center; border-radius: 9px !important; }
.twcf-mini-line-price { opacity: .75; }
.twcf-continue-box {
  margin: 16px 0;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffaf0, #fff);
  border: 1px solid #f0dfbd;
  box-shadow: 0 8px 28px rgba(87,62,14,.08);
  color: #222;
  clear: both;
}
.twcf-continue-box-mini { margin: 12px 0 0; padding: 14px; border-radius: 18px; }
.twcf-continue-content strong { display: block; font-size: 15px; line-height: 1.9; margin-bottom: 4px; }
.twcf-continue-content p { margin: 0 0 10px; color: #635b4a; font-size: 13px; line-height: 1.9; }
.twcf-cart-reference { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #fff; border: 1px dashed #d1b26b; margin: 10px 0 12px; font-size: 13px; }
.twcf-cart-reference b { direction: ltr; unicode-bidi: plaintext; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #111; }

.twcf-visible-phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: -2px 0 12px;
  border-radius: 14px;
  background: #f8f6ef;
  border: 1px solid #efe3c6;
  font-size: 13px;
  line-height: 1.8;
}
.twcf-visible-phone span { color: #635b4a; font-weight: 700; }
.twcf-visible-phone a {
  direction: ltr;
  unicode-bidi: plaintext;
  color: #111 !important;
  font-weight: 900;
  text-decoration: none !important;
  white-space: nowrap;
}

.twcf-continue-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.twcf-continue-actions-call-only { grid-template-columns: minmax(0, 1fr); }
.twcf-continue-button { min-height: 42px; border-radius: 14px !important; display: inline-flex !important; align-items: center; justify-content: center; text-align: center; padding: 9px 10px !important; text-decoration: none !important; font-weight: 800; line-height: 1.6 !important; border: 1px solid transparent !important; cursor: pointer; white-space: nowrap; }
.twcf-continue-button-bale { background: #eef5ff !important; color: #1056a3 !important; border-color: #cfe2ff !important; }
.twcf-continue-button-rubika { background: #fff0f5 !important; color: #9e1b52 !important; border-color: #ffd0e0 !important; }
.twcf-continue-button-call { background: #1d1d1d !important; color: #fff !important; font-size: 15px; gap: 8px; min-height: 48px; padding: 11px 16px !important; }
.twcf-call-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 15px; line-height: 1; flex: 0 0 auto; }
.twcf-continue-button.is-disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 767px) {
  .twcf-visible-phone { display: none; }
}
@media (max-width: 480px) {
  .twcf-login-panel { margin: 5vh auto; padding: 16px; }
  .twcf-continue-actions { grid-template-columns: 1fr; }
  .twcf-cart-reference { align-items: flex-start; flex-direction: column; }
  .twcf-toast { left: 12px; right: 12px; bottom: 16px; max-width: none; }
}

/* Safer spacing for Woodmart/WooCommerce product add-to-cart buttons. */
.product .add_to_cart_button,
.product .ajax_add_to_cart,
.wd-product .add_to_cart_button,
.wd-product .ajax_add_to_cart,
button.single_add_to_cart_button,
.single_add_to_cart_button {
  padding: 10px 18px !important;
  min-height: 42px;
  line-height: 1.65 !important;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

/* v1.6.3: extra-safe spacing for Persian add-to-cart labels in Woodmart cards and single product page. */
.product .add_to_cart_button,
.product .ajax_add_to_cart,
.wd-product .add_to_cart_button,
.wd-product .ajax_add_to_cart,
.wd-add-btn > a,
.wd-hover-button > a.add_to_cart_button,
.product-grid-item .add_to_cart_button,
.product-grid-item .ajax_add_to_cart,
button.single_add_to_cart_button,
.single_add_to_cart_button {
  padding: 12px 22px !important;
  min-height: 46px !important;
  line-height: 1.8 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* v1.6.5: explicit cart price refresh button for price-lock notices */
.twcf-refresh-cart-prices-wrap {
  margin-top: 12px;
}

.twcf-refresh-cart-prices {
  padding: 10px 18px !important;
  border-radius: 12px !important;
  line-height: 1.8 !important;
  white-space: normal !important;
}

.twcf-refresh-cart-prices.is-loading {
  opacity: .75;
  cursor: wait;
}

/* v1.11.1: shared Talavest OTP auth card used by My Account and Woodmart header dropdown. */
.twcf-auth-entry,
.twcf-header-auth-card {
  direction: rtl;
  text-align: right;
  color: #222;
}
.twcf-auth-entry {
  width: min(520px, calc(100vw - 28px));
  margin: 36px auto;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffaf0, #fff);
  border: 1px solid #f0dfbd;
  box-shadow: 0 18px 50px rgba(87,62,14,.10);
}
.twcf-header-auth-card {
  min-width: 290px;
  max-width: 340px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffaf0, #fff);
  border: 1px solid #f0dfbd;
}
.twcf-auth-entry-head,
.twcf-header-auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.twcf-auth-entry-icon,
.twcf-header-auth-icon {
  width: 46px;
  height: 46px;
  border-radius: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f1e6;
  font-size: 23px;
  flex: 0 0 auto;
}
.twcf-auth-entry h3,
.twcf-header-auth-card strong {
  margin: 0;
  color: #111;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.6;
}
.twcf-header-auth-card strong {
  display: block;
  font-size: 16px;
}
.twcf-auth-entry p,
.twcf-header-auth-card p {
  margin: 0 0 14px;
  color: #665f51;
  line-height: 1.9;
  font-size: 14px;
}
.twcf-auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.twcf-auth-secondary-button {
  width: 100%;
  min-height: 46px;
  border-radius: 16px !important;
  border: 1px solid #e7d7b6 !important;
  background: #fff !important;
  color: #1d1d1d !important;
  box-shadow: none !important;
  padding: 10px 16px !important;
  font-weight: 800;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  cursor: pointer;
  line-height: 1.7 !important;
}
.twcf-auth-benefits {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e6d5ad;
  color: #5c5548;
  font-size: 13px;
  line-height: 1.8;
}
.twcf-auth-benefits span {
  display: flex;
  align-items: center;
  gap: 7px;
}
@media (max-width: 480px) {
  .twcf-auth-entry { margin: 22px auto; padding: 18px; border-radius: 22px; }
  .twcf-header-auth-card { min-width: 260px; }
}

/* Account page: locked cart snapshots shown above WooCommerce orders. */
.twcf-account-locked-carts {
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid rgba(22, 46, 16, 0.12);
  border-radius: 24px;
  background: linear-gradient(135deg, #fffdf8 0%, #fbf5e8 100%);
  box-shadow: 0 14px 35px rgba(22, 46, 16, 0.08);
  color: #1f261e;
}
.twcf-account-locked-carts__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.twcf-account-locked-carts__head h2 {
  margin: 0 0 6px;
  color: #162e10;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.5;
}
.twcf-account-locked-carts__head p {
  margin: 0;
  color: #635b4c;
  font-size: 14px;
  line-height: 1.9;
}
.twcf-account-locked-carts__cart-link,
.twcf-account-lock-card__actions .button {
  border-radius: 14px !important;
  padding: 10px 15px !important;
  min-height: 42px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none !important;
  font-weight: 800;
}
.twcf-account-locked-carts__cart-link {
  color: #162e10 !important;
  background: #f1c565 !important;
  border: 1px solid rgba(22, 46, 16, 0.08) !important;
}
.twcf-account-locked-carts__empty {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #635b4c;
  line-height: 1.9;
}
.twcf-account-locked-carts__list {
  display: grid;
  gap: 14px;
}
.twcf-account-lock-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(22, 46, 16, 0.10);
}
.twcf-account-lock-card.is-expired {
  border-color: rgba(175, 91, 24, 0.22);
  background: #fff9f1;
}
.twcf-account-lock-card.is-converted {
  border-color: rgba(22, 46, 16, 0.20);
  background: #f7fbf4;
}
.twcf-account-lock-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.twcf-account-lock-card__top strong {
  color: #162e10;
  font-size: 15px;
  line-height: 1.7;
}
.twcf-account-lock-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #6b6357;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.8;
}
.twcf-account-lock-badge {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  background: #eaf3e4;
  color: #162e10;
}
.twcf-account-lock-badge.is-expired {
  background: #fff0df;
  color: #9b4e12;
}
.twcf-account-lock-badge.is-converted {
  background: #e4f4da;
  color: #235c15;
}
.twcf-account-lock-badge.is-waiting {
  background: #fff5d7;
  color: #7b5a00;
}
.twcf-account-lock-card__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.twcf-account-lock-card__summary > div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(246, 240, 226, 0.72);
}
.twcf-account-lock-card__summary span {
  display: block;
  margin-bottom: 4px;
  color: #776e5f;
  font-size: 12px;
  line-height: 1.7;
}
.twcf-account-lock-card__summary strong {
  color: #1f261e;
  font-size: 14px;
  line-height: 1.7;
}
.twcf-account-lock-note {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: 14px;
  background: #f6f0e2;
  color: #5c5548;
  font-size: 13px;
  line-height: 1.9;
}
.twcf-account-lock-note.is-warning {
  background: #fff1df;
  color: #894911;
}
.twcf-account-lock-items {
  margin-top: 12px;
}
.twcf-account-lock-items summary {
  cursor: pointer;
  color: #162e10;
  font-weight: 900;
  line-height: 1.8;
}
.twcf-account-lock-items__table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(22, 46, 16, 0.10);
}
.twcf-account-lock-items table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: #fff;
}
.twcf-account-lock-items th,
.twcf-account-lock-items td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee4cf;
  text-align: right;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.8;
}
.twcf-account-lock-items th {
  color: #162e10;
  background: #f8f1df;
  font-weight: 900;
}
.twcf-account-lock-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.twcf-account-lock-card__actions .button {
  background: #162e10 !important;
  color: #fff !important;
  border: 1px solid #162e10 !important;
}
.twcf-account-lock-card__actions .twcf-account-lock-call {
  background: #f1c565 !important;
  color: #162e10 !important;
  border-color: #f1c565 !important;
}
.twcf-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
@media (max-width: 768px) {
  .twcf-account-locked-carts { padding: 16px; border-radius: 20px; }
  .twcf-account-locked-carts__head,
  .twcf-account-lock-card__top { flex-direction: column; align-items: stretch; }
  .twcf-account-locked-carts__cart-link { width: 100%; }
  .twcf-account-lock-card__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .twcf-account-lock-card__summary { grid-template-columns: 1fr; }
  .twcf-account-lock-card__actions .button { width: 100%; }
}
