/* AT cart page */

body.at-sp-cart-body,
.at-cart {
  --pink: #e45c94;
  --pink-hover: #c9447c;
  --pink-soft: #fce8f2;
  --purple: #3eafd0;
  --text: #171717;
  --muted: #737373;
  --line: #e5e5e5;
  --bg: #fff;
  --surface: #fafafa;
  --font: "Vazirmatn", Tahoma, sans-serif;
  font-family: var(--font);
}

body.at-sp-cart-body .widget-area,
body.at-sp-cart-body #secondary,
body.at-sp-cart-body aside.sidebar,
body.at-sp-cart-body .entry-header,
body.at-sp-cart-body .page-header,
body.at-sp-cart-body .woocommerce-products-header,
body.at-sp-cart-body h1:not(.at-cart__title) {
  display: none !important;
}

body.at-sp-cart-body #primary,
body.at-sp-cart-body .content-area,
body.at-sp-cart-body .site-main {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
}

.at-cart {
  color: var(--text);
  background: #fff;
  padding: 20px 16px 40px;
  font-size: 14px;
  line-height: 1.7;
}

.at-cart *,
.at-cart *::before,
.at-cart *::after {
  box-sizing: border-box;
}

.at-cart a {
  color: inherit;
  text-decoration: none;
}

.at-cart img {
  max-width: 100%;
  display: block;
}

.at-cart-shell {
  width: min(1040px, 100%);
  margin-inline: auto;
}

.at-cart__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.at-cart__head h1,
.at-cart__title,
body.at-sp-cart-body .at-cart__title {
  margin: 0;
  font-size: 20px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.at-cart__head span {
  color: var(--muted);
  font-size: 13px;
}

.at-cart__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 24px;
  align-items: start;
}

.at-cart-notices {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.at-cart-notices ul {
  margin: 0;
  padding: 0 18px 0 0;
}

.at-cart-notices li {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.8;
}

.at-cart-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 28px;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.at-cart-item.is-bad {
  background: #f8fafc;
  margin: 0 -8px;
  padding-inline: 8px;
  border-radius: 10px;
}

.at-cart-item__err {
  margin: 6px 0 0;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}

.at-cart-item:first-child {
  padding-top: 0;
}

.at-cart-item__media {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.at-cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.at-cart-item__name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 4px;
}

.at-cart-item__name:hover {
  color: var(--pink);
}

.at-cart-item__unit {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 8px;
}

.at-cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.at-cart-item__sum {
  font-size: 14px;
  font-weight: 800;
}

.at-cart-item__qty-note {
  font-size: 12px;
  color: var(--muted);
}

.at-cart-item__remove {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #a3a3a3;
  border-radius: 6px;
}

.at-cart-item__remove:hover {
  color: #e11d48;
  background: #fff1f2;
}

.at-cart-item__remove svg {
  width: 16px;
  height: 16px;
}

.at-cart .variation,
.at-cart dl.variation {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.at-cart-qty {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.at-cart-qty .at-sp-qty__btn {
  width: 26px;
  height: 26px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.at-cart-qty .at-sp-qty__input {
  width: 28px;
  height: 26px;
  border: 0;
  padding: 0;
  text-align: center;
  background: none;
  font-size: 13px;
  font-weight: 700;
  -moz-appearance: textfield;
}

.at-cart-qty .at-sp-qty__input::-webkit-outer-spin-button,
.at-cart-qty .at-sp-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.at-cart-box {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.at-cart-box h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
}

.at-cart-totals {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.at-cart-totals th,
.at-cart-totals td {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
  font-weight: 400;
  text-align: start;
}

.at-cart-totals td {
  text-align: end;
}

.at-cart-totals tr:last-child th,
.at-cart-totals tr:last-child td {
  border-bottom: 0;
}

.at-cart-totals .is-total th,
.at-cart-totals .is-total td {
  padding-top: 12px;
  font-size: 14px;
  font-weight: 800;
}

.at-cart .at-sp-btn,
.at-cart-checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--pink);
  color: #fff !important;
  font-weight: 800;
  font-size: 14px;
}

.at-cart .at-sp-btn.is-disabled,
.at-cart-checkout.is-disabled,
.at-cart .at-sp-btn.is-disabled:hover,
.at-cart-checkout.is-disabled:hover {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  background: #94a3b8;
}

.at-cart-continue {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.at-cart-continue:hover {
  color: var(--pink);
}

.at-cart-sticky {
  display: none;
}

.at-cart-empty {
  max-width: 360px;
  margin: 48px auto;
  text-align: center;
}

.at-cart-empty__icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--pink);
}

.at-cart-empty__icon svg {
  width: 26px;
  height: 26px;
}

.at-cart-empty h1,
.at-cart-empty .at-cart__title {
  margin: 0 0 8px;
  font-size: 18px !important;
}

.at-cart-empty p {
  margin: 0 0 18px;
  color: var(--muted);
}

@media (min-width: 901px) {
  .at-cart__aside {
    position: sticky;
    top: 16px;
  }
}

@media (max-width: 900px) {
  .at-cart__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .at-cart {
    padding: 12px 12px calc(92px + var(--at-bottom-nav, 0px));
  }

  .at-cart__head h1,
  .at-cart__title,
  body.at-sp-cart-body .at-cart__title,
  .at-cart-empty h1 {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .at-cart-item {
    grid-template-columns: 68px minmax(0, 1fr) 24px;
    gap: 10px;
  }

  .at-cart-item__media {
    width: 68px;
    height: 68px;
  }

  .at-cart-sticky {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 10px;
    position: fixed;
    inset-inline: 0;
    bottom: var(--at-bottom-nav, 0px);
    z-index: 1200;
    padding: 8px 12px;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .at-cart-sticky__sum {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: var(--muted);
  }

  .at-cart-sticky__sum strong {
    color: var(--text);
    font-size: 14px;
  }

  .at-cart-box .at-cart-checkout {
    display: none;
  }
}
