/**
 * VUC宇宙商城 — cosmic-shop.css
 * 深空主题: #050810 + 金色#c9a84c + 蓝色#4a8fff
 */

/* ========== Base ========== */
.cosmic-shop {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  color: #e8e8f0;
  font-size: 14px;
  min-height: 80vh;
}

/* ========== Header ========== */
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-logo {
  font-size: 22px;
  font-weight: 700;
  color: #c9a84c;
  text-shadow: 0 0 12px rgba(201,168,76,0.3);
}
.cs-nav-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cs-nav-btn {
  background: rgba(74,143,255,0.1);
  border: 1px solid rgba(74,143,255,0.3);
  color: #4a8fff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  position: relative;
}
.cs-nav-btn:hover { background: rgba(74,143,255,0.2); }
.cs-nav-cart { position: relative; }
.cs-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.cs-back {
  background: none;
  border: 1px solid rgba(201,168,76,0.3);
  color: #c9a84c;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.cs-back:hover { background: rgba(201,168,76,0.1); }
.cs-header h2 {
  flex: 1;
  text-align: center;
  color: #c9a84c;
  margin: 0;
}

/* ========== Buttons ========== */
.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-weight: 500;
}
.cs-btn-primary {
  background: linear-gradient(135deg, #c9a84c, #d4b85c);
  color: #050810;
}
.cs-btn-primary:hover { background: linear-gradient(135deg, #d4b85c, #e0c86c); }
.cs-btn-outline {
  background: transparent;
  border: 1px solid rgba(201,168,76,0.4);
  color: #c9a84c;
}
.cs-btn-outline:hover { background: rgba(201,168,76,0.1); }
.cs-btn-icon {
  background: transparent;
  border: 1px solid rgba(74,143,255,0.3);
  color: #4a8fff;
  padding: 8px 12px;
  font-size: 16px;
}
.cs-btn-icon:hover { background: rgba(74,143,255,0.1); }
.cs-btn-sm { padding: 4px 10px; font-size: 12px; }

/* ========== Filters ========== */
.cs-filters { margin-bottom: 20px; }
.cs-filter-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.cs-cat-chip {
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(74,143,255,0.08);
  border: 1px solid rgba(74,143,255,0.2);
  color: #a0a0c0;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.cs-cat-chip:hover,
.cs-cat-chip.active {
  background: rgba(74,143,255,0.2);
  border-color: #4a8fff;
  color: #4a8fff;
}
.cs-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cs-search {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 14px;
  color: #e8e8f0;
  font-size: 14px;
}
.cs-search:focus { border-color: #4a8fff; outline: none; }
.cs-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: #e8e8f0;
  font-size: 13px;
}
.cs-select option { background: #0a0e1a; color: #e8e8f0; }

/* ========== Product Grid ========== */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.cs-card {
  background: linear-gradient(145deg, rgba(15,20,40,0.9), rgba(8,12,28,0.95));
  border: 1px solid rgba(74,143,255,0.15);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}
.cs-card:hover {
  border-color: rgba(201,168,76,0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 12px rgba(201,168,76,0.1);
}
.cs-card-img {
  height: 180px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.cs-card:hover .cs-card-img img { transform: scale(1.05); }
.cs-card-noimg {
  font-size: 3rem;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.cs-card-body { padding: 12px; }
.cs-card-type { margin-bottom: 4px; }
.cs-card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
}
.cs-card-price { margin-bottom: 4px; }
.cs-price-main {
  color: #c9a84c;
  font-size: 16px;
  font-weight: 700;
}
.cs-price-orig {
  color: #666;
  font-size: 12px;
  text-decoration: line-through;
  margin-left: 6px;
}
.cs-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #666;
}

/* ========== Type Badges ========== */
.cs-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.type-physical { background: rgba(46,204,113,0.15); color: #2ecc71; }
.type-virtual { background: rgba(155,89,182,0.15); color: #9b59b6; }
.type-digital { background: rgba(52,152,219,0.15); color: #3498db; }
.type-service { background: rgba(230,126,34,0.15); color: #e67e22; }

/* ========== Price ========== */
.cs-price-xl {
  color: #c9a84c;
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(201,168,76,0.2);
}
.cs-price-orig-lg {
  color: #666;
  font-size: 14px;
  text-decoration: line-through;
  margin-left: 10px;
}

/* ========== Detail ========== */
.cs-detail {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.cs-detail-left { flex: 0 0 400px; }
.cs-detail-img {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  margin-bottom: 8px;
}
.cs-detail-img img { width: 100%; display: block; }
.cs-detail-thumbs {
  display: flex;
  gap: 6px;
}
.cs-detail-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
}
.cs-detail-thumbs img:hover,
.cs-detail-thumbs img.active { border-color: #c9a84c; opacity: 1; }
.cs-detail-right { flex: 1; }
.cs-detail-title {
  font-size: 20px;
  font-weight: 600;
  margin: 8px 0 12px;
  line-height: 1.4;
}
.cs-detail-price { margin: 16px 0; }
.cs-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 13px;
  color: #888;
  margin: 16px 0;
}
.cs-detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
.cs-detail-desc {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.cs-detail-desc h3 {
  color: #c9a84c;
  margin-bottom: 10px;
}
.cs-detail-desc p {
  line-height: 1.8;
  color: #b0b0c0;
}
.cs-detail-reviews {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 16px;
}
.cs-review-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cs-review-hd {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.cs-review-user { color: #4a8fff; }

/* ========== Cart ========== */
.cs-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}
.cs-cart-item.cs-cart-invalid { opacity: 0.4; }
.cs-cart-img { flex-shrink: 0; }
.cs-cart-img img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.cs-cart-info { flex: 1; }
.cs-cart-title { font-size: 14px; margin-bottom: 4px; }
.cs-cart-price { color: #c9a84c; font-weight: 600; }
.cs-cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-cart-qty button {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(74,143,255,0.1);
  border: 1px solid rgba(74,143,255,0.2);
  color: #4a8fff;
  cursor: pointer;
  font-size: 14px;
}
.cs-cart-qty span { min-width: 24px; text-align: center; }
.cs-cart-del {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}
.cs-cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid rgba(201,168,76,0.2);
  margin-top: 16px;
}
.cs-cart-actions { display: flex; gap: 8px; }

/* ========== Orders ========== */
.cs-order-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.cs-tab-btn {
  padding: 8px 20px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a0a0c0;
  cursor: pointer;
  transition: all 0.2s;
}
.cs-tab-btn.active {
  background: rgba(74,143,255,0.15);
  border-color: #4a8fff;
  color: #4a8fff;
}
.cs-order-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.cs-order-hd {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}
.cs-order-no { color: #888; }
.cs-order-status { font-weight: 600; }
.status-pending_pay { color: #f39c12; }
.status-pending_ship { color: #3498db; }
.status-shipped, .status-delivered { color: #2ecc71; }
.status-completed { color: #c9a84c; }
.status-cancelled { color: #666; }
.status-refunding { color: #e74c3c; }
.status-active { color: #2ecc71; }
.status-offline { color: #666; }
.cs-order-prod { margin-bottom: 8px; }
.cs-op-title { font-weight: 500; margin-bottom: 4px; }
.cs-op-price { color: #c9a84c; font-size: 13px; }
.cs-order-ft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}
.cs-order-actions { display: flex; gap: 6px; }

/* ========== Addresses ========== */
.cs-addr-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 8px;
}
.cs-addr-item.cs-addr-default { border-color: rgba(201,168,76,0.3); }
.cs-addr-name { font-weight: 500; margin-bottom: 4px; }
.cs-addr-detail { font-size: 12px; color: #888; }
.cs-tag {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  color: #c9a84c;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}
.cs-addr-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ========== Forms ========== */
.cs-form { max-width: 500px; }
.cs-form-group { margin-bottom: 12px; }
.cs-form-group label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.cs-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.cs-form-row .cs-form-group { flex: 1; margin-bottom: 0; }
.cs-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: #e8e8f0;
  font-size: 14px;
}
.cs-input:focus { border-color: #4a8fff; outline: none; }
.cs-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: #e8e8f0;
  font-size: 14px;
  resize: vertical;
}
.cs-textarea:focus { border-color: #4a8fff; outline: none; }
.cs-form-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ========== Modal ========== */
#cs-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.cs-modal {
  background: #0c1020;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.cs-modal-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cs-modal-hd h3 { margin: 0; color: #c9a84c; font-size: 16px; }
.cs-modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1;
}
.cs-modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.cs-modal-close:active {
  background: rgba(255,255,255,0.15);
  transform: scale(0.92);
}
.cs-modal-body { padding: 18px; }
.cs-modal-ft {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.cs-modal-buy { font-size: 14px; }
.cs-mb-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cs-mb-total { font-weight: 600; border-top: 1px solid rgba(201,168,76,0.2); padding-top: 8px; margin-top: 4px; }
.cs-modal-tip { font-size: 12px; color: #888; margin-top: 8px; }
.cs-od-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.cs-od-row span:first-child { color: #888; }
.cs-tracking { max-height: 200px; overflow-y: auto; }
.cs-track-item { display: flex; gap: 12px; font-size: 12px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }

/* ========== Toast ========== */
#cs-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(12,16,32,0.95);
  border: 1px solid rgba(201,168,76,0.4);
  color: #e8e8f0;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 20000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
#cs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== Pagination ========== */
.cs-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0;
}
.cs-page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a0a0c0;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-page-btn.active {
  background: rgba(74,143,255,0.2);
  border-color: #4a8fff;
  color: #4a8fff;
}
.cs-page-ellipsis { color: #666; padding: 0 4px; }

/* ========== My Products ========== */
.cs-prod-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}
.cs-prod-title { font-weight: 500; margin-bottom: 4px; }
.cs-prod-meta { font-size: 12px; color: #888; }
.cs-prod-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cs-prod-status { font-size: 12px; margin-top: 4px; }

/* ========== Publish ========== */
.cs-publish-form { max-width: 600px; margin: 0 auto; }

/* ========== Empty / Error ========== */
.cs-empty {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 15px;
}
.cs-error {
  text-align: center;
  padding: 40px;
  color: #e74c3c;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .cs-detail { flex-direction: column; }
  .cs-detail-left { flex: none; }
  .cs-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .cs-card-img { height: 140px; }
  .cs-filter-bar { flex-wrap: wrap; }
  .cs-search { min-width: 0; }
  .cs-addr-item { flex-direction: column; gap: 8px; }
  .cs-addr-actions { align-self: flex-end; }
  .cs-order-ft { flex-direction: column; gap: 8px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .cs-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cs-card-img { height: 120px; }
  .cs-price-xl { font-size: 18px; }
  .cs-nav-btns { gap: 4px; }
  .cs-nav-btn { padding: 4px 8px; font-size: 11px; }
}
