/* SidaSport — صفحه‌ی سبد خرید (طراحی جدید)
   فقط روی صفحه‌ی سبد لود می‌شه. همه‌ی رنگ‌های برند از متغیرهای «رنگ‌های اصلی سایت» می‌آد
   (--brand, --brand-dark, --brand-soft, --brand-bg, --dark, --text, --muted).
   قالب‌ها: woocommerce/cart/*.php — رفتار: assets/cart.js */

body.woocommerce-cart{ background:var(--brand-bg); }
body.woocommerce-cart .wc-page-wrap > .page-title{ display:none; }
/* sticky وقتی کار می‌کنه که هیچ والدی overflow:hidden نداشته باشه */
body.woocommerce-cart .section{ overflow:visible;overflow-x:clip; }

.pc-cart{
  --pc-radius:22px;
  --pc-shadow:0 1px 2px rgba(11,42,68,.05),0 18px 40px -24px rgba(11,42,68,.28);
  --pc-line:#e9f3f8;
  --pc-green:#15803d;
  --pc-red:#e11d48;
  max-width:1120px;margin:0 auto;padding:4px 0 56px;color:var(--text);
}
.pc-cart *,.pc-cart *::before,.pc-cart *::after{ box-sizing:border-box; }
.pc-cart :is(h1,h2,h3,p,ul,ol){ margin:0;padding:0; }
.pc-cart ul,.pc-cart ol{ list-style:none; }
.pc-i{ width:20px;height:20px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }

