/* ================================================
   Oacars - Estilos globales (tema oscuro / dorado)
   ================================================ */

:root {
  --bg: #0b0b0d;
  --bg-2: #14141a;
  --bg-3: #1c1c24;
  --line: #2a2a35;
  --text: #ececf1;
  --muted: #9a9aa8;
  --gold: #d4af37;
  --gold-2: #f1cf6b;
  --gold-soft: rgba(212, 175, 55, 0.1);
  --danger: #d24545;
  --success: #4caf7e;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-2); }

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ============= Navegación ============= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 13, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 18px 24px;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--gold);
}
.brand span { color: var(--text); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; right: 0; height: 2px;
  background: var(--gold);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 4px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(11,11,13,0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.active::after { display: none; }
}

/* ============= Botones ============= */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: var(--gold);
  color: #111;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .5px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:hover { background: var(--gold-2); color: #111; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,175,55,.25); }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #111; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b53636; color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ============= Hero (Inicio) ============= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #000;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=1920&q=80');
  background-size: cover;
  background-position: center;
  filter: brightness(.45) contrast(1.05) saturate(.9);
  animation: heroZoom 20s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.85) 100%),
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(11,11,13,0.95) 100%);
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
  max-width: 1100px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 1s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  background: rgba(212,175,55,0.08);
}
.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.hero h1 .accent { color: var(--gold); }
.hero .tagline {
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Quick search bar dentro del hero */
.hero-search {
  background: rgba(20, 20, 26, 0.85);
  border: 1px solid rgba(212,175,55,0.4);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
@media (max-width: 700px) {
  .hero-search { grid-template-columns: 1fr; }
}
.hero-search .input {
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.hero-search .btn {
  white-space: nowrap;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: '↓';
  display: block;
  font-size: 20px;
  margin-top: 6px;
  color: var(--gold);
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

/* ============= Stats / contadores ============= */
.stats-section {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 60px 24px;
}
.stats-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat .num {
  font-size: 48px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stat .label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ============= Servicios con iconos ============= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform .3s ease, border-color .3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
}
.service-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--gold-soft);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 28px;
}
.service-card h4 {
  color: var(--text);
  font-size: 17px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ============= Testimonios ============= */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.testimonial {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 80px;
  color: var(--gold);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: .4;
}
.testimonial .stars { color: var(--gold); margin-bottom: 12px; letter-spacing: 2px; }
.testimonial .quote {
  color: var(--text);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.6;
}
.testimonial .author {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
}
.testimonial .author strong { color: var(--gold); }

/* ============= CTA full-width ============= */
.cta-section {
  background:
    linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.02)),
    var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 24px;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.cta-section p {
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
}
.cta-section .hero-cta { justify-content: center; }

/* ============= Secciones generales ============= */
.section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 80px 24px;
}
.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 16px;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto 0;
}
.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ============= Catálogo: tarjetas ============= */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.car-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
}
.car-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 14px 30px rgba(0,0,0,0.6);
}
.car-card .img-wrap {
  aspect-ratio: 16/10;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.car-card .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.car-card:hover .img-wrap img { transform: scale(1.05); }
.car-card .img-placeholder {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 1px;
}
.car-card .body {
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.car-card h3 {
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--text);
}
.car-card .specs {
  display: flex; flex-wrap: wrap; gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.car-card .specs span {
  background: var(--bg-3);
  padding: 3px 10px;
  border-radius: 999px;
}
.car-card .price {
  margin-top: auto;
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
  padding-top: 8px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

/* ============= Filtros ============= */
.filters {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.filters h3 {
  color: var(--gold);
  margin-bottom: 24px;
  letter-spacing: 2px;
  font-size: 14px;
  text-transform: uppercase;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px 28px;
}
.filter-grid .field { gap: 10px; min-width: 0; }
.filter-grid .field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.filter-grid .input {
  padding: 12px 14px;
  font-size: 14px;
  height: 46px;
}
.filter-grid select.input { padding-right: 38px; }
.filter-grid .range-row .input {
  padding: 12px 12px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.input, select.input, textarea.input {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: border .15s ease, background .15s ease;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  height: 44px;
  box-sizing: border-box;
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--gold); background: var(--bg-2); }
textarea.input { min-height: 110px; height: auto; resize: vertical; padding: 12px; }
input[type="number"].input { -moz-appearance: textfield; }
input[type="number"].input::-webkit-outer-spin-button,
input[type="number"].input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}

/* Custom select arrow */
select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--bg-3);
  padding-right: 36px;
  cursor: pointer;
}
select.input:hover { border-color: rgba(212,175,55,0.4); }
select.input option {
  background: var(--bg-2);
  color: var(--text);
  padding: 8px;
}
select.input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
}
.range-row .input { width: 100%; min-width: 0; }
.filters-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}
.results-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

