/* Hamid Fathi 1.2 — سبد خرید و حساب کاربری
   همه‌ی رنگ‌ها از متغیرهای قالب (Customizer + Dark Mode) می‌آیند. */

:root{
  --bl-cta:var(--dark);
  --bl-soft:#f8e4ea;
  --bl-ok:#2f7d5b; --bl-warn:#9a7420; --bl-bad:#b5443f;
}
body.dark-mode{
  --bl-cta:var(--accent);
  --bl-soft:#33222b;
  --bl-ok:#6fcf9f; --bl-warn:#e0b862; --bl-bad:#f08a86;
}

:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .section-title{font-size:30px;margin:0 0 22px}
.bl-ic{flex:none;display:block}
:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- پیام‌های ووکامرس ---------- */
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) :is(.woocommerce-message,.woocommerce-info,.woocommerce-error){
  list-style:none;margin:0 0 18px;padding:14px 18px;border-radius:16px;
  background:var(--surface);color:var(--text);border:1px solid var(--line);
  border-inline-start:4px solid var(--accent);display:flex;align-items:center;gap:12px;flex-wrap:wrap}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) :is(.woocommerce-message,.woocommerce-info,.woocommerce-error)::before{display:none}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce-error{border-inline-start-color:var(--bl-bad);flex-direction:column;align-items:flex-start;gap:4px}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce-error li{list-style:none;margin:0}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) :is(.woocommerce-message,.woocommerce-info) .button{margin-inline-start:auto;order:2}

/* ---------- دکمه‌ها ---------- */
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border-radius:999px;background:var(--bl-cta);color:#fff;border:1px solid var(--bl-cta);
  padding:12px 24px;font-weight:700;font-size:14px;line-height:1.5;cursor:pointer;transition:filter .15s,background .15s}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button:hover{filter:brightness(1.12);background:var(--bl-cta);color:#fff}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button.bl-ghost{background:transparent;color:var(--text);border-color:var(--line)}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button.bl-ghost:hover{border-color:var(--accent);color:var(--accent);filter:none;background:transparent}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button.bl-sm{padding:8px 16px;font-size:13px}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button.bl-block{width:100%;padding:14px 24px;font-size:15px}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .button:disabled{opacity:.45;cursor:not-allowed}

/* ---------- فرم‌ها ---------- */
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce form .form-row{padding:0;margin:0 0 16px}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce form .form-row label{display:block;font-size:13px;font-weight:700;margin:0 0 6px;line-height:1.6}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce form .form-row .required{color:var(--accent);text-decoration:none;border:0;cursor:inherit}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce :is(input.input-text,select,textarea,.select2-container--default .select2-selection--single){
  width:100%;min-height:48px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);padding:10px 16px;box-shadow:none}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce :is(input.input-text,select,textarea):focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(200,92,122,.12);outline:0}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:28px;padding:0;color:var(--text)}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .select2-container--default .select2-selection--single .select2-selection__arrow{height:46px}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce form .form-row .woocommerce-input-wrapper{display:block}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce input[type=checkbox]{width:auto;min-height:0;accent-color:var(--accent);margin-inline-end:6px}

/* ==========================================================
   سبد خرید
   ========================================================== */
.bl-cart{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:28px;align-items:start}
.bl-cart-main{min-width:0}
.bl-cart-head{display:flex;align-items:baseline;gap:10px;margin-bottom:14px}
.bl-cart-head h2{margin:0;font-size:20px}
.bl-cart-head span{color:var(--muted);font-size:13px}

.bl-ship{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:14px 18px;margin-bottom:18px}
.bl-ship p{margin:0 0 10px;font-size:13px;display:flex;align-items:center;gap:8px}
.bl-ship p .bl-ic{color:var(--accent)}
.bl-ship-bar{height:8px;border-radius:9px;background:var(--bl-soft);overflow:hidden}
.bl-ship-bar i{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,var(--accent),var(--accent2));transition:width .4s}

.bl-cart-items{list-style:none;margin:0;padding:6px 22px;background:var(--surface);border:1px solid var(--line);border-radius:26px}
.bl-item{display:grid;grid-template-columns:88px minmax(0,1fr) auto 110px 36px;grid-template-areas:"img info qty sub rm";
  gap:18px;align-items:center;padding:18px 0;border-bottom:1px solid var(--line)}
.bl-item:last-child{border-bottom:0}
.bl-item-img{grid-area:img}.bl-item-info{grid-area:info}.bl-item-qty{grid-area:qty}.bl-item-sub{grid-area:sub}.bl-item-rm{grid-area:rm}
.bl-item-img img{display:block;width:88px;height:88px;object-fit:cover;border-radius:18px;background:var(--bl-soft)}
.bl-item-name{font-weight:700;font-size:15px;line-height:1.7}
.bl-item-name a:hover{color:var(--accent)}
.bl-item-name dl.variation{display:flex;flex-wrap:wrap;gap:2px 12px;margin:2px 0 0;font-size:12px;font-weight:400;color:var(--muted)}
.bl-item-name dl.variation :is(dt,dd){margin:0;float:none;display:inline}
.bl-item-name dl.variation p{margin:0;display:inline}
.bl-item-name .backorder_notification{margin:2px 0 0;font-size:12px;color:var(--bl-warn)}
.bl-item-price{color:var(--muted);font-size:13px;margin-top:2px}
.bl-item-sub{font-weight:800;text-align:end}

