/* =========================================================
   Noor Shop - Cart Page
   ========================================================= */
.ns-cart-page {
  padding: 56px 0 88px;
  background:
    radial-gradient(700px 220px at 0% 0%, rgba(136, 147, 70, 0.07), transparent 55%),
    #f7f9f8;
}

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

.ns-cart-page__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ns-cart-page__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 6px 8px;
}

.ns-cart-page__list-head h2 {
  margin: 0;
  color: var(--ns-ink, #071c1f);
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.ns-cart-page__list-meta {
  display: grid;
  grid-template-columns: 120px 180px 120px;
  gap: 12px;
  width: min(440px, 52%);
  color: var(--ns-muted, #5a6b6e);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

html[lang="ar"] .ns-cart-page__list-meta,
html[dir="rtl"] .ns-cart-page__list-meta {
  letter-spacing: 0;
}

.ns-cart-page__item {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 120px 180px 120px 40px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(7, 28, 31, 0.08);
  box-shadow: 0 8px 22px rgba(7, 28, 31, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ns-cart-page__item:hover {
  border-color: rgba(136, 147, 70, 0.3);
  box-shadow: 0 12px 28px rgba(7, 28, 31, 0.07);
}

.ns-cart-page__product {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ns-cart-page__thumb {
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f7f5;
  border: 1px solid rgba(7, 28, 31, 0.06);
}

.ns-cart-page__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ns-cart-page__info {
  min-width: 0;
}

.ns-cart-page__name {
  margin: 0 0 4px;
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.ns-cart-page__name a {
  color: var(--ns-ink, #071c1f) !important;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ns-cart-page__name a:hover {
  color: #2a4a11 !important;
}

.ns-cart-page__variant {
  margin: 0;
  color: var(--ns-muted, #5a6b6e);
  font-size: 13px;
  line-height: 1.45;
}

.ns-cart-page__variant span {
  font-weight: 600;
}

.ns-cart-page__unit-mobile {
  display: none;
  margin: 8px 0 0;
  color: var(--ns-ink, #071c1f);
  font-size: 14px;
  font-weight: 700;
}

.ns-cart-page__unit {
  justify-content: center;
  color: var(--ns-ink, #071c1f);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.ns-cart-page__qty-form {
  margin: 0;
}

.ns-cart-page__qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ns-cart-page__qty input {
  width: 72px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(7, 28, 31, 0.12);
  border-radius: 10px;
  background: #f8faf9;
  color: var(--ns-ink, #071c1f);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ns-cart-page__qty input:focus {
  background: #fff;
  border-color: rgba(136, 147, 70, 0.55);
  box-shadow: 0 0 0 3px rgba(136, 147, 70, 0.15);
}

.ns-cart-page__qty-btn {
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(42, 74, 17, 0.2);
  border-radius: 10px;
  background: rgba(42, 74, 17, 0.08);
  color: #2a4a11;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ns-cart-page__qty-btn:hover {
  background: rgba(42, 74, 17, 0.14);
  border-color: rgba(42, 74, 17, 0.35);
}

.ns-cart-page__line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.ns-cart-page__line-label {
  display: none;
  color: var(--ns-muted, #5a6b6e);
  font-size: 11px;
  font-weight: 600;
}

.ns-cart-page__line strong {
  color: var(--ns-ink, #071c1f);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.ns-cart-page__remove-form {
  margin: 0;
  display: flex;
  justify-content: center;
}

.ns-cart-page__remove {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(7, 28, 31, 0.1);
  border-radius: 10px;
  background: #fff;
  color: #8a4a4a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ns-cart-page__remove:hover {
  background: rgba(163, 38, 38, 0.08);
  border-color: rgba(163, 38, 38, 0.25);
  color: #a32626;
}

.ns-cart-page__summary {
  position: sticky;
  top: 100px;
}

.ns-cart-page__summary-card {
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(7, 28, 31, 0.08);
  box-shadow: 0 12px 32px rgba(7, 28, 31, 0.06);
}

.ns-cart-page__summary-card h2 {
  margin: 0 0 18px;
  color: var(--ns-ink, #071c1f);
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.ns-cart-page__summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ns-ink, #071c1f);
  font-size: 14px;
}

.ns-cart-page__summary-row--muted {
  color: var(--ns-muted, #5a6b6e);
  font-size: 13px;
}

.ns-cart-page__summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(7, 28, 31, 0.08);
  color: var(--ns-ink, #071c1f);
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.ns-cart-page__checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-bottom: 12px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a4a11 0%, #889346 100%);
  color: #fff !important;
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(42, 74, 17, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ns-cart-page__checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(42, 74, 17, 0.28);
  filter: brightness(1.04);
  color: #fff !important;
}

.ns-cart-page__continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  color: #2a4a11 !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  border-bottom: 0;
  transition: color 0.2s ease;
}

.ns-cart-page__continue:hover {
  color: #1e360c !important;
}

.ns-cart-page__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(7, 28, 31, 0.08);
  box-shadow: 0 12px 32px rgba(7, 28, 31, 0.05);
}

.ns-cart-page__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(136, 147, 70, 0.18), rgba(42, 74, 17, 0.1));
  color: #2a4a11;
  font-size: 30px;
}

.ns-cart-page__empty h2 {
  margin: 0 0 10px;
  color: var(--ns-ink, #071c1f);
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
}

.ns-cart-page__empty p {
  margin: 0 0 24px;
  color: var(--ns-muted, #5a6b6e);
  font-size: 1rem;
  line-height: 1.7;
}

.ns-cart-page__empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a4a11 0%, #889346 100%);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ns-cart-page__empty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(42, 74, 17, 0.24);
  color: #fff !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1199px) {
  .ns-cart-page__layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .ns-cart-page__item {
    grid-template-columns: minmax(0, 1.3fr) 100px 160px 100px 40px;
  }

  .ns-cart-page__list-meta {
    grid-template-columns: 100px 160px 100px;
    width: min(400px, 55%);
  }
}

@media (max-width: 991px) {
  .ns-cart-page__layout {
    grid-template-columns: 1fr;
  }

  .ns-cart-page__summary {
    position: static;
    order: -1;
  }

  .ns-cart-page__list-head {
    display: none;
  }

  .ns-cart-page__item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product remove"
      "qty line";
    gap: 14px;
  }

  .ns-cart-page__product { grid-area: product; }
  .ns-cart-page__qty-form { grid-area: qty; }
  .ns-cart-page__line { grid-area: line; align-items: flex-end; }
  .ns-cart-page__remove-form { grid-area: remove; }

  .ns-cart-page__unit-mobile {
    display: block;
  }

  .ns-cart-page__qty {
    justify-content: flex-start;
  }

  .ns-cart-page__line-label {
    display: block;
  }
}

@media (max-width: 575px) {
  .ns-cart-page {
    padding: 40px 0 64px;
  }

  .ns-cart-page__item {
    padding: 14px;
  }

  .ns-cart-page__thumb {
    width: 68px;
    height: 68px;
  }

  .ns-cart-page__summary-card {
    padding: 20px;
  }
}
