/* =========================================================
   Cart (RTL) — UI aligned with provided design
   Green accent: #00A693
========================================================= */

:root {
  --lion-green: #00A693;
  --lion-bg: #f3f7fb;
  --lion-text: #111827;
  --lion-muted: #6b7280;
  --lion-border: #eef2f6;
  --lion-radius: 18px;
  --lion-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  --lion-cart-bar-height: 72px;
}

body.woocommerce-cart {
  background: var(--lion-bg);
  font-family: "IRANSans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  direction: rtl;
}

body.woocommerce-cart.lion-cart-summary-open {
  overflow: hidden;
}

/* Local reset (avoid relying on body classes) */
.lion-cart-page,
.lion-cart-page * {
  box-sizing: border-box;
}

.lion-cart-page {
  direction: rtl;
  color: var(--lion-text);
}

.lion-cart-page button,
.lion-cart-page input {
  font-family: inherit;
}

/* Layout */
.lion-cart-page {
  max-width: 1400px;
  margin: 48px auto;
  padding: 0 20px;
}

.lion-cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.lion-cart-main {
  min-width: 0;
}

/* Panels */
.lion-cart-panel {
  background: #fff;
  border-radius: var(--lion-radius);
  box-shadow: var(--lion-shadow);
  overflow: hidden;
}

.lion-cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--lion-border);
}

.lion-cart-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--lion-text);
  font-size: 14px;
}

.lion-cart-panel-tab {
  color: var(--lion-green);
  font-weight: 800;
  font-size: 14px;
}

.lion-cart-title-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Cart list */
.lion-cart-list {
  display: flex;
  flex-direction: column;
}

.lion-cart-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  /* border-top: 1px solid var(--lion-border); */
  margin-bottom: 0px;
}

.lion-cart-item:first-child {
  border-top: 0;
}
.lion-cart-item:hover {
      transform: scale(1);
}

.lion-cart-item-thumb img {
  width: 92px !important;
  height: 92px !important;
  object-fit: contain;
  border-radius: 14px;
  background: #f7f9fc;
  display: block;
}

.lion-cart-item-content {
      flex: 1;
    min-width: 0;
    display: flex
;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-direction: column;
}

.lion-cart-item-name {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--lion-text);
  line-height: 1.9;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  flex: 1;
}

.lion-cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

/* Qty */
.lion-cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f3f7fb;
  border-radius: 999px;
  padding: 6px 10px;
}

.lion-cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.lion-cart-qty-btn.plus {
  background-color: var(--lion-green) !important;
  color: #fff;
}

.lion-cart-qty-btn.minus {
  background-color: #e9eef4 !important;
  color: var(--lion-text);
}

.lion-cart-qty-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.lion-cart-qty-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.lion-cart-final-price span.woocommerce-Price-currencySymbol {
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
}
.lion-cart-qty-input {
  width: 35px !important;
  border: 0 !important;
  background: transparent;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center;
  font-weight: 500;
  color: var(--lion-text);
  outline: none;
  font-size: 12px;
}

.lion-cart-qty-input::-webkit-outer-spin-button,
.lion-cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.lion-cart-qty-input {
  -moz-appearance: textfield;
}

/* Price block */
.lion-cart-item-price {
  width: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: left;
}

.lion-cart-item-regular-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-direction: row-reverse;
}

.lion-cart-discount-badge {
  background: #F25637;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.lion-cart-regular-price {
  color: #9ca3af;
  font-size: 12px;
  text-decoration: line-through;
}

.lion-cart-final-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--lion-text);
}

/* Sidebar */
.lion-cart-sidebar {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lion-cart-summary-sheet {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lion-cart-summary-scroll {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lion-cart-sheet-handle,
.lion-cart-mobile-bar,
.lion-cart-summary-backdrop {
  display: none;
}

.lion-cart-checkout-btn--bar {
  margin-top: 0;
}

.lion-cart-download {
  background: #fff;
  border-radius: var(--lion-radius);
  box-shadow: var(--lion-shadow);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--lion-green);
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lion-cart-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.lion-cart-download-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.lion-cart-summary {
  background: #fff;
  border-radius: var(--lion-radius);
  box-shadow: var(--lion-shadow);
  padding: 20px 22px;
}

.lion-cart-summary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--lion-text);
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--lion-border);
}

.lion-cart-summary-lines {
  border-top: 0;
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lion-cart-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #374151;
}

.lion-cart-summary-line > span:last-child {
  color: var(--lion-text);
  font-weight: 800;
}

