/* ===================================================================
   SISTEMA DE DISEÑO - CLASIFICADOS CRIPTO & MULTI-PASO (ANUNCIOS)
   =================================================================== */
:root {
  --bg-main: #090d16;
  --bg-card: #111827;
  --bg-card-hover: #172235;
  --bg-input: #0b111e;
  --border-subtle: #1f2937;
  --border-highlight: #374151;
  --border-gold: rgba(245, 158, 11, 0.4);
  
  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent-cyan: #00d2ff;
  --success: #10b981;
  --gold: #f59e0b;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --cyan-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  --emerald-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-vip: 0 0 25px rgba(245, 158, 11, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* NAVBAR */
.navbar {
  background: rgba(11, 17, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #0b0f19;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.btn-publish {
  background: var(--emerald-gradient);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* HERO SEARCH */
.hero-search {
  padding: 32px 0 24px;
  text-align: center;
}

.hero-search h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero-search p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.search-box-wrap {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  display: flex;
  gap: 8px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 14px 20px 14px 44px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* CATEGORY PILLS */
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 24px;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* GRID DE ANUNCIOS */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.ad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.ad-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.ad-card.is-vip {
  border: 1.5px solid var(--gold);
  box-shadow: var(--shadow-vip);
}

.ad-image-box {
  position: relative;
  width: 100%;
  height: 190px;
  background: #0b111e;
  overflow: hidden;
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ad-card:hover .ad-image {
  transform: scale(1.05);
}

.badge-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-vip {
  background: var(--gold-gradient);
  color: #0b0f19;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.badge-free {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

.badge-city {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.ad-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ad-price {
  font-size: 20px;
  font-weight: 800;
  color: #34d399;
  margin-bottom: 6px;
}

.ad-price small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.ad-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* WIZARD DE PUBLICACIÓN POR PASOS */
.wizard-container {
  max-width: 720px;
  margin: 30px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.step-node.active .step-num {
  border-color: var(--gold);
  background: var(--gold);
  color: #0b0f19;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.step-node.done .step-num {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.step-node.active .step-label {
  color: #fff;
}

/* FORM ELEMENTS */
.form-step {
  display: none;
  animation: fadeIn 0.25s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-help {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* FOTO PREVIEW UPLOADER */
.photo-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  background: rgba(11, 17, 30, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.photo-upload-zone:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.photo-grid-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-thumb {
  position: relative;
  width: 100%;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

/* PLANES DE PUBLICACIÓN SELECTION */
.plan-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .plan-cards-grid { grid-template-columns: 1fr; }
}

.plan-select-card {
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.plan-select-card:hover {
  border-color: var(--border-highlight);
}

.plan-select-card.active {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.06);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.plan-badge-top {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--gold-gradient);
  color: #0b0f19;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.plan-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-price {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.plan-features {
  list-style: none;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.plan-features li {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
}

/* BOTONES DE NAVEGACIÓN WIZARD */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  height: auto;
  max-width: 100%;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--border-subtle);
  color: #fff;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #0b0f19;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* MODAL DETALLES & CRYPTOMUS CHECKOUT */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 16, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 14px;
}

.modal-overlay.open {
  display: flex;
  animation: modalIn 0.2s ease forwards;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

/* ===================================================================
   ADAPTABILIDAD MÓVIL INTEGRAL (SMARTPHONES)
   =================================================================== */
@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }

  .navbar {
    padding: 10px 0;
  }

  .nav-wrap {
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .brand-text h1 {
    font-size: 16px;
  }

  .brand-text span {
    font-size: 9.5px;
    display: block;
  }

  .btn-publish {
    padding: 8px 13px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .hero-search {
    padding: 20px 0 14px;
  }

  .hero-search h2 {
    font-size: 21px;
    line-height: 1.25;
  }

  .hero-search p {
    font-size: 12.5px;
    margin-bottom: 14px;
  }

  .search-input {
    padding: 12px 14px 12px 40px;
    font-size: 14px;
  }

  .categories-scroll {
    padding: 10px 0 16px;
  }

  .ads-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .wizard-container {
    margin: 14px auto 30px;
    padding: 18px 14px;
    border-radius: var(--radius-lg);
  }

  .wizard-steps {
    margin-bottom: 20px;
  }

  .wizard-steps::before {
    top: 15px;
    left: 12px;
    right: 12px;
  }

  .step-num {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .step-label {
    font-size: 9.5px;
    letter-spacing: -0.02em;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .wizard-nav {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  .wizard-nav .btn {
    width: 100%;
    padding: 12px 14px;
    font-size: 13.5px;
    white-space: normal;
  }

  .photo-upload-zone {
    padding: 18px 12px;
  }
}

/* ===================================================================
   PANTALLAS 360px (SAMSUNG S3) Y MICRO 320px (SAMSUNG S2)
   =================================================================== */
@media (max-width: 380px) {
  .container {
    padding: 0 8px;
  }

  .nav-wrap {
    gap: 6px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .brand-text h1 {
    font-size: 14.5px;
  }

  .brand-text span {
    font-size: 8.5px;
  }

  .btn-publish {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .hero-search h2 {
    font-size: 18px;
  }

  .hero-search p {
    font-size: 11.5px;
  }

  .wizard-container {
    margin: 10px auto 24px;
    padding: 14px 10px;
    border-radius: 14px;
  }

  .wizard-steps {
    margin-bottom: 16px;
    gap: 2px;
  }

  .wizard-steps::before {
    top: 13px;
    left: 8px;
    right: 8px;
  }

  .step-num {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .step-label {
    font-size: 8px;
    letter-spacing: -0.04em;
  }

  .form-input, .form-select, .form-textarea {
    padding: 10px 10px;
    font-size: 13px;
  }

  .plan-select-card {
    padding: 14px 12px;
  }

  .plan-price {
    font-size: 22px;
  }

  .wizard-nav .btn {
    padding: 11px 10px;
    font-size: 12.5px;
    line-height: 1.3;
  }
}