/* ============= Página detalle de coche ============= */
.car-detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
}
@media (max-width: 900px) {
  .car-detail { grid-template-columns: 1fr; }
}
.gallery {
  display: flex; flex-direction: column; gap: 12px;
}
.gallery .main-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.gallery .thumbs img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border .15s ease;
}
.gallery .thumbs img.active,
.gallery .thumbs img:hover { border-color: var(--gold); }
.car-info h1 {
  font-size: 32px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.car-info .car-price {
  color: var(--gold);
  font-size: 36px;
  font-weight: 700;
  margin: 14px 0 24px;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.spec-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.spec-item .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.spec-item .value {
  font-size: 15px;
  font-weight: 500;
}
.car-description {
  background: var(--bg-2);
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  white-space: pre-wrap;
}

/* ============= Contacto ============= */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.form {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.contact-side {
  display: flex; flex-direction: column; gap: 16px;
}
.info-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.info-card h4 {
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-size: 14px;
  text-transform: uppercase;
}
.info-card p, .info-card li {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}
.info-card ul { list-style: none; }
.info-card .row {
  display: flex; justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding: 6px 0;
  font-size: 14px;
}
.info-card .row:last-child { border-bottom: none; }
.map-iframe {
  width: 100%; aspect-ratio: 16/10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  filter: grayscale(.5) contrast(.95);
}

/* ============= Login ============= */
.login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.login-card h2 {
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 6px;
}
.login-card p { color: var(--muted); margin-bottom: 24px; font-size: 14px; }

/* ============= Admin ============= */
.admin-tabs {
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.admin-tab {
  padding: 10px 18px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.admin-table th {
  background: var(--bg-3);
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table img.thumb {
  width: 60px; height: 40px;
  object-fit: cover;
  border-radius: 4px;
}
.image-preview { display: none; }

/* ===== Grid de fotos ordenables ===== */
.sortable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
  min-height: 20px;
}
.photo-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--line);
  cursor: grab;
  transition: border-color .15s, box-shadow .15s;
  user-select: none;
}
.photo-item:active { cursor: grabbing; }
.photo-item.sortable-ghost { opacity: .35; }
.photo-item.sortable-chosen { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.25); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .remove-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.65); color: #fff;
  border: none; border-radius: 50%;
  width: 22px; height: 22px; font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.photo-item .remove-btn:hover { background: rgba(200,50,50,.85); }
.photo-item .photo-badge {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; border-radius: 4px; padding: 1px 5px;
}

/* ===== List toolbar + drag handle ===== */
.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.drag-handle {
  display: block;
  text-align: center;
  font-size: 18px;
  color: var(--muted);
  cursor: grab;
  user-select: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .15s;
}
.drag-handle:hover { color: var(--gold); }
.drag-handle:active { cursor: grabbing; }

/* ===== Modal de edición ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 999;
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 2rem 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%; max-width: 720px;
  padding: 2rem;
  margin: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.modal-header h3 { font-size: 1.2rem; color: var(--gold); margin: 0; }
.modal-close {
  background: none; border: none; color: var(--text);
  font-size: 1.8rem; cursor: pointer; line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--gold); }

/* ============= Lightbox ============= */
.main-img img { cursor: zoom-in; }

.lb {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.lb.hidden { display: none; }
.lb-bg {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.96);
}
.lb-img-wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  max-width: 95vw; max-height: 95vh;
  padding: 0 68px;
}
.lb-img {
  max-width: 100%; max-height: 92vh;
  object-fit: contain; display: block;
  border-radius: 4px; user-select: none;
}
.lb-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(20,20,26,0.7); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 26px; width: 42px; height: 42px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.lb-close:hover { background: rgba(212,175,55,0.3); border-color: var(--gold); }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(20,20,26,0.65); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 40px; width: 52px; height: 80px;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s; user-select: none;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { background: rgba(212,175,55,0.3); border-color: var(--gold); }
.lb-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: rgba(255,255,255,0.65); font-size: 13px;
  background: rgba(0,0,0,0.45); padding: 4px 14px; border-radius: 20px;
}
@media (max-width: 600px) {
  .lb-img-wrap { padding: 0 46px; }
  .lb-prev { left: 4px; width: 38px; font-size: 30px; }
  .lb-next { right: 4px; width: 38px; font-size: 30px; }
}

