/* Mashaer cart page — match mashaer.store/Cart */

.mashaer-cart-page {
  --cart-primary: #3b2b22;
  --cart-gold: #c19d60;
  --cart-cream: #faf6ef;
  --cart-border: #ece3d2;
  --cart-muted: #9a836d;
  --cart-secondary: #a89078;
  --cart-forest: #1a2f26;
  --cart-page-bg: #fafaf7;
  background: var(--cart-page-bg);
  color: var(--cart-primary);
  min-height: 50vh;
}

.mashaer-cart-hero {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.mashaer-cart-hero__inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 640px) {
  .mashaer-cart-hero__inner { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px) {
  .mashaer-cart-hero__inner { padding-left: 32px; padding-right: 32px; }
}

.mashaer-cart-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--cart-gold);
}

.mashaer-cart-hero__title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: var(--cart-primary);
  line-height: 1.2;
}

@media (min-width: 640px) {
  .mashaer-cart-hero__title { font-size: 36px; }
}

.mashaer-cart-hero__continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.mashaer-cart-hero__continue:hover { color: var(--cart-primary); }

html[dir="rtl"] .mashaer-cart-hero__continue .material-symbols-outlined,
body.rtl .mashaer-cart-hero__continue .material-symbols-outlined {
  transform: scaleX(-1);
}

.mashaer-cart-body {
  max-width: 1152px;
  margin: 0 auto;
  padding: 40px 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .mashaer-cart-body { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px) {
  .mashaer-cart-body { padding-left: 32px; padding-right: 32px; }
}

.mashaer-cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .mashaer-cart-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.mashaer-cart-layout.is-hidden,
.mashaer-cart-empty.is-hidden {
  display: none !important;
}

/* Empty */
.mashaer-cart-empty {
  background: #fff;
  border: 1px solid #eee;
  padding: 64px 24px;
  text-align: center;
}

.mashaer-cart-empty__icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 999px;
  border: 1px solid #eadfce;
  background: var(--cart-cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mashaer-cart-empty__icon .material-symbols-outlined {
  font-size: 48px;
  color: var(--cart-gold);
}

.mashaer-cart-empty h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--cart-primary);
}

.mashaer-cart-empty p {
  margin: 0 auto 28px;
  max-width: 24rem;
  font-size: 14px;
  color: #6b7280;
}

.mashaer-cart-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cart-primary);
  color: #fff;
  padding: 12px 36px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}

.mashaer-cart-empty__cta:hover {
  background: var(--cart-gold);
  color: #fff;
}

/* Items toolbar */
.mashaer-cart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
}

.mashaer-cart-toolbar__count {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cart-primary);
}

.mashaer-cart-toolbar__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s;
}

.mashaer-cart-toolbar__clear:hover { color: #dc2626; }

.mashaer-cart-toolbar__clear .material-symbols-outlined { font-size: 24px; }

/* Line items */
.mashaer-cart-items {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cart-border);
  background: #fff;
}

.mashaer-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--cart-border);
}

.mashaer-cart-item:last-child { border-bottom: 0; }

.mashaer-cart-item__media {
  flex: 0 0 auto;
  width: 80px;
  height: 96px;
  background: var(--cart-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}

.mashaer-cart-item__media img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.mashaer-cart-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.mashaer-cart-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mashaer-cart-item__brand {
  margin: 0 0 4px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--cart-gold);
}

.mashaer-cart-item__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--cart-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mashaer-cart-item__name a {
  color: inherit;
  text-decoration: none;
}

.mashaer-cart-item__meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--cart-secondary);
}

.mashaer-cart-item__remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.mashaer-cart-item__remove:hover { color: #dc2626; }

.mashaer-cart-item__remove .material-symbols-outlined { font-size: 18px; }

.mashaer-cart-item__bottom {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mashaer-cart-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  background: #fff;
}

.mashaer-cart-stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  font-family: inherit;
  padding: 0;
}

.mashaer-cart-stepper button:hover { background: #faf7f2; }

.mashaer-cart-stepper span {
  width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--cart-primary);
}

.mashaer-cart-item__prices {
  text-align: start;
}

html[dir="rtl"] .mashaer-cart-item__prices,
body.rtl .mashaer-cart-item__prices {
  text-align: end;
}

.mashaer-cart-item__total {
  font-size: 16px;
  font-weight: 700;
  color: var(--cart-primary);
  line-height: 1.3;
}

.mashaer-cart-item__unit {
  margin-top: 2px;
  font-size: 10px;
  color: var(--cart-secondary);
}

/* Summary */
.mashaer-cart-summary {
  background: #fff;
  border: 1px solid #eee;
  padding: 24px;
}

