/* Light marketplace UI (distinct from casinowel dark/gold) */
:root {
  --mp-bg: #f3f4f8;
  --mp-card: #ffffff;
  --mp-text: #1f2430;
  --mp-muted: #6b7280;
  --mp-line: #e5e7eb;
  --mp-accent: #6d28d9;
  --mp-accent-2: #7c3aed;
  --mp-accent-soft: #ede9fe;
  --mp-price: #dc2626;
  --mp-ok: #16a34a;
  --mp-radius: 14px;
  --mp-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

.mp-shop {
  max-width: 1180px;
  margin: 18px auto 48px;
  padding: 0 16px 40px;
  color: var(--mp-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: transparent;
}

.mp-shop * { box-sizing: border-box; }

.mp-shell {
  background: var(--mp-bg);
  border-radius: 18px;
  padding: 18px 16px 28px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}

.mp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mp-line);
}

.mp-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--mp-text);
}

.mp-head p {
  margin: 6px 0 0;
  color: var(--mp-muted);
  font-size: 14px;
}

.mp-head a { color: var(--mp-accent); text-decoration: none; }
.mp-head a:hover { text-decoration: underline; }

.mp-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--mp-card);
  border: 1px solid var(--mp-line);
  color: var(--mp-text) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--mp-shadow);
}

.mp-cart-link b {
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mp-accent);
  color: #fff;
  font-size: 12px;
}

.mp-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.mp-langs a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--mp-line);
  color: var(--mp-muted);
  text-decoration: none;
  font-size: 12px;
}

.mp-langs a.is-active,
.mp-langs a:hover {
  border-color: var(--mp-accent);
  color: var(--mp-accent);
}

.mp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.mp-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--mp-line);
  color: var(--mp-text);
  text-decoration: none;
  font-size: 13px;
}

.mp-cats a.is-active,
.mp-cats a:hover {
  background: var(--mp-accent-soft);
  border-color: var(--mp-accent);
  color: var(--mp-accent);
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mp-card {
  background: var(--mp-card);
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  overflow: hidden;
  box-shadow: var(--mp-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  text-decoration: none !important;
  color: inherit !important;
  display: block;
}

.mp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

.mp-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  background: #eef0f5;
}

.mp-card-body { padding: 12px 12px 14px; }
.mp-card-body h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
  min-height: 40px;
}
.mp-card-price {
  color: var(--mp-price);
  font-size: 18px;
  font-weight: 800;
}

.mp-product-layout {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.mp-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mp-thumb {
  width: 84px;
  height: 84px;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.mp-thumb.is-active { border-color: var(--mp-accent); }
.mp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-gallery {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
}

.mp-gallery img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transform-origin: center center;
}

.mp-gallery.is-zoomed { cursor: grab; }
.mp-gallery.is-zoomed.is-panning { cursor: grabbing; }
.mp-gallery.is-zoomed img {
  transform: scale(var(--cw-zoom-scale, 2.2)) translate(var(--cw-pan-x, 0px), var(--cw-pan-y, 0px));
  cursor: inherit;
  transition: none;
  max-height: none;
}

.mp-gallery-hint {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  pointer-events: none;
}

.mp-info {
  background: var(--mp-card);
  border: 1px solid var(--mp-line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--mp-shadow);
  margin-top: 14px;
}

.mp-info h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.3;
}

.mp-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: var(--mp-ok);
  margin-bottom: 8px;
}

.mp-badge.out_of_stock { background: #fef2f2; color: #b91c1c; }
.mp-badge.preorder { background: #fff7ed; color: #c2410c; }

.mp-stars { color: #f59e0b; letter-spacing: 1px; }
.mp-desc { color: var(--mp-muted); font-size: 14px; line-height: 1.55; margin: 12px 0; }
.mp-specs { width: 100%; border-collapse: collapse; font-size: 13px; }
.mp-specs td {
  padding: 8px 0;
  border-bottom: 1px solid var(--mp-line);
  vertical-align: top;
}
.mp-specs td:first-child { color: var(--mp-muted); width: 42%; }

.mp-buybox {
  position: sticky;
  top: 16px;
  background: var(--mp-card);
  border: 1px solid var(--mp-line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--mp-shadow);
}

.mp-buybox .mp-price {
  font-size: 30px;
  font-weight: 800;
  color: var(--mp-price);
  margin: 0 0 14px;
}

.mp-qty {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--mp-line);
  border-radius: 10px;
  font-size: 14px;
}

.mp-btn {
  display: block;
  width: 100%;
  text-align: center;
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  margin-bottom: 10px;
}

.mp-btn.primary {
  background: linear-gradient(180deg, var(--mp-accent-2), var(--mp-accent));
  color: #fff !important;
}

.mp-btn.soft {
  background: var(--mp-accent-soft);
  color: var(--mp-accent) !important;
}

.mp-btn.ghost {
  background: #fff;
  border: 1px solid var(--mp-line);
  color: var(--mp-text) !important;
}

.mp-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.mp-reviews {
  margin-top: 18px;
  background: var(--mp-card);
  border: 1px solid var(--mp-line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--mp-shadow);
}

.mp-review {
  padding: 12px 0;
  border-bottom: 1px solid var(--mp-line);
}

.mp-form label {
  display: block;
  margin: 10px 0;
  font-size: 13px;
  color: var(--mp-muted);
}

.mp-form input,
.mp-form textarea,
.mp-form select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--mp-line);
  border-radius: 10px;
  font: inherit;
  color: var(--mp-text);
  background: #fff;
}

.mp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--mp-shadow);
}

.mp-table th,
.mp-table td {
  padding: 12px;
  border-bottom: 1px solid var(--mp-line);
  text-align: left;
  font-size: 14px;
}

.mp-empty {
  background: #fff;
  border: 1px dashed var(--mp-line);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  color: var(--mp-muted);
}

.mp-pay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mp-pay-opt {
  display: block;
  border: 1px solid var(--mp-line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
}

.mp-pay-opt input { margin-right: 6px; }
.mp-pay-box {
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed var(--mp-accent);
  border-radius: 12px;
  background: var(--mp-accent-soft);
  color: var(--mp-text);
  font-size: 13px;
}

@media (max-width: 980px) {
  .mp-product-layout {
    grid-template-columns: 72px 1fr;
  }
  .mp-buybox {
    grid-column: 1 / -1;
    position: static;
  }
  .mp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .mp-shop {
    margin: 8px auto 24px;
    padding: 0 8px 24px;
  }
  .mp-shell {
    padding: 12px 10px 20px;
    border-radius: 12px;
  }
  .mp-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .mp-head h1 { font-size: 22px; }
  .mp-cart-link {
    justify-content: center;
    width: 100%;
  }
  .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mp-product-layout { grid-template-columns: 1fr; gap: 12px; }
  .mp-thumbs {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mp-gallery { min-height: 260px; }
  .mp-gallery img { max-height: 360px; }
  .mp-info h1 { font-size: 20px; }
  .mp-buybox .mp-price { font-size: 26px; }
  .mp-pay-grid { grid-template-columns: 1fr 1fr; }
  .mp-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mp-langs { gap: 4px; }
  .mp-langs a { font-size: 11px; padding: 4px 6px; }
  .mp-cats a { font-size: 12px; padding: 6px 10px; }
}

@media (max-width: 480px) {
  .mp-grid { grid-template-columns: 1fr; }
  .mp-pay-grid { grid-template-columns: 1fr; }
  .mp-gallery { min-height: 220px; }
  .mp-card-body h3 { font-size: 14px; }
}
