/* ═══════════════════════════════════════════════════════════
   BUFATTY · SHOP · IG-level
   - Market (catálogo)
   - Vista de producto
   - Pending / comprobante
   - Mis compras / Mis ventas
   - Market lightbox · IG-level (idéntico al del feed)
   - Galería de producto
   - Watermark
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   1 · PAGE BASE
   ═══════════════════════════════════════════════════════════ */

.shop-page {
  max-width: 100%;
  margin: 0;
  padding: 40px 32px 80px;
}

.shop-page-narrow {
  max-width: 520px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   2 · HEADER (market / compras / ventas)
   ═══════════════════════════════════════════════════════════ */

.shop-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 32px;
}

.shop-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-heading {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary, #f5f3ee);
  line-height: 1.1;
}

.shop-subheading {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted, #8a8f98);
  letter-spacing: -0.005em;
}

.shop-total {
  color: var(--success, #22c55e);
  font-family: var(--font-mono, monospace);
  font-weight: 700;
}

.shop-switch-link {
  font-size: 14px;
  color: var(--accent, #7c5cff);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}
.shop-switch-link:hover {
  color: var(--accent-hover, #9370ff);
}

/* ═══════════════════════════════════════════════════════════
   3 · MARKET · sort tabs + grid + tile
   ═══════════════════════════════════════════════════════════ */

/* Sort · tabs de texto IG-level */
.market-sort {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-color-soft, rgba(255, 255, 255, 0.08));
  padding-bottom: 0;
}

.market-sort-btn {
  position: relative;
  padding: 10px 0 12px;
  border: none;
  background: transparent;
  color: var(--text-muted, #8a8f98);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.market-sort-btn:hover {
  color: var(--text-secondary, #8a8f98);
}
.market-sort-btn.active {
  color: var(--text-primary, #f5f3ee);
  font-weight: 700;
}
.market-sort-btn.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent, #7c5cff);
  border-radius: 2px 2px 0 0;
}

/* Grid */
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
  margin-top: 24px;
}

@media (max-width: 1280px) {
  .market-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .market-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}
@media (max-width: 520px) {
  .market-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
}

/* Tile */
.market-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}
.market-tile:hover {
  transform: translateY(-1px);
}

.market-tile-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  transition: box-shadow 0.2s ease;
}
.market-tile:hover .market-tile-media {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.market-tile-media img,
.market-tile-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.market-tile:hover .market-tile-media img,
.market-tile:hover .market-tile-media video {
  transform: scale(1.03);
}
.market-tile-media video {
  background: #000;
  pointer-events: none;
}

.market-tile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12) 0%, rgba(255, 107, 168, 0.12) 100%);
  color: var(--text-muted, #8a8f98);
}
.market-tile-placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.6;
  color: var(--accent, #7c5cff);
}

.market-tile-video-locked {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a, #000);
  color: rgba(255, 255, 255, 0.6);
}
.market-tile-video-locked svg {
  width: 42px;
  height: 42px;
}

/* Badges */
.market-tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.95) 0%, rgba(245, 158, 11, 0.95) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #000;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}

.market-tile-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  color: #fff;
  padding: 0;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  letter-spacing: -0.02em;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
  z-index: 2;
  pointer-events: none;
}
.market-tile-count svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke-width: 2.2;
}

/* Body */
.market-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
  min-width: 0;
}

.market-tile-title {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--text-primary, #f5f3ee);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.market-tile-creator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #8a8f98);
  font-weight: 500;
  letter-spacing: -0.005em;
  min-width: 0;
}