/* ---------- سربرگ + مراحل خرید ---------- */
.pc-head{ display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin:6px 0 26px; }
.pc-title{ font-size:28px;font-weight:800;line-height:1.5;color:var(--dark); }
.pc-steps{ display:flex;align-items:center;font-size:13px;color:var(--muted); }
.pc-steps li{ display:flex;align-items:center;gap:8px; }
.pc-steps li + li::before{ content:"";width:clamp(18px,5vw,56px);height:2px;margin-inline:10px;border-radius:2px;background:#d6e5eb; }
.pc-step-dot{
  width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  font-size:12.5px;font-weight:800;background:#e3f1f7;color:#748b95;
}
.pc-steps li.is-active{ color:var(--dark);font-weight:800; }
.pc-steps li.is-active .pc-step-dot{ background:var(--brand);color:#fff;box-shadow:0 0 0 5px color-mix(in srgb,var(--brand) 18%,transparent); }
.pc-steps li.is-active::before,.pc-steps li.is-done::before{ background:var(--brand); }
.pc-steps li.is-done .pc-step-dot{ background:var(--brand-soft);color:var(--brand-dark); }

/* ---------- چیدمان دو ستونه ---------- */
.pc-grid{ display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:28px;align-items:start; }
.pc-main,.pc-side{ min-width:0; }
.pc-side{ position:sticky;top:var(--pc-top,96px); }

/* ---------- لیست کالاها ---------- */
.pc-list-head{ display:flex;align-items:center;justify-content:space-between;margin:0 4px 14px; }
.pc-list-head h2{ font-size:17px;font-weight:800;color:var(--dark); }
.pc-count{ font-size:12.5px;font-weight:700;color:var(--brand-dark);background:var(--brand-soft);border-radius:30px;padding:5px 12px; }

.pc-items{ display:flex;flex-direction:column;gap:14px; }
.pc-item{
  position:relative;display:grid;grid-template-columns:112px minmax(0,1fr);gap:18px;
  background:#fff;border-radius:var(--pc-radius);padding:16px;box-shadow:var(--pc-shadow);
  transition:box-shadow .2s ease,transform .2s ease;
}
.pc-item:hover{ box-shadow:0 1px 2px rgba(11,42,68,.06),0 22px 44px -22px rgba(14,165,233,.34); }

.pc-item-thumb{ position:relative;align-self:start; }
.pc-item-thumb a{ display:block; }
.pc-item-thumb img{ display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:16px;background:var(--gray-bg); }
.pc-badge-off{
  position:absolute;top:8px;right:8px;z-index:1;padding:3px 9px;border-radius:30px;
  font-size:11.5px;font-weight:800;line-height:1.6;color:#fff;background:var(--pc-red);
  box-shadow:0 6px 12px -6px rgba(225,29,72,.7);
}

.pc-item-body{ display:flex;flex-direction:column;gap:8px;min-width:0; }
.pc-item-top{ display:flex;align-items:flex-start;justify-content:space-between;gap:12px; }
.pc-item-name{ font-size:15.5px;font-weight:800;line-height:1.9;min-width:0; }
.pc-item-name a{ color:var(--dark);text-decoration:none; }
.pc-item-name a:hover{ color:var(--brand-dark); }

/* دکمه‌ی حذف */
.pc-cart .product-remove{ flex:0 0 auto; }
.pc-cart a.remove.pc-remove{
  display:grid!important;place-items:center;width:36px;height:36px;margin:0;padding:0;border-radius:50%;
  font-size:0;line-height:1;background:var(--gray-bg);color:#819198!important;text-decoration:none;
  transition:background .15s,color .15s,transform .15s;
}
.pc-cart a.remove.pc-remove:hover{ background:#fee2e8;color:var(--pc-red)!important;transform:scale(1.06); }
.pc-cart a.remove.pc-remove .pc-i{ width:18px;height:18px; }

.pc-item-variation{ font-size:12.5px;color:#4a6a85; }
.pc-item-variation dl.variation{ display:flex;flex-wrap:wrap;gap:6px 8px;margin:0; }
.pc-item-variation dl.variation dt,
.pc-item-variation dl.variation dd{ display:inline-flex;margin:0;padding:0; }
.pc-item-variation dl.variation dt{ font-weight:600;color:var(--muted); }
.pc-item-variation dl.variation dt::after{ content:":";margin-inline-start:2px; }
.pc-item-variation dl.variation dd{ background:var(--gray-bg);border-radius:30px;padding:1px 10px;margin-inline-end:6px; }
.pc-item-variation dl.variation dd p{ margin:0; }

.pc-item-note{ font-size:12px;font-weight:700;color:#b45309; }
.pc-item-low{ color:var(--pc-red); }

.pc-item-unit{ display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:12.5px;color:var(--muted); }
.pc-item-unit .pc-old{ color:#9caeb5;text-decoration:line-through;font-size:12px; }
.pc-item-unit .pc-now{ font-weight:700;color:var(--text); }
.pc-item-unit .woocommerce-Price-amount,.pc-item-unit bdi{ font-size:inherit; }

.pc-item-bottom{ display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:auto;padding-top:6px; }
.pc-item-total{ font-size:17px;font-weight:800;color:var(--dark);white-space:nowrap; }
.pc-item-total .woocommerce-Price-amount{ font-size:inherit; }
.pc-qty-fixed{ font-size:13px;color:var(--muted); }

/* شمارنده‌ی تعداد */
.pc-qty{ display:inline-flex;align-items:center;gap:2px;padding:4px;border-radius:30px;background:var(--gray-bg); }
.pc-qty .quantity{ margin:0;display:block; }
.pc-qty .quantity label{ position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap; }
.pc-qty input.qty{
  width:42px;height:34px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;
  text-align:center;font-family:inherit;font-size:15px;font-weight:800;color:var(--dark);-moz-appearance:textfield;appearance:textfield;
}
.pc-qty input.qty::-webkit-outer-spin-button,
.pc-qty input.qty::-webkit-inner-spin-button{ -webkit-appearance:none;margin:0; }
.pc-qty input.qty:focus{ outline:none; }
.pc-qty-btn{
  display:grid;place-items:center;width:34px;height:34px;padding:0;border-radius:50%;
  background:#fff;color:var(--brand-dark);box-shadow:0 1px 3px rgba(11,42,68,.14);
  transition:background .15s,color .15s,transform .1s;
}
.pc-qty-btn:hover{ background:var(--brand);color:#fff; }
.pc-qty-btn:active{ transform:scale(.92); }
.pc-qty-btn:disabled{ opacity:.35;pointer-events:none; }
.pc-qty-btn .pc-i{ width:16px;height:16px; }
.pc-qty-btn span{ display:grid;place-items:center; }
.pc-ic-trash{ display:none!important; }
.pc-qty.is-min .pc-ic-minus{ display:none!important; }
.pc-qty.is-min .pc-ic-trash{ display:grid!important;color:var(--pc-red); }
.pc-qty.is-min .pc-qty-minus:hover{ background:#fee2e8; }

/* وقتی ووکامرس داره سبد رو به‌روز می‌کنه */
.pc-form.processing .pc-items{ opacity:.55;pointer-events:none; }
.pc-form .blockUI.blockOverlay,.pc-totals .blockUI.blockOverlay{ border-radius:var(--pc-radius); }

/* ---------- کد تخفیف ---------- */
.pc-coupon{ margin-top:16px;background:#fff;border-radius:var(--pc-radius);box-shadow:var(--pc-shadow);overflow:hidden; }
.pc-coupon summary{
  display:flex;align-items:center;gap:10px;padding:16px 20px;cursor:pointer;list-style:none;
  font-size:14px;font-weight:800;color:var(--dark);
}
.pc-coupon summary::-webkit-details-marker{ display:none; }
.pc-coupon summary .pc-i{ color:var(--brand); }
.pc-coupon summary::after{ content:"";margin-inline-start:auto;width:9px;height:9px;border:solid #819198;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .2s; }
.pc-coupon[open] summary::after{ transform:rotate(-135deg); }
.pc-coupon-row{ display:flex;gap:10px;padding:0 20px 18px; }
.pc-coupon-input{
  flex:1;min-width:0;height:48px;padding:0 16px;border:1.5px dashed color-mix(in srgb,var(--brand) 55%,#fff);border-radius:14px;
  background:var(--brand-bg);font-family:inherit;font-size:14px;color:var(--text);
}
.pc-coupon-input:focus{ outline:none;border-style:solid;border-color:var(--brand); }
.pc-coupon-btn{ flex:0 0 auto;height:48px;padding:0 24px;border-radius:14px;background:var(--dark);color:#fff;font-size:13.5px;font-weight:800;transition:background .15s; }
.pc-coupon-btn:hover{ background:var(--brand-dark); }
.pc-coupon .woocommerce-error,.pc-coupon .woocommerce-message{ margin:0 20px 16px;font-size:12px;border-radius:12px; }

/* دکمه‌ی به‌روزرسانی: با جاوااسکریپت خودکار انجام می‌شه، پس مخفیه؛ بدون جاوااسکریپت دیده می‌شه */
.pc-update-row{ display:flex;justify-content:flex-start;margin-top:14px; }
.pc-update-btn{ padding:11px 22px;border-radius:30px;background:#fff;color:var(--brand-dark);font-size:13px;font-weight:800;box-shadow:var(--pc-shadow); }
.pc-update-btn:hover{ background:var(--brand-soft); }
html.pc-js .pc-update-row{ position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0 0 0 0); }

/* ---------- خلاصه‌ی سفارش ---------- */
.pc-totals .ps-freeship{
  margin:0 0 14px;padding:14px 16px;border:0;border-radius:var(--pc-radius);background:#fff;box-shadow:var(--pc-shadow);
}
.pc-totals .ps-freeship.is-done{ background:#f0fdf6; }
.pc-totals .ps-freeship-track{ height:10px;margin-top:10px;background:#e6f2f8; }
.pc-totals .ps-freeship-track span{ position:relative;overflow:hidden; }
.pc-totals .ps-freeship-track span::after{
  content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);
  transform:translateX(100%);animation:pcShine 2.6s ease-in-out infinite;
}
@keyframes pcShine{ to{ transform:translateX(-100%); } }

.pc-summary{ background:#fff;border-radius:var(--pc-radius);padding:22px 22px 18px;box-shadow:var(--pc-shadow); }
.pc-summary-title{ font-size:17px;font-weight:800;margin-bottom:6px!important;color:var(--dark); }
.pc-row{ display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px dashed #e2eff4;font-size:14px; }
.pc-row .label{ color:#4a6a85; }
.pc-row .value{ font-weight:700;text-align:left; }
.pc-row .value .woocommerce-Price-amount{ font-size:inherit; }
.pc-row-off .label,.pc-row-off .value{ color:var(--pc-red); }
.pc-row-coupon .label,.pc-row-coupon .value{ color:var(--pc-green); }
.pc-row-coupon .woocommerce-remove-coupon{ margin-inline-start:6px;color:var(--pc-red);font-size:12px;text-decoration:none; }
.pc-row-total{ border-bottom:0;padding:16px 0 4px;font-size:15px; }
.pc-row-total .label{ font-weight:800;color:var(--dark); }
.pc-row-total .value,.pc-row-total .value .woocommerce-Price-amount{ font-size:20px;font-weight:800;color:var(--brand-dark); }

/* روش ارسال (خروجی ووکامرس ردیف جدول است) */
.pc-ship,.pc-ship tbody,.pc-ship tr,.pc-ship th,.pc-ship td{ display:block;width:100%;margin:0;padding:0;border:0;background:none; }
.pc-ship tr{ padding:13px 0;border-bottom:1px dashed #e2eff4;font-size:14px; }
.pc-ship th{ margin-bottom:8px;font-weight:600;color:#4a6a85;text-align:right; }
.pc-ship td{ text-align:right; }
.pc-ship td::before{ display:none!important; }
.pc-ship ul.woocommerce-shipping-methods{ display:flex;flex-direction:column;gap:8px; }
.pc-ship ul.woocommerce-shipping-methods li{ display:flex;align-items:center;gap:10px;margin:0;padding:10px 12px;border-radius:12px;background:var(--gray-bg);font-weight:700; }
.pc-ship ul.woocommerce-shipping-methods input[type="radio"]{ margin:0;accent-color:var(--brand); }
.pc-ship ul.woocommerce-shipping-methods label{ flex:1;display:flex;justify-content:space-between;gap:10px;margin:0;cursor:pointer; }
.pc-ship .woocommerce-shipping-destination{ display:none; }
.pc-ship .shipping-calculator-button{ font-size:12.5px;font-weight:700;color:var(--brand-dark); }

/* سود مشتری */
.pc-saved{
  display:flex;align-items:center;gap:10px;margin-top:14px;padding:11px 14px;border-radius:14px;
  background:#ecfdf5;color:var(--pc-green);font-size:13px;font-weight:700;line-height:1.7;
}
.pc-saved strong{ font-weight:800; }
.pc-saved .woocommerce-Price-amount{ font-size:inherit; }

/* دکمه‌ی ادامه جهت پرداخت */
.pc-checkout{ margin:16px 0 0;padding:0; }
.pc-checkout a.checkout-button,
.pc-checkout .checkout-button{
  position:relative;overflow:hidden;display:flex!important;align-items:center;justify-content:center;gap:10px;width:100%;margin:0!important;
  padding:18px 20px!important;border:0;border-radius:18px!important;text-align:center;text-decoration:none;
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-dark) 100%)!important;color:#fff!important;
  font-size:16px!important;font-weight:800!important;line-height:1.4;
  box-shadow:0 18px 30px -14px color-mix(in srgb,var(--brand) 85%,transparent);
  transition:transform .15s ease,box-shadow .2s ease,filter .2s;
}
.pc-checkout a.checkout-button::after{ content:"←";font-size:19px;line-height:1;transition:transform .2s; }
.pc-checkout a.checkout-button::before{
  content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.28) 50%,transparent 70%);
  transform:translateX(120%);transition:transform .7s ease;
}
.pc-checkout a.checkout-button:hover{ transform:translateY(-2px);filter:brightness(1.05);box-shadow:0 22px 34px -14px color-mix(in srgb,var(--brand) 90%,transparent); }
.pc-checkout a.checkout-button:hover::before{ transform:translateX(-120%); }
.pc-checkout a.checkout-button:hover::after{ transform:translateX(-4px); }
.pc-checkout a.checkout-button:active{ transform:translateY(0); }

.pc-note{ margin-top:12px;font-size:12px;line-height:1.9;color:var(--muted);text-align:center; }
.pc-trust{ display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px; }
.pc-trust li{
  display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;border-radius:16px;
  background:rgba(255,255,255,.7);border:1px solid var(--pc-line);text-align:center;font-size:11.5px;font-weight:700;line-height:1.7;color:#4a6a85;
}
.pc-trust .pc-i{ width:22px;height:22px;color:var(--brand); }

/* ---------- پیشنهاد ویژه ---------- */
.pc-suggest{ margin-top:34px; }
.pc-suggest h2{ margin:0 4px 14px;font-size:17px;font-weight:800;color:var(--dark); }
.pc-suggest-track{ display:flex;gap:14px;overflow-x:auto;padding:4px 4px 16px;scroll-snap-type:x proximity;scrollbar-width:thin; }
.pc-sug{
  flex:0 0 176px;scroll-snap-align:start;display:flex;flex-direction:column;gap:8px;
  background:#fff;border-radius:20px;padding:12px;box-shadow:var(--pc-shadow);
}
.pc-sug-img{ position:relative;display:block; }
.pc-sug-img img{ display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:14px;background:var(--gray-bg); }
.pc-sug-name{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:3.6em;
  font-size:13px;font-weight:700;line-height:1.8;color:var(--dark);text-decoration:none;
}
.pc-sug-price{ font-size:13px;font-weight:800;color:var(--brand-dark); }
.pc-sug-price del{ display:block;font-weight:500;font-size:11.5px;color:#9caeb5; }
.pc-sug-price ins{ text-decoration:none; }
.pc-sug-price .woocommerce-Price-amount{ font-size:inherit; }
.pc-cart a.pc-sug-add{
  display:flex!important;align-items:center;justify-content:center;gap:6px;margin-top:auto;padding:10px 8px!important;border-radius:12px!important;
  background:var(--brand-soft)!important;color:var(--brand-dark)!important;font-size:12.5px!important;font-weight:800!important;text-decoration:none;
  transition:background .15s,color .15s;
}
.pc-cart a.pc-sug-add:hover{ background:var(--brand)!important;color:#fff!important; }
.pc-cart a.pc-sug-add .pc-i{ width:15px;height:15px; }
.pc-cart a.pc-sug-add.loading{ opacity:.6;pointer-events:none; }
.pc-cart a.pc-sug-add.added{ background:#ecfdf5!important;color:var(--pc-green)!important; }
.pc-cart a.added_to_cart{ display:none!important; }

/* ---------- سبد خالی ---------- */
.pc-empty{
  max-width:520px;margin:24px auto 0;padding:46px 28px 40px;text-align:center;
  background:#fff;border-radius:28px;box-shadow:var(--pc-shadow);
}
.pc-empty-art{
  width:104px;height:104px;margin:0 auto 22px;display:grid;place-items:center;border-radius:50%;
  background:var(--brand-soft);color:var(--brand);box-shadow:0 0 0 12px color-mix(in srgb,var(--brand) 9%,transparent);
  animation:pcFloat 3.4s ease-in-out infinite;
}
.pc-empty-art .pc-i{ width:48px;height:48px;stroke-width:1.6; }
@keyframes pcFloat{ 50%{ transform:translateY(-8px); } }
.pc-empty h1{ font-size:23px;font-weight:800;color:var(--dark);margin-bottom:10px; }
.pc-empty p{ max-width:400px;margin:0 auto 26px;font-size:14px;line-height:2.1;color:var(--muted); }
.pc-cart a.pc-empty-btn{
  display:inline-flex;align-items:center;gap:10px;padding:15px 30px;border-radius:30px;text-decoration:none;
  background:linear-gradient(135deg,var(--brand),var(--brand-dark));color:#fff;font-size:15px;font-weight:800;
  box-shadow:0 16px 28px -14px color-mix(in srgb,var(--brand) 85%,transparent);transition:transform .15s;
}
.pc-cart a.pc-empty-btn:hover{ transform:translateY(-2px); }

/* ---------- نوار چسبان پایین (موبایل) ---------- */
.pc-sticky{ display:none; }

/* ---------- ریسپانسیو ---------- */
@media (max-width:1000px){
  .pc-grid{ grid-template-columns:minmax(0,1fr) 340px;gap:20px; }
}
@media (max-width:900px){
  .pc-cart{ padding-bottom:96px; }
  .pc-grid{ grid-template-columns:minmax(0,1fr);gap:18px; }
  .pc-side{ position:static; }
  .pc-title{ font-size:24px; }
  .pc-head{ margin-bottom:20px; }
  .pc-steps{ width:100%;justify-content:center; }

  .pc-sticky{
    display:flex;align-items:center;justify-content:space-between;gap:12px;
    position:fixed;right:0;left:0;z-index:185;bottom:calc(58px + env(safe-area-inset-bottom,0px));
    padding:10px 14px;background:#fff;border-top:1px solid #dcedf9;box-shadow:0 -10px 26px rgba(11,42,68,.14);
    transition:transform .25s ease;
  }
  .pc-sticky.is-hidden{ transform:translateY(160%);pointer-events:none; }
  .pc-sticky-sum{ display:flex;flex-direction:column;gap:1px;min-width:0; }
  .pc-sticky-sum small{ font-size:11px;color:var(--muted); }
  .pc-sticky-sum strong{ font-size:16px;font-weight:800;color:var(--brand-dark);white-space:nowrap; }
  .pc-sticky-sum .woocommerce-Price-amount{ font-size:inherit; }
  .pc-sticky-btn{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;padding:13px 22px;border-radius:14px;
    background:linear-gradient(135deg,var(--brand),var(--brand-dark));color:#fff;font-size:14px;font-weight:800;text-decoration:none;
  }
  .pc-sticky-btn .pc-i{ width:17px;height:17px; }
}
@media (max-width:560px){
  .pc-item{ grid-template-columns:84px minmax(0,1fr);gap:12px;padding:12px;border-radius:18px; }
  .pc-item-name{ font-size:14px; }
  .pc-item-total{ font-size:15px; }
  .pc-item-bottom{ flex-wrap:wrap; }
  .pc-qty input.qty{ width:36px; }
  .pc-qty-btn{ width:32px;height:32px; }
  .pc-step-label{ display:none; }
  .pc-steps li.is-active .pc-step-label{ display:inline; }
  .pc-coupon-row{ flex-direction:column; }
  .pc-coupon-btn{ width:100%; }
  .pc-summary{ padding:18px 16px 14px; }
  .pc-trust{ gap:6px; }
  .pc-sug{ flex-basis:152px; }
}
@media (prefers-reduced-motion:reduce){
  .pc-cart *,.pc-cart *::before,.pc-cart *::after{ animation:none!important;transition:none!important; }
}

/* حذف کالا (قبل از اینکه ووکامرس لیست رو جایگزین کنه) */
.pc-item.is-removing{ opacity:.35;transform:scale(.985);pointer-events:none; }
.pc-qty-btn.is-limit{ animation:pcShake .35s; }
@keyframes pcShake{ 25%{ transform:translateX(3px); } 75%{ transform:translateX(-3px); } }
