.cart-link {
  position: relative;
  padding: 7px 14px;
  border: 1px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  font-size: 14px;
  white-space: nowrap;
}

.cart-link:hover {
  background: var(--primary);
  color: #fff;
}

.cart-count {
  display: none;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  background: #e74c3c;
  color: #fff;
  border-radius: 9px;
  font-size: 12px;
  text-align: center;
}

.cart-table {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

.cart-table th,
.cart-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #eef0f3;
}

.cart-table th {
  background: #fafbfc;
  color: #666;
}

.cart-group-row td {
  background: #edf4f1;
  color: #173a37;
  padding: 9px 12px;
  text-align: left;
}

.cart-group-row span {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 10px;
}

.cart-table td img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 auto;
}

.cart-table td:nth-child(2) {
  text-align: left;
}

.cart-table .qty {
  display: inline-block;
  min-width: 28px;
}

.cart-table button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.cart-table button.del {
  width: auto;
  padding: 0 10px;
  color: #e74c3c;
}

.cart-table .subtotal {
  color: #e74c3c;
  font-weight: 600;
}

.cart-empty {
  padding: 50px 0;
  color: var(--text-secondary);
}

.cart-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 18px;
  background: #fff;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cart-sum {
  font-size: 16px;
}

.cart-sum span {
  color: #e74c3c;
  font-size: 20px;
  font-weight: 700;
}

.clear-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.checkout-btn {
  padding: 10px 28px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.checkout-btn:hover {
  background: #c0392b;
}

.add-cart-btn {
  width: 100%;
  margin-top: 10px;
  padding: 7px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.add-cart-btn:hover {
  background: var(--primary);
  color: #fff;
}

.pay-box {
  width: 340px;
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}

.pay-box h3 {
  margin: 0 0 14px;
}

.pay-info {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.pay-amount {
  color: #e74c3c;
  font-size: 20px;
}

.pay-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto 10px;
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pay-tip {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 8px 0 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.modal-actions button {
  padding: 8px 18px;
  border: 1px solid #dcdfe6;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.modal-actions .primary {
  background: #2b7de1;
  color: #fff;
  border-color: #2b7de1;
}
.detail-box {
  display: flex;
  gap: 28px;
  background: #fff;
  padding: 24px;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
}

.product-detail-banner-actions {
  margin-top: 14px;
}

.product-back-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(23, 58, 55, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.product-back-link::before {
  content: "←";
  font-size: 18px;
  line-height: 1;
}

.product-back-link:hover {
  background: var(--primary);
  box-shadow: 0 2px 5px rgba(23, 58, 55, 0.18);
  color: #fff;
}

.detail-img {
  width: 360px;
  flex-shrink: 0;
}

.detail-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e4e6eb;
}

.detail-info {
  flex: 1;
}

.detail-info h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-price {
  color: #e74c3c;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px;
}

.detail-price small {
  font-size: 14px;
}

.detail-attrs {
  margin: 0 0 18px;
}

.detail-attrs li {
  padding: 6px 0;
  color: #666;
  font-size: 14px;
}

.detail-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-buy input {
  width: 50px;
  text-align: center;
  padding: 6px;
  border: 1px solid #e4e6eb;
  border-radius: 4px;
}

.detail-buy button {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e6eb;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.detail-actions {
  display: flex;
  gap: 14px;
}

.detail-actions .add-btn {
  padding: 12px 30px;
  background: #fff;
  border: 1px solid #2b7de1;
  color: #2b7de1;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

.detail-actions .add-btn:hover {
  background: #2b7de1;
  color: #fff;
}

.detail-actions .buy-btn {
  padding: 12px 30px;
  background: #e74c3c;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
}

@media (max-width: 768px) {
  .detail-box {
    flex-direction: column;
  }
  .detail-img {
    width: 100%;
  }
}

.inquiry-list-section {
  min-height: 430px;
}

.inquiry-list-area {
  display: flex;
  min-height: 310px;
}

.inquiry-list-area .cart-table {
  height: 100%;
}

.cart-empty {
  padding: 0;
  vertical-align: middle;
}

.cart-empty strong,
.cart-empty span {
  display: block;
}

.cart-empty strong {
  color: var(--text);
  font-size: 16px;
  margin-bottom: 8px;
}

.cart-bar[hidden] {
  display: none;
}

.deleted-cart-section {
  border-top: 1px solid var(--border);
  margin-top: 34px;
  padding-top: 26px;
}

.deleted-cart-heading h2 {
  color: var(--text);
  font-size: 20px;
  margin: 0;
}

.deleted-cart-heading p,
.deleted-cart-empty {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 6px 0 0;
}

#deletedCartList {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.deleted-cart-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  gap: 14px;
  padding: 10px 14px;
}

.deleted-cart-item img {
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.deleted-cart-info {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.deleted-cart-info strong {
  color: var(--text);
  font-size: 14px;
}

.deleted-cart-info span {
  color: var(--text-secondary);
  font-size: 12px;
}

.restore-btn {
  background: #fff;
  border: 1px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  padding: 7px 11px;
}

.restore-btn:hover {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 600px) {
  .deleted-cart-item { align-items: flex-start; flex-wrap: wrap; }
  .deleted-cart-info { min-width: calc(100% - 62px); }
  .restore-btn { margin-left: 62px; }
}