.market-tile-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.market-tile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-tile-username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-tile-price {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent, #7c5cff);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.market-tile-price small {
  font-size: 10px;
  color: var(--text-muted, #8a8f98);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 0;
}

/* Watermark animado en tiles: DESACTIVADO */
.market-tile-wm {
  display: none;
}

/* Candado del tile */
.market-tile .is-locked::before {
  width: 40px;
  height: 40px;
}

/* Cargar más */
.shop-more {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}

/* Mobile market */
@media (max-width: 640px) {
  .shop-page {
    padding: 24px 16px 80px;
  }
  .shop-heading { font-size: 24px; }
  .shop-header { margin-bottom: 20px; }
  .market-sort { width: 100%; gap: 20px; margin: 0 -16px; padding: 0 16px; }
  .market-tile { gap: 10px; }
  .market-tile-media { border-radius: 10px; }
  .market-tile-title { font-size: 13px; line-height: 1.35; }
  .market-tile-price { font-size: 13px; }
  .market-tile-price small { font-size: 9px; }
  .market-tile-badge { font-size: 9px; padding: 3px 7px; }
  .market-tile-count { font-size: 10.5px; }
  .market-tile-count svg { width: 12px; height: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   4 · VISTA DE PRODUCTO INDIVIDUAL
   ═══════════════════════════════════════════════════════════ */

.shop-product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  background: var(--bg-card, #17191d);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 24px;
  overflow: hidden;
}

.shop-product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.shop-product-media img,
.shop-product-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-product-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted, #8a8f98);
  font-size: 13px;
}
.shop-product-placeholder svg {
  width: 56px;
  height: 56px;
}

.shop-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.shop-badge-inactive {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.shop-product-info {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shop-creator {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.shop-creator:hover {
  background: var(--bg-hover, rgba(255, 255, 255, 0.05));
}
.shop-creator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.shop-creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-creator-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.shop-creator-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #f5f3ee);
}
.shop-creator-handle {
  font-size: 12px;
  color: var(--text-muted, #8a8f98);
}

.shop-title {
  font-family: var(--font-display, inherit);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary, #f5f3ee);
}

.shop-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary, #8a8f98);
  margin: 0;
  white-space: pre-wrap;
}

.shop-price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.shop-price {
  font-family: var(--font-mono, monospace);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent, #7c5cff);
  letter-spacing: -1px;
}
.shop-price small {
  font-size: 13px;
  color: var(--text-muted, #8a8f98);
  margin-left: 6px;
  font-weight: 500;
}
.shop-sales {
  font-size: 13px;
  color: var(--text-muted, #8a8f98);
}

.shop-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.shop-actions form {
  display: contents;
}
.shop-actions .btn {
  width: 100%;
  justify-content: center;
}
.shop-buy-btn svg {
  width: 18px;
  height: 18px;
}

.shop-view-content-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.shop-view-content-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   5 · PENDING / COMPROBANTE
   ═══════════════════════════════════════════════════════════ */

.shop-pending {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.shop-pending-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent, #7c5cff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.shop-pending-icon svg {
  width: 36px;
  height: 36px;
}
.shop-pending-title {
  font-family: var(--font-display, inherit);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary, #f5f3ee);
}
.shop-pending-desc {
  font-size: 15px;
  color: var(--text-secondary, #8a8f98);
  line-height: 1.6;
  margin: 0;
}

.shop-pending-card {
  background: var(--bg-card, #17191d);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shop-pending-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.shop-pending-row > span:first-child {
  color: var(--text-secondary, #8a8f98);
}
.shop-pending-row strong {
  color: var(--text-primary, #f5f3ee);
  font-weight: 600;
}
.shop-pending-row code {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  color: var(--text-secondary, #8a8f98);
}

.shop-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.shop-status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.shop-status-paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.shop-status-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.shop-status-refunded {
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  color: var(--text-muted, #8a8f98);
}

.shop-dev-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px dashed #f59e0b;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.shop-dev-label {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f59e0b;
}
.shop-dev-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, #8a8f98);
  line-height: 1.5;
}
.shop-dev-box .btn {
  align-self: stretch;
  justify-content: center;
}

.shop-pending-hint {
  font-size: 13px;
  color: var(--text-muted, #8a8f98);
  margin: 0;
}
.shop-pending-hint a {
  color: var(--accent, #7c5cff);
}
.shop-pending-actions {
  padding-top: 8px;
}

/* ═══════════════════════════════════════════════════════════
   6 · MIS COMPRAS / MIS VENTAS
   ═══════════════════════════════════════════════════════════ */

.shop-tx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.shop-tx-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  background: var(--bg-card, #17191d);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.shop-tx-card:hover {
  border-color: var(--accent, #7c5cff);
}

.shop-tx-thumb {
  position: relative;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}
.shop-tx-thumb img,
.shop-tx-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-tx-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #8a8f98);
}
.shop-tx-placeholder svg {
  width: 30px;
  height: 30px;
}
.shop-tx-placeholder-video {
  background: linear-gradient(135deg, #1a1a1a, #000);
  color: rgba(255, 255, 255, 0.7);
}
.shop-tx-placeholder-video svg {
  width: 32px;
  height: 32px;
}

.shop-tx-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.shop-tx-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.shop-tx-title a {
  color: var(--text-primary, #f5f3ee);
  text-decoration: none;
}
.shop-tx-title a:hover {
  color: var(--accent, #7c5cff);
}

.shop-tx-meta {
  font-size: 12px;
  color: var(--text-muted, #8a8f98);
}
.shop-tx-meta a {
  color: var(--text-secondary, #8a8f98);
  text-decoration: none;
}
.shop-tx-meta a:hover {
  color: var(--accent, #7c5cff);
}

.shop-tx-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.shop-tx-amount {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #f5f3ee);
}
.shop-tx-amount small {
  font-size: 10px;
  color: var(--text-muted, #8a8f98);
  margin-left: 4px;
}
.shop-tx-commission {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted, #8a8f98);
  letter-spacing: 0.2px;
  opacity: 0.85;
}
.shop-tx-date {
  font-size: 11px;
  color: var(--text-muted, #8a8f98);
  font-family: var(--font-mono, monospace);
}

.shop-tx-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: stretch;
}

.shop-tx-view,
.shop-tx-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}
.shop-tx-view svg,
.shop-tx-download svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: block;
}
.shop-tx-view {
  background: var(--accent, #7c5cff);
  color: #fff;
}
.shop-tx-view:hover {
  background: var(--accent-hover, #9370ff);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.4);
}
.shop-tx-download {
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent, #7c5cff);
  border: 1px solid rgba(124, 92, 255, 0.25);
}
.shop-tx-download:hover {
  background: rgba(124, 92, 255, 0.2);
  transform: translateY(-1px);
}

.shop-tx-count {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   7 · EMPTY STATE
   ═══════════════════════════════════════════════════════════ */

.shop-empty {
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.shop-empty svg {
  width: 88px;
  height: 88px;
  color: var(--accent, #7c5cff);
  opacity: 0.85;
  margin-bottom: 4px;
}
.shop-empty h2 {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #f5f3ee);
  letter-spacing: -0.02em;
}
.shop-empty p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--text-muted, #8a8f98);
  max-width: 340px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   8 · GALERÍA DE PRODUCTO (visor grande)
   ═══════════════════════════════════════════════════════════ */

.shop-product-media-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.shop-product-media-wrap .shop-product-media {
  aspect-ratio: 1 / 1;
}

.shop-gallery-counter {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  z-index: 3;
  pointer-events: none;
}

.shop-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}
.shop-gallery-thumb {
  flex-shrink: 0;
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 0;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  font-family: inherit;
}
.shop-gallery-thumb:hover {
  transform: translateY(-2px);
}
.shop-gallery-thumb.is-active {
  border-color: var(--accent, #7c5cff);
}
.shop-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-gallery-thumb.is-video {
  background: #000;
}
.shop-gallery-thumb-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a, #000);
  color: #fff;
}
.shop-gallery-thumb-video svg {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}
.shop-gallery-thumb-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: inherit;
  color: #fff;
}
.shop-gallery-thumb-lock svg {
  width: 18px;
  height: 18px;
}
.shop-gallery-thumb-lock[hidden] {
  display: none !important;
}

.shop-gallery-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.shop-gallery-lock[hidden] {
  display: none !important;
}
.shop-gallery-lock svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}
.shop-gallery-lock span {
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.shop-gallery-summary {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted, #8a8f98);
  text-align: center;
}
.shop-gallery-summary strong {
  color: var(--text-primary, #f5f3ee);
}

.shop-product-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.shop-product-media img[hidden],
.shop-product-media video[hidden],
.shop-video-watermark[hidden] {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   9 · CANDADO DINÁMICO (overlay cuando no tenés acceso)
   ═══════════════════════════════════════════════════════════ */

.is-locked {
  position: relative;
  overflow: hidden;
}

.is-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.is-locked::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2' fill='%23ffffff' stroke='none'/><path d='M7 11V7a5 5 0 0 1 10 0v4' fill='none' stroke='%23ffffff' stroke-width='2'/><circle cx='12' cy='16' r='1.5' fill='%23000'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
  opacity: 0.95;
}

.shop-product-media.is-locked::before {
  width: 80px;
  height: 80px;
}

/* ═══════════════════════════════════════════════════════════
   10 · WATERMARK · overlay CSS (fotos/videos comprados)
   ═══════════════════════════════════════════════════════════ */

.shop-video-watermark {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-mono, monospace);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  animation: shop-video-wm-drift 24s ease-in-out infinite;
}
.shop-video-watermark-user {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.shop-video-watermark-note {
  font-size: 10.5px;
  opacity: 0.75;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

@keyframes shop-video-wm-drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-6px, 3px); }
  50%  { transform: translate(2px, -5px); }
  75%  { transform: translate(-3px, -2px); }
  100% { transform: translate(0, 0); }
}

.shop-photo-watermark {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  border-radius: 100px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  user-select: none;
  z-index: 5;
  max-width: 72%;
  animation: wm-fade-in 0.35s ease-out;
}
.shop-photo-watermark-user {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}
.shop-photo-watermark-note {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

@keyframes wm-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-video-watermark { animation: none; }
}
@media (max-width: 640px) {
  .shop-video-watermark {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
  }
  .shop-video-watermark-user { font-size: 11px; }
  .shop-video-watermark-note { font-size: 9px; }
  .shop-photo-watermark {
    bottom: 10px;
    right: 10px;
    padding: 5px 8px;
    max-width: 80%;
  }
  .shop-photo-watermark-user { font-size: 10px; }
  .shop-photo-watermark-note { font-size: 8px; padding-left: 6px; }
}

/* ═══════════════════════════════════════════════════════════
   11 · MARKET LIGHTBOX · IG-LEVEL
   Idéntico al lightbox del feed · X en el panel · flechas hover
   ═══════════════════════════════════════════════════════════ */

/* Variables locales (fallback si no están las de lightbox.css) */
:root {
  --lb-bg:              #0a0a0a;
  --lb-text:            #e9eaec;
  --lb-text-muted:      #8a8f98;
  --lb-line:            rgba(255, 255, 255, 0.08);
  --lb-hover:           rgba(255, 255, 255, 0.06);
  --lb-float-text:      #ffffff;
}
html[data-theme="light"] {
  --lb-bg:              #ffffff;
  --lb-text:            #0a0a0a;
  --lb-text-muted:      #8a8780;
  --lb-line:            rgba(20, 20, 20, 0.08);
  --lb-hover:           rgba(0, 0, 0, 0.05);
  --lb-float-text:      #0a0a0a;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.lightbox:not([hidden]) {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  width: 100%;
  height: 100%;
  background: var(--lb-bg);
}

/* ═══ STAGE ═══ */
.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--lb-bg);
}

.lightbox-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img,
.lightbox-video {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}
.lightbox-img[hidden],
.lightbox-video[hidden] {
  display: none !important;
}

/* ═══ Botón cerrar · en el panel, estilo IG ═══ */
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--lb-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 30;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}
.lightbox-close:hover {
  background: var(--lb-hover);
  color: var(--lb-text);
  transform: rotate(90deg);
}
.lightbox-close svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* ═══ Contador ═══ */
.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  z-index: 20;
  pointer-events: none;
}
.lightbox-counter[hidden] {
  display: none;
}

/* ═══ Flechas ‹ › · IG-level ═══ */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.18s ease, background 0.15s ease, transform 0.15s ease;
  z-index: 20;
  font-family: inherit;
  opacity: 0;
}
.lightbox-stage:hover .lightbox-nav {
  opacity: 1;
}
@media (hover: none) {
  .lightbox-nav { opacity: 1; }
}
.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.06);
}
.lightbox-nav svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ═══ Info flotante abajo-izquierda ═══ */
.lightbox-info-float {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 20;
  pointer-events: auto;
}
.lightbox-info-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox-info-head:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-1px);
}
.lightbox-info-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.lightbox-info-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox-info-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.lightbox-info-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.lightbox-info-handle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

/* ═══ Candado ═══ */
.lightbox-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  pointer-events: none;
  text-align: center;
  padding: 20px;
}
.lightbox-lock[hidden] { display: none; }
.lightbox-lock svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}
.lightbox-lock span {
  font-size: 14px;
  font-weight: 600;
}

/* ═══ PANEL DERECHO · sin borde ═══ */
.lightbox-side {
  position: relative;             /* para la X absoluta */
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--lb-bg);
  border-left: none;
}

.lightbox-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  padding-right: 56px;              /* espacio para la X */
  flex-shrink: 0;
  border-bottom: 1px solid var(--lb-line);
}
.lightbox-side-title {
  margin: 0;
  font-family: var(--font-sans, inherit);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--lb-text);
  line-height: 1;
}

.lightbox-side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.25) transparent;
}
.lightbox-side-body::-webkit-scrollbar { width: 6px; }
.lightbox-side-body::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.25);
  border-radius: 100px;
}

.lightbox-side-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.lightbox-side-creator {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lightbox-side-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff 0%, #ff6ba8 100%);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.lightbox-side-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox-side-creator-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--lb-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.lightbox-side-creator-name:hover {
  color: #7c5cff;
}

.lightbox-side-product-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lb-text);
  line-height: 1.25;
}