.lion-cart-summary-line.is-muted > span:last-child {
  color: var(--lion-muted);
  font-weight: 700;
}

.lion-cart-summary-line.is-discount {
  color: #ef4444;
}
.lion-cart-summary-line.is-discount > span:last-child {
  color: #ef4444;
}

.lion-cart-shipping-progress {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--lion-border);
}

.lion-cart-progress-bar {
  height: 10px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.lion-cart-progress-fill {
  display: block;
  height: 100%;
  background: var(--lion-green);
  border-radius: 999px;
}

.lion-cart-progress-text {
  margin-top: 10px;
  font-size: 12px;
  color: var(--lion-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  align-items: center;
}

/* Wallet toggle (cart/checkout shared styles) */
.lion-wallet-summary-lines {
  margin-top: 10px;
}

.lion-wallet-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lion-wallet-toggle-label small {
  color: var(--lion-muted);
  font-weight: 600;
}

.lion-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 26px;
}

.lion-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.lion-switch-slider {
  position: absolute;
  inset: 0;
  background: #e2e8f0;
  border-radius: 999px;
  transition: background 180ms ease;
  cursor: pointer;
}

.lion-switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  transition: transform 180ms ease;
}

.lion-switch input:checked + .lion-switch-slider {
  background: var(--lion-green);
}

.lion-switch input:checked + .lion-switch-slider::after {
  transform: translateX(-22px);
}

.lion-cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--lion-border);
  margin-top: 16px;
  padding-top: 16px;
  font-size: 14px;
  font-weight: 900;
  color: var(--lion-text);
}

.lion-cart-total-amount {
  color: var(--lion-green);
  font-weight: 900;
}

.lion-cart-checkout-btn {
  margin-top: 18px;
  display: block;
  text-align: center;
  background: var(--lion-green);
  color: #fff !important;
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.lion-cart-checkout-btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

/* Related section */
.lion-cart-related {
  margin-top: 28px;
}

.lion-cart-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 6px;
}

.lion-cart-section-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--lion-text);
}

.lion-cart-related-body .home-products.embla {
  padding: 8px 4px 0;
}

.lion-cart-related-empty {
  background: #fff;
  border-radius: var(--lion-radius);
  box-shadow: var(--lion-shadow);
  padding: 18px;
  color: var(--lion-muted);
}

/* Empty cart */
.lion-cart-empty {
  max-width: 720px;
  margin: 90px auto;
  background: #fff;
  border-radius: var(--lion-radius);
  box-shadow: var(--lion-shadow);
  padding: 42px 24px;
  text-align: center;
}

.lion-cart-empty img {
  width: 140px;
  height: auto;
  opacity: 0.95;
}

.lion-cart-empty h2 {
  margin: 18px 0 0;
  font-weight: 900;
  color: var(--lion-text);
}

/* Responsive */
@media (max-width: 992px) {
  .lion-cart-grid {
    grid-template-columns: 1fr;
  }
  .lion-cart-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .lion-cart-page {
    margin: 24px auto;
    padding-bottom: calc(var(--lion-cart-bar-height) + env(safe-area-inset-bottom) + 18px);
  }
  .lion-cart-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    grid-template-areas:
      "thumb name"
      "controls price";
    column-gap: 14px;
    row-gap: 10px;
    align-items: center;
  }
  .lion-cart-item-thumb {
    grid-area: thumb;
    justify-self: start;
  }
  .lion-cart-item-name {
    grid-area: name;
  }
  .lion-cart-item-controls {
    grid-area: controls;
    justify-self: start;
  }
  .lion-cart-item-thumb img {
    width: 80px;
    height: 80px;
  }
  .lion-cart-item-price {
    grid-area: price;
    width: auto;
    align-items: flex-end;
    text-align: left;
  }
  .lion-cart-item-content {
    display: contents;
  }
  .lion-cart-final-price {
    font-size: 18px;
  }

  .lion-cart-panel {
    background: transparent;
    box-shadow: none;
  }

  .lion-cart-panel-header {
    padding: 0 6px 12px;
    border-bottom: 0;
  }

  .lion-cart-panel-tab {
    display: none;
  }

  .lion-cart-list {
    gap: 14px;
  }

  .lion-cart-item {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--lion-shadow);
  }

  .lion-cart-summary-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1100;
  }

  .lion-cart-page.is-summary-open .lion-cart-summary-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .lion-cart-summary-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 50px;
    max-height: min(85vh, 640px);
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -18px 40px rgba(15, 23, 42, 0.16);
    transform: translateY(100%);
    transition: transform 0.35s ease;
    z-index: 1200;
    overflow: hidden;
    gap: 0;
  }
  .lion-cart-mobile-bar span {
    color: black;
    font-size: 14px;
    font-weight: 500;
}

  .lion-cart-page.is-summary-open .lion-cart-summary-sheet {
    transform: translateY(0);
  }

  .lion-cart-sheet-handle {
    display: block;
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    margin: 10px auto 6px;
  }

  .lion-cart-summary-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;
    padding: 8px 18px calc(var(--lion-cart-bar-height) + 12px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lion-cart-download {
    width: 100%;
    justify-content: center;
    border: 1px solid var(--lion-green);
    box-shadow: none;
    background: #fff;
  }

  .lion-cart-summary {
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .lion-cart-summary-title {
    text-align: right;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .lion-cart-summary-lines {
    margin-top: 12px;
    padding-top: 0;
  }

  .lion-cart-checkout-btn {
    display: none;
  }

  .lion-cart-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1250;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--lion-border);
    background: #fff;
    flex-direction: row-reverse;
  }

  .lion-cart-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 900;
    color: var(--lion-text);
    cursor: pointer;
    width: 50%;
    justify-content: flex-end;
  }

  .lion-cart-summary-chevron {
    width: 12px;
    height: 12px;
    border: 2px solid var(--lion-text);
    border-left: 0;
    border-bottom: 0;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
  }

  .lion-cart-page.is-summary-open .lion-cart-summary-chevron {
    transform: rotate(-225deg);
  }

  .lion-cart-checkout-btn--bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 12px 14px;
    border-radius: 999px;
    font-size: 14px;
            margin: 0px;
  }
}

