/* ==========================================================================
   mc-cart.css — 购物车产品卡（参考 007idc member_center 设计）
   ========================================================================== */

.mc-cart-products-surface {
  padding: 24px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eef7;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
}

/* 网格 */
.mc-cart-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
@media (max-width: 1400px) { .mc-cart-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .mc-cart-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .mc-cart-product-grid { grid-template-columns: 1fr; } }

/* 产品卡 */
.mc-cart-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 17px;
  background: linear-gradient(180deg, #edf4ff 0%, #ffffff 55%);
  border: 1px solid #c3d4f0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(30, 51, 92, .06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.mc-cart-product-card:hover {
  border-color: #4d8bff;
  box-shadow: 0 8px 22px rgba(34, 101, 237, .12);
  transform: translateY(-2px);
}

/* 卡头 */
.mc-cart-product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.mc-cart-product-head h2 {
  min-width: 0;
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 库存标签 */
.mc-cart-stock {
  flex: 0 0 auto;
  padding: 3px 7px;
  background: #f0faf6;
  border: 1px solid #bcebd9;
  border-radius: 3px;
  color: #059669;
  font-size: 11px;
  white-space: nowrap;
}
.mc-cart-stock.is-low {
  background: #fff7ed;
  border-color: #ffd8a8;
  color: #d97706;
}
.mc-cart-stock.is-empty {
  background: #fff1f0;
  border-color: #ffccc7;
  color: #dc2626;
}

/* 描述/规格区 */
.mc-cart-product-description {
  margin: 14px 0 16px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.mc-cart-product-description-rich > * { max-width: 100%; }
.mc-cart-product-description-rich p,
.mc-cart-product-description-rich ul,
.mc-cart-product-description-rich ol { margin-top: 0; margin-bottom: .65em; }

/* 规格列表（description 里的 strong/br 结构） */
.mc-cart-product-description-rich strong { color: #334155; font-weight: 600; }

/* 规格项三段式（如果有 ul.spec-item） */
.mc-cart-product-description-rich .specs-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
.mc-cart-product-description-rich .spec-item {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-bottom: 0 !important;
  padding: 2px 0 !important;
}
.mc-cart-product-description-rich .spec-label {
  display: flex;
  flex: 0 0 82px;
  align-items: center;
  min-width: 82px !important;
  margin-right: 6px !important;
  font-size: inherit !important;
}
.mc-cart-product-description-rich .spec-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: inherit !important;
}
.mc-cart-product-description-rich .spec-icon {
  width: 16px !important;
  margin-right: 5px !important;
  font-size: 11px !important;
  color: #94a3b8;
}

/* 卡底：价格 + 按钮 */
.mc-cart-product-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.mc-cart-price {
  min-width: 0;
  color: #d97706;
}
.mc-cart-price strong {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.mc-cart-price-unit {
  font-size: 12px;
  color: #64748b;
  margin-left: 2px;
}
.mc-cart-original-price {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 11px;
  text-decoration: line-through;
}

.mc-cart-buy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  background: #0b63e6;
  border: 1px solid #0b63e6;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all .16s ease;
  cursor: pointer;
}
.mc-cart-buy:hover {
  background: #0952c2;
  border-color: #0952c2;
  box-shadow: 0 4px 12px rgba(11, 99, 230, .24);
  transform: translateY(-1px);
}
.mc-cart-buy i { font-size: 11px; }
.mc-cart-buy.is-disabled {
  background: #f2f4f7;
  border-color: #e4e7ec;
  color: #98a2b3 !important;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 空状态 */
.mc-cart-empty {
  text-align: center;
  padding: 70px 20px;
  color: #98a2b3;
}