/* ============= Mensajes / alertas ============= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 14px;
}
.alert-error { background: rgba(210,69,69,0.15); color: #ff8d8d; border: 1px solid rgba(210,69,69,0.3); }
.alert-success { background: rgba(76,175,126,0.15); color: #76d6a8; border: 1px solid rgba(76,175,126,0.3); }
.alert-info { background: rgba(212,175,55,0.1); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }

/* ============= Footer ============= */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 30px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.footer .brand-mini { color: var(--gold); letter-spacing: 3px; margin-bottom: 6px; font-weight: 700; }

/* ============= Loader ============= */
.loader {
  text-align: center; color: var(--muted);
  padding: 40px;
}
.spinner {
  display: inline-block;
  width: 36px; height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============= Utilidades ============= */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.gold { color: var(--gold); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.hidden { display: none !important; }

/* ============= Admin — responsive móvil ============= */
@media (max-width: 768px) {
  .admin-tabs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Hero: evitar solapamiento con "Descubre más" */
  .hero-content { padding-bottom: 80px; }

  /* Filtros del catálogo */
  .filters { padding: 20px 16px; }
  .filter-grid { gap: 14px; }
  .range-row { grid-template-columns: 1fr; gap: 8px; }

  /* Admin table → cards on mobile */
  .admin-table,
  .admin-table tbody { display: block; background: none; border-radius: 0; overflow: visible; }
  .admin-table thead { display: none; }
  .admin-table tr {
    display: grid !important;
    grid-template-columns: 82px 1fr;
    grid-template-areas:
      "photo name"
      "photo price"
      "actions actions";
    gap: 4px 12px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
  }
  .admin-table td { display: block !important; padding: 0; border: none; background: none; }
  .admin-table .reorder-col { display: none !important; }
  .admin-table .col-photo { grid-area: photo; }
  .admin-table .col-photo .thumb {
    width: 82px; height: 64px; object-fit: cover; border-radius: 6px; display: block;
  }
  .admin-table .col-name { grid-area: name; align-self: center; line-height: 1.5; }
  .admin-table .col-sub { font-size: 12px; color: var(--muted); }
  .admin-table .col-precio {
    grid-area: price; color: var(--gold); font-weight: 600; font-size: 15px; align-self: center;
  }
  .admin-table .col-actions {
    grid-area: actions;
    display: flex !important;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    white-space: normal !important;
  }
  .admin-table .col-actions .btn { flex: 1; text-align: center; padding: 10px 6px; font-size: 13px; }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .modal-box {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 92vh;
    overflow-y: auto;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .sortable-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