.bl-q{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:3px;background:var(--bg)}
body:is(.woocommerce-cart,.woocommerce-account,.woocommerce-checkout) .woocommerce .bl-q input.qty{width:42px;min-height:34px!important;border:0!important;background:transparent!important;text-align:center;padding:0!important;font-weight:800;box-shadow:none!important;-moz-appearance:textfield}
.bl-q input.qty::-webkit-outer-spin-button,.bl-q input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.bl-q-btn{width:32px;height:32px;border:0;border-radius:50%;background:var(--surface);color:var(--text);font-size:18px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}
.bl-q-btn:hover{background:var(--accent);color:#fff}
.bl-q .screen-reader-text{position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;overflow:hidden}

.bl-remove{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:var(--muted);transition:.15s}
.bl-remove:hover{background:color-mix(in srgb,var(--bl-bad) 14%,transparent);color:var(--bl-bad)}

.bl-cart-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:16px 4px 0}
.bl-cart-actions .coupon{display:flex;gap:8px;flex:1 1 320px;max-width:460px}
.bl-cart-actions .coupon input.input-text{flex:1;min-width:0;border-radius:999px!important}
.bl-js .bl-update{display:none!important}

/* خلاصه سفارش */
.bl-cart-side{position:sticky;top:150px}
body.woocommerce-cart .bl-cart .cart-collaterals{width:100%;float:none}
body.woocommerce-cart .bl-cart .cart-collaterals .cart_totals{float:none!important;width:100%!important;
  background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:24px 24px 20px}
body.woocommerce-cart .cart_totals>h2{font-size:18px;margin:0 0 8px}
body.woocommerce-cart .cart_totals table{display:block;border:0;margin:0;width:100%}
body.woocommerce-cart .cart_totals table :is(tbody){display:block}
body.woocommerce-cart .cart_totals table tr{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:12px 0;border-bottom:1px dashed var(--line)}
body.woocommerce-cart .cart_totals table :is(th,td){display:block!important;border:0!important;padding:0!important;background:none!important}
body.woocommerce-cart .cart_totals table th{font-weight:400;color:var(--muted);width:auto!important;text-align:start!important}
body.woocommerce-cart .cart_totals table td{font-weight:700;text-align:end!important}
body.woocommerce-cart .cart_totals table td::before{display:none!important;content:none!important}
body.woocommerce-cart .cart_totals table tr.woocommerce-shipping-totals{display:block}
body.woocommerce-cart .cart_totals table tr.woocommerce-shipping-totals td{text-align:start!important;font-weight:400;margin-top:8px}
body.woocommerce-cart .cart_totals ul#shipping_method{list-style:none;margin:0;padding:0}
body.woocommerce-cart .cart_totals ul#shipping_method li{margin:0 0 6px}
body.woocommerce-cart .cart_totals ul#shipping_method label{display:inline;font-weight:400}
body.woocommerce-cart .cart_totals .shipping-calculator-button{color:var(--accent);font-weight:700;font-size:13px}
body.woocommerce-cart .cart_totals tr.order-total{border-bottom:0;padding-top:16px}
body.woocommerce-cart .cart_totals tr.order-total th{color:var(--text);font-weight:700}
body.woocommerce-cart .cart_totals tr.order-total td{font-size:21px;font-weight:800}
body.woocommerce-cart .cart_totals tr.order-total small{display:block;font-size:11px;font-weight:400;color:var(--muted)}
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout{padding:8px 0 0}
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button{display:flex!important;width:100%;margin:0!important;padding:16px 24px!important;font-size:16px!important}
.bl-secure{display:flex;align-items:center;justify-content:center;gap:8px;margin:14px 0 0;font-size:12px;color:var(--muted)}
.bl-secure .bl-ic{color:var(--bl-ok)}

.cross-sells{grid-column:1/-1;margin-top:44px}
.cross-sells>h2{font-size:22px;margin:0 0 16px}

/* سبد خالی + حالت خالی سفارش‌ها */
.bl-empty{text-align:center;background:var(--surface);border:1px dashed var(--line);border-radius:28px;padding:64px 24px}
.bl-empty--sm{padding:44px 24px}
.bl-empty-ic{display:inline-grid;place-items:center;width:76px;height:76px;border-radius:50%;background:var(--bl-soft);color:var(--accent);margin-bottom:16px}
.bl-empty h2{margin:0 0 6px;font-size:22px}
.bl-empty p{margin:0 auto 22px;max-width:380px;color:var(--muted);font-size:14px}

/* ==========================================================
   ورود / ثبت‌نام
   ========================================================== */