.lion-cart-wishlist-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.lion-cart-wishlist-modal.is-visible {
  display: block;
}

.lion-cart-wishlist-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
}

.lion-cart-wishlist-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lion-cart-wishlist-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.lion-cart-wishlist-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.lion-cart-wishlist-modal__subtitle {
  margin: 4px 0 0;
  color: #94a3b7;
  font-size: 13px;
}

.lion-cart-wishlist-modal__close {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #e11d48;
}

.lion-cart-wishlist-modal__lists {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lion-cart-wishlist-list-item {
  border: 1px solid #dfe6f5;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fdfdfd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.lion-cart-wishlist-list-item.is-active {
  border-color: var(--lion-green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lion-cart-wishlist-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lion-cart-wishlist-action {
  border: 1px solid var(--lion-green);
  color: var(--lion-green) !important;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  background: #fff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.lion-cart-wishlist-action--link {
  border: none;
  background: transparent;
  padding: 10px 8px;
  font-weight: 900;
}

.lion-cart-wishlist-action--ghost {
  border-color: #d1d5db;
  color: #374151 !important;
  background: #fff;
}

.lion-cart-wishlist-empty {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
  color: #6b7280;
  font-weight: 600;
}

/* Accordion: applied wishlist group */
.lion-cart-wishlist-accordion {
  background: #fff;
  border-radius: var(--lion-radius);
  box-shadow: var(--lion-shadow);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--lion-border);
}

.lion-cart-wishlist-accordion__summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.lion-cart-wishlist-accordion__summary::-webkit-details-marker {
  display: none;
}

.lion-cart-wishlist-accordion__title {
  color: var(--lion-text);
  font-size: 14px;
}

.lion-cart-wishlist-accordion__total {
  color: var(--lion-green);
  font-size: 14px;
}

.lion-cart-wishlist-accordion__body {
  border-top: 1px solid var(--lion-border);
  padding: 10px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lion-cart-wishlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(238, 242, 246, 0.8);
}

.lion-cart-wishlist-row:last-child {
  border-bottom: 0;
}

.lion-cart-wishlist-row__thumb img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: #f7f9fc;
}

.lion-cart-wishlist-row__name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--lion-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lion-cart-wishlist-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--lion-muted);
  font-weight: 700;
}

@media (max-width: 700px) {
  .lion-cart-wishlist-modal__panel {
    width: min(92vw, 380px);
  }
}

/* Override global header button hover/focus resets */
.lion-cart-page .lion-cart-qty-btn.plus:hover,
.lion-cart-page .lion-cart-qty-btn.plus:focus {
  background-color: var(--lion-green) !important;
}
.lion-cart-page .lion-cart-qty-btn.minus:hover,
.lion-cart-page .lion-cart-qty-btn.minus:focus {
  background-color: #e9eef4 !important;
}
