/* Side cart drawer — match mashaer.store #cartDrawer */

.portal-drawer--cart {
  z-index: 55;
  background: #fff;
}

.portal-drawer--cart.is-open {
  opacity: 1;
  pointer-events: auto;
}

.portal-cart-drawer__inner {
  width: 100%;
  max-width: 42rem; /* max-w-2xl */
  margin: 0 auto;
  padding: 0 16px 80px;
  transform: translateY(-16px);
  transition: transform 0.5s var(--portal-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.portal-drawer--cart.is-open .portal-cart-drawer__inner {
  transform: translateY(0);
}

.portal-cart-drawer__hero {
  text-align: center;
  margin: 32px 0;
}

.portal-cart-drawer__eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mashaer-gold, #c19d60);
}

.portal-cart-drawer__title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #3b2b22;
}

.portal-cart-drawer__count {
  margin: 0 0 24px;
  font-size: 12px;
  color: #6b7280;
}

.portal-cart-drawer__continue {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: #6b7280;
  text-decoration: underline;
  text-decoration-color: #d1d5db;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.portal-cart-drawer__continue:hover {
  color: #3b2b22;
}

.portal-cart-drawer__body {
  margin-bottom: 32px;
}

.portal-cart-drawer__empty {
  text-align: center;
  padding: 24px 12px 8px;
}

.portal-cart-drawer__empty.is-hidden,
.portal-cart-drawer__items.is-hidden,
.portal-cart-drawer__footer.is-hidden,
.portal-cart-drawer__coupon-applied.is-hidden {
  display: none !important;
}

.portal-cart-drawer__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: #c19d60;
}

.portal-cart-drawer__empty-icon .material-symbols-outlined {
  font-size: 40px;
}

.portal-cart-drawer__empty h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #3b2b22;
}

.portal-cart-drawer__empty p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: #8d745d;
}

.portal-cart-drawer__shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #3b2b22;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-cart-drawer__shop:hover {
  background: #c19d60;
  color: #fff;
}

.portal-cart-drawer__items {
  display: flex;
  flex-direction: column;
  border: 1px solid #ece3d2;
  background: #fff;
}

.portal-cart-drawer__line {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #ece3d2;
}

.portal-cart-drawer__line:last-child {
  border-bottom: 0;
}

.portal-cart-drawer__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 96px;
  flex-shrink: 0;
  overflow: hidden;
  background: #faf6ef;
  text-decoration: none;
}

.portal-cart-drawer__thumb img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.portal-cart-drawer__line-main {
  flex: 1;
  min-width: 0;
}

.portal-cart-drawer__line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portal-cart-drawer__brand {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mashaer-gold, #c19d60);
}

.portal-cart-drawer__name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #3b2b22;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-cart-drawer__meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: #a89078;
}

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

.portal-cart-drawer__remove:hover {
  color: #dc2626;
}

.portal-cart-drawer__remove .material-symbols-outlined {
  font-size: 18px;
}

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

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

.portal-cart-drawer__qty button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s;
}

.portal-cart-drawer__qty button:hover {
  background: #faf7f2;
}

.portal-cart-drawer__qty span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  font-size: 14px;
  color: #3b2b22;
}

.portal-cart-drawer__prices {
  text-align: end;
}

.portal-cart-drawer__line-total {
  font-size: 16px;
  font-weight: 700;
  color: #3b2b22;
}

.portal-cart-drawer__unit {
  margin-top: 2px;
  font-size: 10px;
  color: #a89078;
}

.portal-cart-drawer__summary {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #ece3d2;
  background: #faf6ef;
}

.portal-cart-drawer__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 10px;
}

.portal-cart-drawer__row span:first-child {
  color: #6b7280;
}

.portal-cart-drawer__row span:last-child {
  color: #3b2b22;
}

.portal-cart-drawer__row--total {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e6dcc7;
  align-items: baseline;
}

.portal-cart-drawer__row--total span:first-child {
  color: #3b2b22;
  font-weight: 700;
  font-size: 16px;
}

.portal-cart-drawer__tax {
  margin: -2px 0 10px;
  font-size: 12px;
  font-weight: 400;
  color: #9a836d;
  line-height: 1.4;
}

.portal-cart-drawer__row--total span:last-child {
  color: var(--mashaer-gold, #c19d60);
  font-size: 20px;
  font-weight: 700;
}

.portal-cart-drawer__coupon {
  margin-bottom: 20px;
  display: none;
}

.portal-cart-drawer__coupon-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3b2b22;
}

.portal-cart-drawer__coupon-row {
  display: flex;
  gap: 8px;
}

.portal-cart-drawer__coupon-row input {
  flex: 1;
  height: 44px;
  border: 1px solid #ddd;
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: #3b2b22;
  font-family: inherit;
  outline: none;
}

.portal-cart-drawer__coupon-row button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  background: #3b2b22;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.portal-cart-drawer__coupon-row button:hover {
  background: #c19d60;
}

.portal-cart-drawer__coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #ece3d2;
  background: #fff;
  font-size: 13px;
  color: #3b2b22;
}

.portal-cart-drawer__coupon-applied button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.portal-cart-drawer__coupon-applied button .material-symbols-outlined {
  font-size: 16px;
}

.portal-cart-drawer__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .portal-cart-drawer__actions {
    grid-template-columns: 1fr 1fr;
  }
}

.portal-cart-drawer__checkout,
.portal-cart-drawer__view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  contain: layout;
  box-sizing: border-box;
  min-height: 46px;
  gap: 8px;
  padding: 14px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.portal-cart-drawer__checkout {
  background: #3b2b22;
  color: #fff;
}

.portal-cart-drawer__checkout:hover {
  background: #c19d60;
  color: #fff;
}

.portal-cart-drawer__view {
  border: 1px solid #ddd;
  color: #4b5563;
}

.portal-cart-drawer__view:hover {
  border-color: #3b2b22;
  color: #3b2b22;
}

.portal-cart-drawer__checkout .material-symbols-outlined,
.portal-cart-drawer__view .material-symbols-outlined {
  font-size: 24px;
}

.portal-drawer--cart.is-busy {
  cursor: wait;
}

.portal-drawer--cart.is-busy .portal-cart-drawer__inner {
  opacity: 0.65;
  pointer-events: none;
}

body.portal-cart-open {
  overflow: hidden;
}