.bl-plum{position:relative;overflow:hidden;color:#fff;
  background:radial-gradient(120% 140% at 0% 0%,rgba(212,168,92,.30),transparent 45%),linear-gradient(135deg,#3b202e 0%,#7c3550 58%,var(--accent) 135%)}
.bl-plum::before{content:"";position:absolute;inset-inline-end:-100px;top:-100px;width:340px;height:340px;border-radius:50%;
  background:repeating-radial-gradient(circle,rgba(255,255,255,.14) 0 1px,transparent 1px 16px);pointer-events:none}
.bl-plum>*{position:relative}

body.woocommerce-account:not(.logged-in) .section-title{text-align:center}
.bl-auth{display:grid;grid-template-columns:5fr 6fr;max-width:980px;margin:0 auto;min-height:540px;
  background:var(--surface);border:1px solid var(--line);border-radius:30px;overflow:hidden;box-shadow:var(--shadow)}
.bl-auth-aside{padding:42px 38px;display:flex;flex-direction:column;justify-content:space-between;gap:36px}
.bl-wordmark{font-size:20px;font-weight:900;letter-spacing:-.5px;direction:ltr;text-align:start}
.bl-wordmark span{color:var(--accent2)}
.bl-auth-aside h2{font-size:26px;line-height:1.6;margin:0 0 22px}
.bl-auth-aside ul{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.bl-auth-aside li{display:flex;align-items:center;gap:12px;font-size:14px;color:#f8edf1}
.bl-auth-aside li .bl-ic{width:38px;height:38px;padding:9px;border-radius:50%;background:rgba(255,255,255,.14);color:var(--accent2)}
.bl-auth-main{padding:42px 44px;align-self:center}
.bl-auth-tabs{display:inline-flex;background:var(--bl-soft);border-radius:999px;padding:4px;margin-bottom:26px}
.bl-auth-tabs button{border:0;background:transparent;color:var(--muted);padding:8px 24px;border-radius:999px;cursor:pointer;font-size:14px}
.bl-auth-tabs button.is-active{background:var(--surface);color:var(--text);font-weight:700;box-shadow:0 2px 10px rgba(73,35,49,.10)}
.bl-tabs-on .bl-pane{display:none}
.bl-tabs-on .bl-pane.is-active{display:block}
.bl-pane+.bl-pane{margin-top:36px}.bl-tabs-on .bl-pane+.bl-pane{margin-top:0}
.bl-pane h2{margin:0 0 4px;font-size:24px}
.bl-sub{margin:0 0 20px;color:var(--muted);font-size:14px}
.bl-row-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 18px;font-size:13px}
.bl-row-meta a{color:var(--accent);font-weight:700}
.bl-row-meta label{display:inline-flex!important;align-items:center;margin:0!important;font-weight:400!important}
body.woocommerce-account:not(.logged-in) .woocommerce-ResetPassword{max-width:480px;margin:0 auto;background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:30px}
.woocommerce-ResetPassword .form-row{float:none!important;width:100%!important}

/* ==========================================================
   حساب کاربری (بعد از ورود)
   ========================================================== */
body.woocommerce-account.logged-in .woocommerce{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;align-items:start}
body.woocommerce-account.logged-in .woocommerce::before,body.woocommerce-account.logged-in .woocommerce::after{display:none}
body.woocommerce-account.logged-in .woocommerce-notices-wrapper{grid-column:1/-1}
body.woocommerce-account.logged-in .woocommerce-notices-wrapper:empty{display:none}
body.woocommerce-account .woocommerce-MyAccount-navigation{float:none;width:auto}
body.woocommerce-account .woocommerce-MyAccount-content{float:none;width:auto;min-width:0}

.bl-acc-nav{position:sticky;top:150px;background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:12px}
.bl-acc-user{display:flex;align-items:center;gap:12px;padding:10px 10px 16px;margin-bottom:8px;border-bottom:1px solid var(--line)}
.bl-acc-user div{min-width:0}
.bl-acc-user strong{display:block;font-size:15px;line-height:1.5}
.bl-acc-user small{display:block;direction:ltr;text-align:right;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bl-avatar{flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:19px;background:var(--dark);color:var(--accent2)}
.bl-avatar--lg{width:60px;height:60px;font-size:25px;background:rgba(255,255,255,.14);color:var(--accent2);box-shadow:inset 0 0 0 1px rgba(212,168,92,.55)}
.bl-acc-nav ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.bl-acc-nav li a{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:14px;color:var(--muted);font-size:14px;transition:background .15s,color .15s}
.bl-acc-nav li a:hover{background:var(--bl-soft);color:var(--text)}
.bl-acc-nav li.is-active a{background:var(--bl-cta);color:#fff;font-weight:700}
.bl-acc-nav li.woocommerce-MyAccount-navigation-link--customer-logout{margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
.bl-acc-nav li.woocommerce-MyAccount-navigation-link--customer-logout a:hover{color:var(--bl-bad);background:color-mix(in srgb,var(--bl-bad) 12%,transparent)}

/* داشبورد */
.bl-card{border-radius:28px;padding:28px;box-shadow:var(--shadow)}
.bl-card::after{content:"";position:absolute;inset:10px;border:1px solid rgba(212,168,92,.42);border-radius:20px;pointer-events:none}
.bl-card-top{display:flex;align-items:center;gap:16px;margin-bottom:26px}
.bl-card-top h2{margin:0;font-size:24px;line-height:1.4}
.bl-card-top p{margin:2px 0 0;font-size:13px;color:#f2dce3}
.bl-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:14px;margin:0}
.bl-stats div{border-top:1px solid rgba(255,255,255,.22);padding-top:12px}
.bl-stats dt{font-size:12px;color:#f2dce3}
.bl-stats dd{margin:0;font-size:22px;font-weight:800;line-height:1.5}
.bl-stats dd .woocommerce-Price-currencySymbol{font-size:12px;font-weight:400;margin-inline-start:3px}

.bl-last{display:flex;align-items:center;gap:16px;margin-top:16px;padding:16px 20px;background:var(--surface);border:1px solid var(--line);border-radius:20px;transition:border-color .15s}
.bl-last:hover{border-color:var(--accent)}
.bl-last>div{flex:1;min-width:0}
.bl-last small{display:block;color:var(--muted);font-size:12px}
.bl-last strong{white-space:nowrap}
.bl-last-total{font-weight:800}

.bl-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-top:16px}
.bl-tile{display:block;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:18px;transition:border-color .15s}
.bl-tile:hover{border-color:var(--accent)}
.bl-tile-ic{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--bl-soft);color:var(--accent);margin-bottom:12px}
.bl-tile strong{display:block;font-size:15px}
.bl-tile small{display:block;color:var(--muted);font-size:12px;margin-top:2px}

/* وضعیت سفارش */
.bl-status{display:inline-block;font-size:12px;font-weight:700;padding:3px 12px;border-radius:999px;white-space:nowrap;color:var(--accent);background:color-mix(in srgb,currentColor 13%,transparent)}
.bl-status.status-completed{color:var(--bl-ok)}
.bl-status:is(.status-pending,.status-on-hold){color:var(--bl-warn)}
.bl-status:is(.status-cancelled,.status-failed,.status-refunded){color:var(--bl-bad)}

/* سفارش‌ها */
.bl-orders{display:grid;gap:14px}
.bl-order{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:18px 20px}
.bl-order header,.bl-order-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.bl-order-no{font-weight:800}
.bl-order-no:hover{color:var(--accent)}
.bl-order time{display:block;color:var(--muted);font-size:12px}
.bl-order-thumbs{display:flex;align-items:center;gap:8px;margin:14px 0}
.bl-order-thumbs img{display:block;width:56px;height:56px;object-fit:cover;border-radius:14px;background:var(--bl-soft);border:1px solid var(--line)}
.bl-more{width:56px;height:56px;border-radius:14px;display:grid;place-items:center;background:var(--bl-soft);color:var(--accent);font-weight:800;font-size:13px}
.bl-order-total{font-weight:800}
.bl-order-total small{display:inline;margin-inline-start:8px;font-weight:400;color:var(--muted);font-size:12px}
.bl-order-actions{display:flex;gap:8px;flex-wrap:wrap}
.bl-pager{display:flex;justify-content:space-between;margin-top:16px}

/* کارت‌های ثابت داخل صفحه‌های حساب */
body.woocommerce-account .woocommerce-MyAccount-content>form,
body.woocommerce-account .woocommerce-order-details,
body.woocommerce-account .woocommerce-customer-details,
body.woocommerce-account .woocommerce-order-downloads,
body.woocommerce-account .woocommerce-Address{
  background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:24px;margin:0 0 16px}
body.woocommerce-account .woocommerce-MyAccount-content>form>h2,
body.woocommerce-account :is(.woocommerce-order-details__title,.woocommerce-column__title,.woocommerce-order-downloads__title){font-size:18px;margin:0 0 14px}
body.woocommerce-account .woocommerce-MyAccount-content>p:first-child{color:var(--muted);font-size:14px}
body.woocommerce-account .woocommerce-MyAccount-content mark{background:var(--bl-soft);color:var(--accent);padding:1px 8px;border-radius:8px;font-weight:700}

.woocommerce-Addresses{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.woocommerce-Addresses::before,.woocommerce-Addresses::after{display:none}
body.woocommerce-account .woocommerce-Addresses :is(.col-1,.col-2,.u-column1,.u-column2){float:none!important;width:auto!important}
body.woocommerce-account .woocommerce-Addresses .woocommerce-Address{margin:0}
.woocommerce-Address-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.woocommerce-Address-title h2,.woocommerce-Address-title h3{margin:0;font-size:17px}
.woocommerce-Address-title a.edit{float:none;font-size:13px;font-weight:700;color:var(--accent)}
.woocommerce-Address address{font-style:normal;color:var(--muted);line-height:2}

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 form.woocommerce-EditAccountForm>*{grid-column:1/-1}
body.woocommerce-account form .form-row{grid-column:1/-1}
body.woocommerce-account form :is(.form-row-first,.form-row-last){grid-column:auto;float:none!important;width:auto!important}
body.woocommerce-account form .clear{display:none}
body.woocommerce-account form fieldset{border:1px solid var(--line);border-radius:18px;padding:18px 18px 4px;margin:8px 0 18px}
body.woocommerce-account form fieldset legend{padding:0 8px;font-weight:800;font-size:15px}
body.woocommerce-account form em,body.woocommerce-account form span em{display:block;margin-top:6px;font-size:12px;font-style:normal;color:var(--muted)}

/* جدول‌ها (جزئیات سفارش، دانلودها) */
body.woocommerce-account table.shop_table{width:100%;border:0;border-collapse:collapse;margin:0}
body.woocommerce-account table.shop_table :is(th,td){padding:12px 8px;border:0;border-bottom:1px solid var(--line);background:none;text-align:start;vertical-align:middle}
body.woocommerce-account table.shop_table thead th{font-size:12px;color:var(--muted);font-weight:700}
body.woocommerce-account table.shop_table tfoot th{color:var(--muted);font-weight:400}
body.woocommerce-account table.shop_table tfoot tr:last-child :is(th,td){font-weight:800;font-size:16px;color:var(--text);border-bottom:0}
body.woocommerce-account table.shop_table img{border-radius:12px}
body.woocommerce-account .woocommerce-customer-details address{font-style:normal;border:0;padding:0;color:var(--muted);line-height:2}


/* ---------- ثبت‌نام: ردیف دوستونه ---------- */
.bl-row-2{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.bl-row-2>.form-row{float:none!important;width:auto!important;min-width:0}

/* ---------- کارت اطلاعات کاربری در داشبورد ---------- */
.bl-profile{background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:22px 24px;margin:0 0 16px}
.bl-profile-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.bl-profile-head h3{margin:0;font-size:17px}
.bl-profile-edit{font-size:13px;font-weight:700;color:var(--accent);padding:6px 16px;border-radius:999px;background:var(--bl-soft)}
.bl-profile-edit:hover{filter:brightness(.97)}
.bl-profile-list{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px 20px}
.bl-profile-list dt{font-size:12px;color:var(--muted);margin-bottom:2px}
.bl-profile-list dd{margin:0;font-weight:700;overflow-wrap:anywhere}
.bl-profile-list dd[dir=ltr]{text-align:end}
.bl-muted{color:var(--muted);font-weight:400}
body.woocommerce-account form.woocommerce-EditAccountForm>h2{font-size:18px;margin:0 0 14px}

/* ---------- ریسپانسیو ---------- */
@media(max-width:1000px){
  .bl-cart{grid-template-columns:1fr}
  .bl-cart-side{position:static}
}
@media(max-width:900px){
  body.woocommerce-account.logged-in .woocommerce{grid-template-columns:minmax(0,1fr);gap:18px}
  .bl-acc-nav{position:static;padding:10px}
  .bl-acc-user{display:none}
  .bl-acc-nav ul{display:flex;overflow-x:auto;gap:6px;scrollbar-width:none}
  .bl-acc-nav li{flex:none}
  .bl-acc-nav li.woocommerce-MyAccount-navigation-link--customer-logout{margin:0;padding:0;border:0}
  .bl-auth{grid-template-columns:1fr}
  .bl-auth-aside{padding:26px}
  .bl-auth-aside ul{display:none}
  .bl-auth-aside h2{font-size:20px;margin:0}
  .bl-auth-main{padding:28px 22px}
}
@media(max-width:680px){
  .bl-cart-items{padding:4px 16px;border-radius:22px}
  .bl-item{grid-template-columns:76px minmax(0,1fr) auto;grid-template-areas:"img info rm" "img qty sub";gap:10px 14px;align-items:start}
  .bl-item-img img{width:76px;height:76px}
  .bl-item-sub{align-self:center;justify-self:end}
  .bl-item-rm{justify-self:end}
  .bl-cart-actions .coupon{max-width:none;flex-basis:100%}
  body.woocommerce-account :is(.woocommerce-address-fields__field-wrapper,form.woocommerce-EditAccountForm){grid-template-columns:1fr}
  .bl-card{padding:22px}
  .bl-row-2{grid-template-columns:1fr}
  .bl-last{flex-wrap:wrap}
}

/* ==========================================================
   تسویه حساب (Checkout) + صفحه‌ی سفارش ثبت شد
   ========================================================== */

/* نوار مراحل */
.bl-steps{list-style:none;margin:0 0 26px;padding:0;display:flex;align-items:center;gap:0}
.bl-steps li{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px;flex:none}
.bl-steps li+li::before{content:"";display:block;width:clamp(28px,8vw,90px);height:2px;margin-inline:14px;background:var(--line);border-radius:2px}
.bl-steps li.is-done+li::before,.bl-steps li.is-current::before{background:linear-gradient(90deg,var(--accent),var(--accent2))}
.bl-steps a{display:flex;align-items:center;gap:10px;color:inherit}
.bl-step-dot{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--line);background:var(--surface);font-style:normal;font-size:13px;font-weight:800;color:var(--muted)}
.bl-steps li b{font-weight:600}
.bl-steps li.is-current{color:var(--text)}
.bl-steps li.is-current b{font-weight:800}
.bl-steps li.is-current .bl-step-dot{background:var(--bl-cta);border-color:var(--bl-cta);color:#fff}
.bl-steps li.is-done .bl-step-dot{background:var(--bl-soft);border-color:transparent;color:var(--accent)}
.bl-steps a:hover b{color:var(--accent)}

/* چیدمان دو ستونه */
form.bl-checkout{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:28px;align-items:start}
.bl-co-main{min-width:0}
.bl-co-side{position:sticky;top:150px}
.bl-checkout #customer_details{display:block}
.bl-checkout #customer_details::before,.bl-checkout #customer_details::after{display:none}
body.woocommerce-checkout .bl-checkout :is(.col-1,.col-2){float:none!important;width:auto!important}

/* کارت‌های فرم */
.bl-box{background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:26px;margin:0 0 18px}
.bl-box>h3{display:flex;align-items:center;gap:10px;margin:0 0 18px;font-size:18px}
.bl-box>h3 .bl-ic{color:var(--accent)}
.bl-box>h3 label{display:flex;align-items:center;gap:10px;margin:0;font-size:18px;font-weight:800;cursor:pointer}
.bl-box>h3 label input{order:3;margin-inline-start:auto}
.shipping_address{margin-top:4px}
body.woocommerce-checkout :is(.woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper,.woocommerce-additional-fields__field-wrapper){display:grid;grid-template-columns:1fr 1fr;column-gap:16px}
body.woocommerce-checkout :is(.woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper,.woocommerce-additional-fields__field-wrapper) .form-row{grid-column:1/-1;float:none;width:auto}
body.woocommerce-checkout :is(.woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper) :is(.form-row-first,.form-row-last){grid-column:auto;float:none!important;width:auto!important}
body.woocommerce-checkout .bl-checkout .form-row .woocommerce-input-wrapper{display:block}
body.woocommerce-checkout .bl-checkout textarea{min-height:110px;resize:vertical}
body.woocommerce-checkout .bl-checkout .clear{display:none}
body.woocommerce-checkout .bl-checkout .woocommerce-invalid :is(input.input-text,select,.select2-selection){border-color:var(--bl-bad)}
body.woocommerce-checkout .bl-checkout .woocommerce-validated input.input-text{border-color:var(--line)}
body.woocommerce-checkout .bl-box .create-account{margin:0}
body.woocommerce-checkout .bl-box .create-account label.checkbox{display:flex;align-items:center;gap:8px;margin:0;font-weight:700;cursor:pointer}

body.woocommerce-checkout .bl-box :is(.form-row:last-child,.woocommerce-billing-fields__field-wrapper>.form-row:last-child){margin-bottom:0!important}
body.woocommerce-checkout .bl-box .woocommerce-shipping-fields__field-wrapper{margin-bottom:0}

/* ورود و کد تخفیف بالای فرم */
body.woocommerce-checkout :is(form.checkout_coupon,form.woocommerce-form-login){background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:20px;margin:0 0 18px}
body.woocommerce-checkout form.checkout_coupon{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
body.woocommerce-checkout form.checkout_coupon>p{margin:0;float:none;width:auto}
body.woocommerce-checkout form.checkout_coupon>p:first-child{flex:1 1 100%;color:var(--muted);font-size:13px}
body.woocommerce-checkout form.checkout_coupon .form-row-first{flex:1 1 220px}
body.woocommerce-checkout form.checkout_coupon .input-text{border-radius:999px!important}
body.woocommerce-checkout form.checkout_coupon .clear{display:none}
body.woocommerce-checkout form.woocommerce-form-login .form-row{float:none;width:100%}
body.woocommerce-checkout :is(.woocommerce-form-login-toggle,.woocommerce-form-coupon-toggle) .woocommerce-info a{color:var(--accent);font-weight:700}

/* خلاصه‌ی سفارش */
.bl-co-summary{background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:24px}
body.woocommerce-checkout #order_review_heading{font-size:18px;margin:0 0 6px}
body.woocommerce-checkout .woocommerce-checkout-review-order-table{display:block;border:0;margin:0;width:100%}
body.woocommerce-checkout .woocommerce-checkout-review-order-table :is(tbody,tfoot){display:block}
body.woocommerce-checkout .woocommerce-checkout-review-order-table thead{display:none}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:12px 0;border-bottom:1px dashed var(--line)}
body.woocommerce-checkout .woocommerce-checkout-review-order-table :is(th,td){display:block!important;border:0!important;padding:0!important;background:none!important;width:auto!important}
body.woocommerce-checkout .woocommerce-checkout-review-order-table th{font-weight:400;color:var(--muted);text-align:start!important}
body.woocommerce-checkout .woocommerce-checkout-review-order-table td{font-weight:700;text-align:end!important}
body.woocommerce-checkout .woocommerce-checkout-review-order-table td::before{display:none!important;content:none!important}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody tr{align-items:center;border-bottom:1px solid var(--line)}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody td.product-name{flex:1;min-width:0;text-align:start!important;font-weight:400}
.bl-rv{display:flex;align-items:center;gap:12px}
.bl-rv-img img{display:block;width:54px;height:54px;object-fit:cover;border-radius:14px;background:var(--bl-soft)}
.bl-rv-name{font-size:14px;font-weight:700;line-height:1.7}
.bl-rv-name .product-quantity{color:var(--accent);font-weight:800;font-size:13px}
.bl-rv-name dl.variation{display:flex;flex-wrap:wrap;gap:0 10px;margin:0;font-size:12px;font-weight:400;color:var(--muted)}
.bl-rv-name dl.variation :is(dt,dd){margin:0;float:none;display:inline}
.bl-rv-name dl.variation p{margin:0;display:inline}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals{display:block}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td{text-align:start!important;font-weight:400;margin-top:8px}
body.woocommerce-checkout ul#shipping_method{list-style:none;margin:0;padding:0}
body.woocommerce-checkout ul#shipping_method li{margin:0 0 8px;display:flex;align-items:center;gap:8px}
body.woocommerce-checkout ul#shipping_method label{display:inline;margin:0;font-weight:400;font-size:14px}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.order-total{border-bottom:0;padding-top:16px}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.order-total th{color:var(--text);font-weight:700}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.order-total td{font-size:21px;font-weight:800}
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.order-total small{display:block;font-size:11px;font-weight:400;color:var(--muted)}

/* روش‌های پرداخت */
body.woocommerce-checkout #payment{background:none;border-radius:0;margin-top:6px}
body.woocommerce-checkout #payment ul.wc_payment_methods{list-style:none;margin:0 0 16px;padding:0;border:0;display:grid;gap:10px;text-align:start}
body.woocommerce-checkout #payment ul.wc_payment_methods>li{margin:0;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:var(--bg);transition:border-color .15s}
body.woocommerce-checkout #payment ul.wc_payment_methods>li:has(input[type=radio]:checked){border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 3px rgba(200,92,122,.10)}
body.woocommerce-checkout #payment ul.wc_payment_methods>li{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px}
body.woocommerce-checkout #payment ul.wc_payment_methods>li>.payment_box{flex:1 1 100%}
body.woocommerce-checkout #payment ul.wc_payment_methods>li>label{display:inline-flex;align-items:center;gap:8px;margin:0;font-weight:700;font-size:14px;cursor:pointer}
body.woocommerce-checkout #payment ul.wc_payment_methods input[type=radio]{accent-color:var(--accent);margin:0}
body.woocommerce-checkout #payment ul.wc_payment_methods img{max-height:24px;width:auto;border-radius:4px;margin-inline-start:6px}
body.woocommerce-checkout #payment div.payment_box{margin:10px 0 0;padding:12px 14px;border-radius:14px;background:var(--bl-soft);color:var(--muted);font-size:13px;line-height:1.9}
body.woocommerce-checkout #payment div.payment_box::before{display:none}
body.woocommerce-checkout #payment div.payment_box p{margin:0}
body.woocommerce-checkout #payment div.form-row{padding:0;margin:0}
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper{margin:0 0 14px;font-size:12px;color:var(--muted);line-height:1.9}
body.woocommerce-checkout .woocommerce-privacy-policy-text p{margin:0 0 10px}
body.woocommerce-checkout .woocommerce-privacy-policy-text a,.woocommerce-terms-and-conditions-link{color:var(--accent);font-weight:700}
body.woocommerce-checkout #payment #place_order{float:none!important;display:flex;width:100%;padding:16px 24px;font-size:16px;border-radius:999px;background:var(--bl-cta);border:1px solid var(--bl-cta);color:#fff}
body.woocommerce-checkout #payment #place_order:hover{background:var(--bl-cta);filter:brightness(1.12)}

/* صفحه‌ی سفارش ثبت شد */
.bl-ty{border-radius:28px;padding:34px 30px;text-align:center;box-shadow:var(--shadow)}
.bl-ty::after{content:"";position:absolute;inset:10px;border:1px solid rgba(212,168,92,.42);border-radius:20px;pointer-events:none}
.bl-ty-ic{display:inline-grid;place-items:center;width:68px;height:68px;border-radius:50%;background:rgba(255,255,255,.14);color:var(--accent2);box-shadow:inset 0 0 0 1px rgba(212,168,92,.55);margin-bottom:14px}
.bl-ty h2{margin:0 0 8px;font-size:28px;color:inherit}
.bl-ty>p{margin:0 auto 26px;max-width:560px;color:#f2dce3;font-size:14px;line-height:2}
.bl-ty .bl-stats{text-align:start;margin-top:4px}
.bl-ty .bl-sm-dd{font-size:15px}
.bl-ty--fail{position:relative;background:var(--surface);border:1px solid var(--line);color:var(--text);box-shadow:none}
.bl-ty--fail::after{display:none}
.bl-ty--fail .bl-ty-ic{background:color-mix(in srgb,var(--bl-bad) 14%,transparent);color:var(--bl-bad);box-shadow:none}
.bl-ty--fail>p{color:var(--muted)}
.bl-ty-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.bl-ty-links{text-align:center;margin:14px 0 0;font-size:14px}
.bl-ty-links a{color:var(--accent);font-weight:700}
body.woocommerce-checkout :is(.woocommerce-order-details,.woocommerce-customer-details){background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:24px;margin:18px 0 0}
body.woocommerce-checkout :is(.woocommerce-order-details__title,.woocommerce-column__title){font-size:18px;margin:0 0 14px}
body.woocommerce-checkout table.shop_table{width:100%;border:0;border-collapse:collapse;margin:0}
body.woocommerce-checkout .woocommerce-order-details table.shop_table :is(th,td){padding:12px 8px;border:0;border-bottom:1px solid var(--line);background:none;text-align:start}
body.woocommerce-checkout .woocommerce-order-details table.shop_table :is(th,td):last-child{text-align:end;white-space:nowrap;width:1%}
body.woocommerce-checkout .woocommerce-order-details table.shop_table thead th{font-size:12px;color:var(--muted);font-weight:700}
body.woocommerce-checkout .woocommerce-order-details table.shop_table tfoot th{color:var(--muted);font-weight:400}
body.woocommerce-checkout .woocommerce-order-details table.shop_table tfoot tr:last-child :is(th,td){font-weight:800;font-size:16px;color:var(--text);border-bottom:0}
body.woocommerce-checkout .woocommerce-customer-details address{font-style:normal;border:0;padding:0;color:var(--muted);line-height:2}
body.woocommerce-checkout .woocommerce-customer-details .col2-set{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}
body.woocommerce-checkout .woocommerce-customer-details .col2-set::before,body.woocommerce-checkout .woocommerce-customer-details .col2-set::after{display:none}
body.woocommerce-checkout .woocommerce-customer-details :is(.col-1,.col-2){float:none;width:auto}

/* ریسپانسیو چک‌اوت */
@media(max-width:1000px){
  form.bl-checkout{grid-template-columns:minmax(0,1fr)}
  .bl-co-side{position:static}
}
@media(max-width:680px){
  .bl-steps li b{display:none}
  .bl-steps li.is-current b{display:inline}
  .bl-steps li+li::before{margin-inline:8px;width:clamp(16px,6vw,50px)}
  .bl-box{padding:20px;border-radius:22px}
  body.woocommerce-checkout :is(.woocommerce-billing-fields__field-wrapper,.woocommerce-shipping-fields__field-wrapper){grid-template-columns:1fr}
  .bl-ty{padding:28px 18px}
  .bl-co-summary{padding:20px}
}

/* ───────── سفارش‌ها: تب‌ها و مراحل پیشرفت (v1.7) ───────── */
.bl-otabs{display:flex;gap:8px;margin:0 0 16px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.bl-otabs::-webkit-scrollbar{display:none}
.bl-otabs a{flex:none;display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:13px;font-weight:700;transition:border-color .2s,color .2s,background .2s}
.bl-otabs a:hover{border-color:var(--accent);color:var(--accent)}
.bl-otabs a b{min-width:22px;height:22px;padding:0 6px;display:inline-grid;place-items:center;border-radius:999px;font-size:11px;font-weight:800;background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--accent)}
.bl-otabs a.is-on{background:var(--accent);border-color:var(--accent);color:#fff}
.bl-otabs a.is-on b{background:rgba(255,255,255,.24);color:#fff}
.bl-otabs a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.bl-track{display:flex;list-style:none;margin:16px 0 4px;padding:0}
.bl-track li{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:7px;font-size:11.5px;color:var(--muted);text-align:center}
.bl-track li::before{content:"";position:relative;z-index:1;width:12px;height:12px;border-radius:50%;border:2px solid var(--line);background:var(--surface)}
.bl-track li:not(:last-child)::after{content:"";position:absolute;top:5px;inset-inline-start:50%;width:100%;height:2px;background:var(--line)}
.bl-track li.is-done::before{background:var(--accent);border-color:var(--accent)}
.bl-track li.is-done::after{background:var(--accent)}
.bl-track li.is-now{color:var(--text);font-weight:800}
.bl-track li.is-now::before{border-color:var(--accent);background:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%,transparent)}
.bl-stats dd a{color:inherit;text-decoration:underline;text-underline-offset:5px;text-decoration-color:rgba(255,255,255,.4)}

/* ───────── اطلاعات کاربری: خلاصه ⇄ ویرایش ───────── */
.bl-pv{background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:24px;box-shadow:var(--shadow)}
.bl-pv-head{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:20px}
.bl-pv-who{flex:1;min-width:160px}
.bl-pv-who h2{margin:0;font-size:20px;line-height:1.5}
.bl-pv-who p{margin:0;font-size:13px;color:var(--muted)}
.bl-pv .bl-profile-list>div{padding-top:12px;border-top:1px solid var(--line)}
.bl-pv .bl-profile-list dt{font-size:12px;color:var(--muted)}
.bl-pv .bl-profile-list dd{margin:2px 0 0;font-size:15px;font-weight:700;word-break:break-word}
.bl-edit-cancel{display:none}
.bl-js .bl-edit-cancel{display:inline-flex;margin-inline-start:8px}
.bl-js .bl-acc-edit:not(.is-editing) .bl-edit{display:none}
.bl-acc-edit.is-editing .bl-pv{display:none}
@media (max-width:640px){.bl-pv{padding:18px}.bl-pv-head .button{width:100%}}
