/* Cart page — Liquid Glass content */

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

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.cart-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
}

.item-main { min-width: 0; }
.item-title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chip {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-family: var(--mono);
}
.chip a { color: inherit; }
.chip.loc { background: #e0f2fe; color: #0369a1; }
.chip.line { background: #ffedd5; color: #c2410c; }
.chip.stock-ok { background: #dcfce7; color: #15803d; }
.chip.stock-out { background: #ffe4e6; color: #be123c; }
.specs {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
  font-family: var(--mono);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 120px;
}
.price {
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--mono);
  white-space: nowrap;
}
.price small {
  display: inline;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 2px;
}

.qty-row {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}
.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
  border: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.btn-icon:hover { background: rgba(0, 0, 0, 0.08); }
.btn-icon.danger:hover { background: #ffe4e6; color: var(--danger); }
.qty-row input {
  width: 40px;
  border: 0;
  text-align: center;
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 4px 0;
  outline: none;
  background: transparent;
}

.item-actions { display: flex; gap: 8px; align-items: center; }
.link-buy {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.74rem;
}
.link-buy:hover {
  background: #1d1d1f;
  color: #fff;
  border-color: #1d1d1f;
}

.liquid-group > .empty {
  border: 0;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}
.empty h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}
.empty p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.order-panel { position: sticky; top: calc(var(--nav-h) + 12px); }
.order-card {
  border-radius: 22px;
  overflow: hidden;
}
.order-card.liquid-card:hover { transform: none; }
.order-top {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.order-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.order-top h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.order-stock {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-stock::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4d4d8;
  flex-shrink: 0;
}
.order-stock.ok::before { background: var(--ok); }

.order-lines {
  list-style: none;
  margin: 0;
  padding: 14px 20px;
}
.order-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.82rem;
  color: var(--muted);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}
.order-lines li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border: 0;
}
.order-lines strong {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  font-family: var(--mono);
}

.order-pay { padding: 18px 20px 20px; }
.buy-price { text-align: left; margin-bottom: 14px; }
.buy-price .label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}
.buy-price .num {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--mono);
  margin-top: 2px;
}
.buy-price .sub {
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 4px;
  line-height: 1.4;
}
.buy-actions { display: grid; gap: 8px; }
.buy-actions.stack { grid-template-columns: 1fr; }
.order-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .cart-grid { grid-template-columns: 1fr; }
  .order-panel { position: static; }
}
@media (max-width: 640px) {
  .cart-item { grid-template-columns: 1fr; }
  .item-side {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    flex-wrap: wrap;
  }
}