.lightbox-side-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 22px;
  font-weight: 700;
  color: #7c5cff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.lightbox-side-price small {
  font-size: 11px;
  color: var(--lb-text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.lightbox-side-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--lb-line);
}

.lightbox-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 100px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.lightbox-side-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lightbox-side-btn-primary {
  background: #7c5cff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}
.lightbox-side-btn-primary:hover {
  background: #9370ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.5);
}

/* Responsive lightbox */
@media (max-width: 900px) {
  .lightbox-panel {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .lightbox-side {
    border-left: none;
    border-top: 1px solid var(--lb-line);
  }
  .lightbox-info-float {
    left: 16px;
    bottom: 16px;
  }
  .lightbox-info-name { max-width: 160px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-counter { top: 16px; left: 16px; }
}

@media (max-width: 640px) {
  .lightbox-side-body { padding: 16px 18px; }
  .lightbox-side-product-title { font-size: 18px; }
  .lightbox-side-price { font-size: 20px; }
  .lightbox-nav {
    width: 36px;
    height: 36px;
  }
  .lightbox-nav svg {
    width: 18px;
    height: 18px;
  }
  .lightbox-close { top: 12px; right: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   13 · RESPONSIVE GLOBAL
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .shop-product {
    grid-template-columns: 1fr;
  }
  .shop-product-info {
    padding: 24px;
  }
  .shop-gallery-thumb {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 640px) {
  .shop-page {
    padding: 24px 16px 60px;
  }
  .shop-heading { font-size: 24px; }
  .shop-title { font-size: 22px; }
  .shop-price { font-size: 24px; }
  .shop-tx-grid {
    grid-template-columns: 1fr;
  }
}