@media (min-width: 1024px) {
  .mashaer-cart-summary {
    position: sticky;
    top: calc(var(--portal-header-height-desktop, 88px) + 24px);
  }
}

.mashaer-cart-summary__title {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  font-size: 18px;
  font-weight: 700;
  color: var(--cart-primary);
}

.mashaer-cart-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 14px;
}

.mashaer-cart-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mashaer-cart-summary__row span:first-child { color: #6b7280; }

.mashaer-cart-summary__row span:last-child {
  color: var(--cart-primary);
  font-weight: 400;
}

.mashaer-cart-summary__row.is-strong span:last-child { font-weight: 600; }

.mashaer-cart-summary__row.is-discount span:last-child { color: #dc2626; }

.mashaer-cart-summary__row.is-total {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid #eee;
  align-items: baseline;
}

.mashaer-cart-summary__row.is-total span:first-child {
  color: var(--cart-primary);
  font-weight: 700;
  font-size: 16px;
}

.mashaer-cart-summary__row.is-total span:last-child {
  font-weight: 700;
  font-size: 18px;
  color: var(--cart-gold);
}

.mashaer-cart-summary__tax {
  margin: -4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--cart-muted);
  line-height: 1.4;
}

.mashaer-cart-summary__widgets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.mashaer-cart-summary__widgets > * {
  border: 1px solid var(--cart-border);
  background: var(--cart-cream);
  padding: 12px 16px;
  font-size: 14px;
}

.mashaer-cart-coupon {
  display: none;
}

.mashaer-cart-coupon__label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--cart-muted);
}

.mashaer-cart-coupon__row {
  display: flex;
  gap: 8px;
}

.mashaer-cart-coupon__row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 1px solid #ddd;
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--cart-primary);
  outline: none;
  box-sizing: border-box;
}

.mashaer-cart-coupon__row input:focus { border-color: var(--cart-gold); }

.mashaer-cart-coupon__row button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 20px;
  border: 0;
  background: var(--cart-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.mashaer-cart-coupon__row button:hover { background: var(--cart-gold); }

.mashaer-cart-coupon__remove {
  background: transparent !important;
  border: 1px solid #ddd !important;
  color: #4b5563 !important;
}

.mashaer-cart-coupon__remove:hover { color: #dc2626 !important; }

.mashaer-cart-coupon__msg {
  margin: 8px 0 0;
  font-size: 13px;
}

.mashaer-cart-coupon__msg.is-ok { color: #2d6a3e; }
.mashaer-cart-coupon__msg.is-err { color: #b45a5a; }
.mashaer-cart-coupon__msg.is-hidden { display: none; }

.mashaer-cart-coupon__applied {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--cart-primary);
  background: var(--cart-cream);
  border: 1px solid var(--cart-border);
  padding: 8px 12px;
}

.mashaer-cart-coupon__applied button {
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
}

.mashaer-cart-coupon__applied button:hover { color: #dc2626; }

.mashaer-cart-checkout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--cart-forest);
  color: #fff;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 12px;
  box-sizing: border-box;
  transition: background 0.2s;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.mashaer-cart-checkout:hover {
  background: #293b32;
  color: #fff;
}

.mashaer-cart-checkout.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.mashaer-cart-checkout .material-symbols-outlined { font-size: 24px; }

.mashaer-cart-note {
  margin: 0;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  line-height: 1.6;
}

.mashaer-cart-pays {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.mashaer-cart-pays__label {
  margin: 0 0 8px;
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
  text-transform: uppercase;
}

.mashaer-cart-pays__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mashaer-cart-pays__chip {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #eee;
  background: #fff;
  display: inline-flex;
  align-items: center;
}

.mashaer-cart-pays__chip img {
  height: 14px;
  width: auto;
  display: block;
}

.mashaer-cart-extra {
  margin-top: 16px;
}

.mashaer-cart-shipping {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--cart-border);
  background: var(--cart-cream);
  font-size: 13px;
  color: var(--cart-primary);
}

.mashaer-cart-page.is-busy {
  pointer-events: none;
  opacity: 0.72;
}

/* Hide Zid kit skeleton loaders on cart (progressive discount / wallet) */
.mashaer-cart-page .zid-kit-progressive-discount-skeleton,
.mashaer-cart-page .zid-kit-progressive-discount-skeleton-message,
.mashaer-cart-page .zid-kit-progressive-discount-skeleton-text,
.mashaer-cart-page .zid-kit-progressive-discount-skeleton-progress,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-content,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-header,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-icon,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-text,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-title,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-description,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-progress,
.mashaer-cart-page .zid-kit-customer-wallet-skeleton-balance,
.mashaer-cart-page [class*="zid-kit-"][class*="skeleton"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
