/* MKD cart layout. Shared cards/totals live in mkd-order.css. */
body.woocommerce-cart.mkd-cart-page .elementor-widget-woocommerce-cart,
body.woocommerce-cart.mkd-cart-page .e-cart-layout-two-column,
body.woocommerce-cart.mkd-cart-page .elementor-widget-woocommerce-cart .woocommerce {
  display: block;
  max-width: 100%;
  width: 100%;
  float: none;
  grid-template-columns: none;
}

.mkd-cart {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.mkd-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (min-width: 901px) {
  .mkd-cart-layout {
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
    gap: 32px;
  }
  .mkd-cart-aside {
    position: sticky;
    top: 80px;
  }
}

.mkd-cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.mkd-cart-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  min-width: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--mkd-line);
}

.mkd-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mkd-qty-btn,
.mkd-cart .quantity .qty {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--mkd-line);
  background: var(--mkd-white);
  color: var(--mkd-ink);
  font-family: inherit;
}

.mkd-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.mkd-qty .quantity {
  margin: 0;
}

.mkd-cart .quantity .qty {
  width: 64px;
  text-align: center;
  font-weight: 600;
}

.mkd-qty .quantity .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.mkd-cart-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--mkd-line);
}

.mkd-cart-remove,
.mkd-continue {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.mkd-cart-remove {
  padding: 0 14px;
  border: 1px solid var(--mkd-line);
  border-radius: 10px;
  color: var(--mkd-ink);
  background: var(--mkd-white);
}

.mkd-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 4px 2px 0;
}

.mkd-update-cart {
  background: var(--mkd-white);
  color: var(--mkd-ink);
  border: 1px solid var(--mkd-line);
  border-radius: 10px;
  font-weight: 600;
  min-height: 48px;
  padding: 0 18px;
  font-family: inherit;
  cursor: pointer;
}

.mkd-continue {
  color: var(--mkd-muted);
}

.mkd-cart-coupon {
  margin: 8px 0 16px;
  padding-top: 12px;
  border-top: 1px solid var(--mkd-line);
}

.mkd-cart-coupon label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mkd-muted);
  margin-bottom: 8px;
}

.mkd-cart-coupon-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mkd-cart-coupon .input-text {
  flex: 1 1 140px;
  min-height: 48px;
  border: 1px solid var(--mkd-line);
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
}

.mkd-coupon-btn {
  min-height: 48px;
  padding: 0 16px;
  background: var(--mkd-white);
  color: var(--mkd-ink);
  border: 1px solid var(--mkd-line);
  border-radius: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.mkd-cart .wc-proceed-to-checkout {
  margin: 0;
}

.mkd-order-note {
  margin: 10px 0 0;
  color: var(--mkd-muted);
  font-size: 12px;
  line-height: 1.5;
}

.mkd-cart-empty {
  background: var(--mkd-white);
  border: 1px solid var(--mkd-line);
  border-radius: 16px;
  padding: 28px;
}

.mkd-cart-empty h1 {
  margin: 0 0 10px;
  font-size: 26px;
}

.mkd-cart-empty .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  background: var(--mkd-rust);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

body.woocommerce-cart.mkd-cart-page .woocommerce-notices-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.mkd-cart,
.mkd-cart-layout,
.mkd-cart-main,
.mkd-cart-aside,
.mkd-cart-card,
.mkd-cart-card-body,
.mkd-cart-specs,
.mkd-cart-toolbar,
.mkd-order-card {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  .mkd-cart-aside {
    position: static;
  }
}

@media (max-width: 767px) {
  .mkd-cart-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .mkd-cart-card-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .mkd-edit-link,
  .mkd-cart-remove {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }
  .mkd-cart-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .mkd-update-cart,
  .mkd-continue {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .mkd-cart-coupon-row {
    flex-direction: column;
  }
  .mkd-coupon-btn,
  .mkd-update-cart,
  .mkd-cart a.checkout-button {
    width: 100%;
  }
}
