/* ============================================================
   UsadosTruck – Hoja de estilos principal
   Paleta: Negro carbón #1A1A2E, Naranja acero #E8772E,
           Gris plata #F4F5F7, Blanco #FFFFFF, Acento azul #2563EB
   Tipografía: Inter (sistema) + DM Sans para display
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── RESET / BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --col-ink:     #1A1A2E;
  --col-orange:  #E8772E;
  --col-orange2: #C9621D;
  --col-silver:  #F4F5F7;
  --col-white:   #FFFFFF;
  --col-blue:    #2563EB;
  --col-success: #16A34A;
  --col-danger:  #DC2626;
  --col-warn:    #D97706;
  --col-muted:   #6B7280;
  --col-border:  #E5E7EB;

  --font-display: 'DM Sans', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.14);

  --nav-h:       68px;
  --transition:  .22s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:  var(--col-silver);
  color:       var(--col-ink);
  line-height: 1.6;
  font-size:   15px;
}

a { color: var(--col-orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--col-orange2); }

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

/* ── TIPOGRAFÍA ───────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.section   { padding-block: 64px; }
.section--dark { background: var(--col-ink); color: var(--col-white); }
.section--orange { background: var(--col-orange); color: var(--col-white); }

/* ── NAVEGACIÓN ───────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--col-ink);
  height: var(--nav-h);
  display: flex; align-items: center;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 1.4rem; color: var(--col-white); letter-spacing: -.5px;
}
.navbar-brand span { color: var(--col-orange); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,.8); font-weight: 500; font-size: .9rem;
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--col-white); background: rgba(255,255,255,.1); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-hamburger { display: none; background: none; border: none; cursor: pointer; color: white; font-size: 1.4rem; }

/* ── BOTONES ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  border: 2px solid transparent; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary   { background: var(--col-orange);  color: white; }
.btn-primary:hover { background: var(--col-orange2); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,119,46,.4); }
.btn-dark      { background: var(--col-ink);     color: white; }
.btn-dark:hover { background: #2a2a45; color: white; }
.btn-outline   { border-color: var(--col-orange); color: var(--col-orange); background: transparent; }
.btn-outline:hover { background: var(--col-orange); color: white; }
.btn-ghost     { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.22); color: white; }
.btn-success   { background: var(--col-success); color: white; }
.btn-danger    { background: var(--col-danger);  color: white; }
.btn-sm        { padding: 6px 14px; font-size: .8rem; }
.btn-lg        { padding: 14px 30px; font-size: 1rem; }
.btn-block     { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--col-ink) 0%, #2a2a52 60%, #1a3060 100%);
  color: white;
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/images/hero-pattern.svg') center/cover;
  opacity: .06;
}
.hero-layout  { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.hero-content { position: relative; }

/* ── Botonera de tipos en hero ── */
.hero-types        { position: relative; z-index:1; }
.hero-types-label  { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
                     color: rgba(255,255,255,.5); margin-bottom: 12px; }
.hero-types-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 260px; }
.hero-type-btn     { display: flex; flex-direction: column; align-items: center; justify-content: center;
                     gap: 7px; padding: 14px 12px; border-radius: var(--radius-sm);
                     background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
                     color: #fff; text-decoration: none; font-size: .82rem; font-weight: 500;
                     transition: background .18s, border-color .18s, transform .15s;
                     text-align: center; line-height: 1.2; }
.hero-type-btn i   { font-size: 1.5rem; color: var(--col-orange); }
.hero-type-btn:hover { background: rgba(232,119,46,.18); border-color: var(--col-orange); transform: translateY(-2px); color: #fff; }
.hero-types-all    { display: block; text-align: center; margin-top: 12px; font-size: .82rem;
                     color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.hero-types-all:hover { color: var(--col-orange); }
.hero-eyebrow {
  display: inline-block;
  background: var(--col-orange);
  color: white;
  font-size: .78rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 4px 12px;
  border-radius: 100px; margin-bottom: 18px;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 strong { color: var(--col-orange); }
.hero p  { font-size: 1.1rem; opacity: .85; margin-bottom: 32px; max-width: 500px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 32px;
}
.hero-stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--col-orange); }
.hero-stat-lbl { font-size: .8rem; opacity: .65; }

/* ── TARJETAS DE PRODUCTO ─────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--col-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-card-image {
  position: relative; height: 200px; overflow: hidden;
  background: var(--col-silver);
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card-image img { transform: scale(1.04); }
.product-card-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--col-orange); color: white;
  font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 100px;
}
.product-card-badge.featured { background: var(--col-blue); }

.product-card-body { padding: 16px; }
.product-card-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1rem; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-desc {
  font-size: .82rem; color: var(--col-muted); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-price {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 900;
  color: var(--col-orange);
}
.product-card-price small { font-size: .75rem; font-weight: 400; color: var(--col-muted); }
.product-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--col-border);
  font-size: .78rem; color: var(--col-muted);
}

/* ── FORMULARIOS ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.form-label .req { color: var(--col-danger); }

.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--col-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .9rem; color: var(--col-ink);
  background: white; transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--col-orange);
  box-shadow: 0 0 0 3px rgba(232,119,46,.15);
}
.form-control::placeholder { color: #9CA3AF; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }

.form-text    { font-size: .8rem; color: var(--col-muted); margin-top: 4px; }
.form-error   { font-size: .8rem; color: var(--col-danger); margin-top: 4px; display: none; }
.has-error .form-control { border-color: var(--col-danger); }
.has-error .form-error   { display: block; }

/* ── CARDS GENÉRICAS ──────────────────────────────────────── */
.card {
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 24px;
}
.card-header {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 2px solid var(--col-border);
}

/* ── BADGES / PILLS ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 700; padding: 3px 9px;
  border-radius: 100px;
}
.badge-orange  { background: #FFF1E6; color: var(--col-orange); }
.badge-green   { background: #F0FDF4; color: var(--col-success); }
.badge-red     { background: #FEF2F2; color: var(--col-danger); }
.badge-blue    { background: #EFF6FF; color: var(--col-blue); }
.badge-gray    { background: #F3F4F6; color: var(--col-muted); }

/* ── ALERTA / TOAST ───────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .88rem; margin-bottom: 16px;
  border-left: 4px solid transparent;
}
.alert-success { background: #F0FDF4; border-color: var(--col-success); color: #15803D; }
.alert-danger  { background: #FEF2F2; border-color: var(--col-danger);  color: #B91C1C; }
.alert-info    { background: #EFF6FF; border-color: var(--col-blue);    color: #1D4ED8; }
.alert-warn    { background: #FFFBEB; border-color: var(--col-warn);    color: #92400E; }

/* Toast flotante */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 260px; max-width: 360px;
  background: var(--col-ink); color: white;
  padding: 14px 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: .88rem; border-left: 4px solid var(--col-orange);
  animation: toastIn .3s ease;
}
.toast.success { border-color: var(--col-success); }
.toast.error   { border-color: var(--col-danger); }
@keyframes toastIn { from { transform: translateX(60px); opacity:0; } to { transform: none; opacity:1; } }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white; border-radius: var(--radius-lg);
  width: 100%; max-width: 600px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { transform: scale(.95); opacity:0; } to { transform: none; opacity:1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--col-border);
  position: sticky; top: 0; background: white; z-index: 1;
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.4rem; color: var(--col-muted); }
.modal-body  { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--col-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── GALERÍA DE IMÁGENES ──────────────────────────────────── */
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.image-thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.6); color: white; border: none;
  border-radius: 50%; width: 22px; height: 22px; font-size: .7rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img  { max-height: 85vh; max-width: 90vw; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: 16px; right: 24px; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; }

/* ── TABLA ADMIN ──────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); }
table.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  background: var(--col-ink); color: white;
  padding: 11px 14px; text-align: left; font-weight: 600; font-size: .8rem;
  letter-spacing: .3px; white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--col-border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--col-silver); }

/* ── SIDEBAR FILTROS ──────────────────────────────────────── */
.filter-sidebar { background: white; border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.filter-title { font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.filter-divider { border: none; border-top: 1px solid var(--col-border); margin-block: 16px; }

/* ── PAGINACIÓN ───────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1.5px solid var(--col-border);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  background: white; color: var(--col-ink);
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--col-orange); color: white; border-color: var(--col-orange); }

/* ── DETALLE PRODUCTO ─────────────────────────────────────── */
.product-detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.product-detail-main-img { border-radius: var(--radius-md); overflow: hidden; height: 400px; }
.product-detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.product-thumbs img { width: 72px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; opacity: .6; transition: opacity .2s; border: 2px solid transparent; }
.product-thumbs img.active, .product-thumbs img:hover { opacity: 1; border-color: var(--col-orange); }

.product-price-block { background: var(--col-silver); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; }
.product-price-big { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; color: var(--col-orange); }

.spec-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.spec-table tr:nth-child(even) td { background: var(--col-silver); }
.spec-table td { padding: 8px 12px; }
.spec-table td:first-child { font-weight: 600; width: 45%; }

/* ── PANEL LATERAL DE ADMIN ───────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; min-height: calc(100vh - var(--nav-h)); }
.admin-sidebar { background: var(--col-ink); color: white; padding: 24px 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px; color: rgba(255,255,255,.7);
  font-size: .88rem; font-weight: 500; border-left: 3px solid transparent;
  transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  color: white; background: rgba(255,255,255,.08); border-color: var(--col-orange);
}
.admin-content { padding: 24px 0; }

/* ── PÁGINA DE CONTACTO ───────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--col-orange); color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer { background: var(--col-ink); color: rgba(255,255,255,.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; color: white; margin-bottom: 12px; }
.footer-brand span { color: var(--col-orange); }
.footer-desc { font-size: .85rem; line-height: 1.7; }
.footer h4 { color: white; font-size: .9rem; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer ul a:hover { color: var(--col-orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; font-size: .8rem; }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); color: white; display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: background var(--transition); }
.social-link:hover { background: var(--col-orange); color: white; }

/* ── LOADING SPINNER ──────────────────────────────────────── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2.5px solid rgba(0,0,0,.1); border-top-color: var(--col-orange); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.white { border-color: rgba(255,255,255,.3); border-top-color: white; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.8); z-index: 10; border-radius: inherit; }

/* ── UPLOAD DE IMÁGENES ───────────────────────────────────── */
.upload-area {
  border: 2.5px dashed var(--col-border); border-radius: var(--radius-md);
  padding: 32px; text-align: center; cursor: pointer; transition: all var(--transition);
}
.upload-area:hover, .upload-area.dragover { border-color: var(--col-orange); background: #FFF8F3; }
.upload-icon { font-size: 2.5rem; margin-bottom: 8px; opacity: .4; }

/* ── ESTADO VACÍO ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--col-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: .35; display: block; }
.empty-state p { font-size: .95rem; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 992px) {
  .product-detail-grid { grid-template-columns: 1fr; }
  .contact-grid         { grid-template-columns: 1fr; }
  .footer-grid          { grid-template-columns: 1fr 1fr; }
  .admin-layout         { grid-template-columns: 1fr; }
  .admin-sidebar        { border-radius: var(--radius-md); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--col-ink); padding: 12px; }
  .nav-hamburger { display: block; }
  .hero { padding: 60px 0 50px; }
  .hero-stats { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: 40px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-actions   { flex-direction: column; }
  .hero-stats     { flex-direction: column; gap: 12px; }
  .hero-layout    { grid-template-columns: 1fr; }
  .hero-types-grid { grid-template-columns: repeat(3, 1fr); min-width: unset; }
}

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header { background: var(--col-ink); padding: 40px 0; border-bottom: 3px solid var(--col-orange); }
.page-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header h1 { color: #fff; font-size: 1.6rem; margin: 0 0 4px; }
.page-header p { color: rgba(255,255,255,.55); margin: 0; font-size: .9rem; }

/* ── STATS BAR ────────────────────────────────────────────── */
.stats-bar { background: var(--col-silver); border-bottom: 1px solid #E5E7EB; padding: 14px 0; }
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-pill { background: #fff; border: 1px solid #E5E7EB; border-radius: 20px; padding: 6px 16px; font-size: .85rem; font-weight: 600; color: var(--col-ink); }
.stat-pill span { font-size: 1rem; margin-right: 4px; }
.stat-pill--green { border-color: #10B981; color: #065F46; }
.stat-pill--green span { color: #10B981; }
.stat-pill--yellow { border-color: #F59E0B; color: #78350F; }
.stat-pill--yellow span { color: #F59E0B; }
.stat-pill--red { border-color: #EF4444; color: #7F1D1D; }
.stat-pill--red span { color: #EF4444; }

/* ── MY ADS FILTERS ──────────────────────────────────────── */
.my-ads-filters { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.my-ads-filters .filter-group { flex: 1; min-width: 180px; }

/* ── MY ADS LIST ─────────────────────────────────────────── */
.my-ads-list { display: flex; flex-direction: column; gap: 16px; }
.my-ad-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 0;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow .2s;
}
.my-ad-card:hover { box-shadow: var(--shadow-md); }
.my-ad-thumb { width: 140px; height: 120px; overflow: hidden; flex-shrink: 0; }
.my-ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-ad-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.my-ad-meta { display: flex; align-items: center; gap: 10px; }
.my-ad-date { font-size: .75rem; color: var(--col-muted); }
.my-ad-title { font-size: 1rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-ad-title a { color: var(--col-ink); text-decoration: none; }
.my-ad-title a:hover { color: var(--col-orange); }
.my-ad-desc { font-size: .85rem; color: var(--col-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.my-ad-price { font-size: 1.05rem; font-weight: 700; color: var(--col-orange); margin-top: auto; }
.my-ad-actions { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-left: 1px solid #F3F4F6; justify-content: center; min-width: 110px; }
.my-ad-actions .btn { justify-content: flex-start; white-space: nowrap; }

/* ── IMAGES GRID (modal) ─────────────────────────────────── */
.images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 20px; }
.image-thumb-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; }
.image-thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.img-delete-btn {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer;
  border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; opacity: 0; transition: opacity .2s;
}
.image-thumb-item:hover .img-delete-btn { opacity: 1; }

/* ── USER DROPDOWN ───────────────────────────────────────── */
.nav-user-menu { position: relative; }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid #E5E7EB; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); min-width: 200px; z-index: 200; overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .875rem; color: var(--col-ink);
  text-decoration: none; transition: background .15s;
}
.user-dropdown a:hover, .user-dropdown a.active { background: var(--col-silver); color: var(--col-orange); }
.user-dropdown hr { margin: 4px 0; border: none; border-top: 1px solid #F3F4F6; }

/* ── UPLOAD ITEMS ────────────────────────────────────────── */
.upload-item { font-size: .85rem; padding: 4px 0; color: var(--col-muted); }

/* ── BADGES EXTRA ────────────────────────────────────────── */
.badge-danger  { background: #FEE2E2; color: #991B1B; }

/* ── FORM ROW 2 ──────────────────────────────────────────── */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.req { color: var(--col-orange); }

/* ── RESPONSIVE MY ADS ───────────────────────────────────── */
@media (max-width: 768px) {
  .my-ad-card { grid-template-columns: 100px 1fr; }
  .my-ad-thumb { width: 100px; height: 100px; }
  .my-ad-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-left: none; border-top: 1px solid #F3F4F6; min-width: unset; }
  .form-row-2 { grid-template-columns: 1fr; }
  .page-header-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .my-ad-card { grid-template-columns: 1fr; }
  .my-ad-thumb { width: 100%; height: 180px; }
}

/* ── MODAL – CORRECCIONES Y TAMAÑOS ──────────────────────── */
.modal-box    { position: relative; padding: 28px 24px 24px; }
.modal-sm     { max-width: 440px; }
.modal-lg     { max-width: 820px; }
.modal-close  {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--col-silver); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--col-muted);
  transition: background var(--transition), color var(--transition);
  z-index: 2;
}
.modal-close:hover { background: #E5E7EB; color: var(--col-ink); }
.modal-box > h3 {
  margin: 0 36px 20px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--col-border);
  font-size: 1.1rem;
}
.modal-icon {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; margin: 4px auto 20px;
}
.modal-icon--danger  { background: #FEE2E2; color: var(--col-danger);  }
.modal-icon--success { background: #D1FAE5; color: var(--col-success); }
.modal-box > p { color: var(--col-muted); font-size: .9rem; margin-bottom: 16px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--col-border);
}

/* ── BADGES FALTANTES ────────────────────────────────────── */
.badge-success   { background: #D1FAE5; color: #065F46; }
.badge-warning   { background: #FEF3C7; color: #92400E; }
.badge-secondary { background: #F3F4F6; color: #4B5563; }
.badge-orange    { background: #FFEDD5; color: #9A3412; }
.badge-danger    { background: #FEE2E2; color: #991B1B; }

/* ── BADGE BAJADA DE PRECIO ──────────────────────────────── */
.price-drop-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: #EF4444;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .3px;
  box-shadow: 0 2px 6px rgba(239,68,68,.35);
}
.product-card-prev-price {
  font-size: .78rem;
  color: var(--col-muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}
.product-card-price.price-reduced {
  color: #EF4444;
}

/* ── TOGGLE DESTACADO EN TABLA ───────────────────────────── */
.featured-toggle { cursor: pointer; display: inline-flex; align-items: center; }
.featured-toggle input[type="checkbox"] { display: none; }
.featured-star { transition: transform .15s; display: inline-block; }
.featured-toggle:hover .featured-star { transform: scale(1.25); }

/* ── STAT PILL EXTRA ─────────────────────────────────────── */
.stat-pill--orange { border-color: var(--col-orange); color: #92400E; }
.stat-pill--orange span { color: var(--col-orange); }

/* ── UPLOAD ZONE (modal de imágenes) ─────────────────────── */
.upload-zone {
  border: 2px dashed var(--col-border); border-radius: var(--radius-md);
  padding: 24px 16px; text-align: center; cursor: pointer;
  transition: all var(--transition); margin-top: 16px;
  color: var(--col-muted); font-size: .88rem;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--col-orange); background: #FFF8F3; }
.upload-zone i { display: block; font-size: 1.8rem; margin-bottom: 8px; opacity: .5; }
.upload-link { color: var(--col-orange); cursor: pointer; font-weight: 600; }

/* ── PASSWORD TOGGLE ─────────────────────────────────────── */
.pwd-toggle { position:absolute; right:10px; top:50%; transform:translateY(-50%);
              background:none; border:none; cursor:pointer; color:var(--col-muted);
              font-size:1rem; padding:0; line-height:1; }
.pwd-toggle:hover { color:var(--col-orange); }

/* ── LOADING SPINNER (bloque de texto) ───────────────────── */
.loading-spinner { text-align: center; padding: 40px 20px; color: var(--col-muted); font-size: .9rem; }
.spin { animation: spin .7s linear infinite; display: inline-block; }

/* ── BANNER CAROUSEL ─────────────────────────────────────── */
.banner-carousel  { position:relative; overflow:hidden; width:100%; max-height:420px; background:#000; }
.banner-track     { display:flex; transition:transform .5s ease; height:100%; }
.banner-slide     { min-width:100%; max-height:420px; overflow:hidden; display:block; }
.banner-slide img { width:100%; height:420px; object-fit:cover; display:block; }
.banner-arrow     { position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,.45);
                    color:#fff; border:none; cursor:pointer; font-size:2.2rem; line-height:1;
                    padding:4px 16px; z-index:10; border-radius:4px; transition:background .2s; }
.banner-arrow:hover { background:rgba(0,0,0,.75); }
.banner-prev      { left:12px; }
.banner-next      { right:12px; }
.banner-dots      { position:absolute; bottom:12px; left:50%; transform:translateX(-50%);
                    display:flex; gap:7px; z-index:10; }
.banner-dot       { width:10px; height:10px; border-radius:50%; background:rgba(255,255,255,.5);
                    border:none; cursor:pointer; padding:0; transition:background .2s; }
.banner-dot.active { background:#fff; }

/* ── BANNER ADMIN LIST ───────────────────────────────────── */
.banner-item      { display:flex; align-items:center; gap:14px; padding:12px;
                    border:1px solid var(--col-border); border-radius:var(--radius-sm);
                    margin-bottom:10px; background:var(--col-surface); }
.banner-thumb     { width:120px; height:60px; object-fit:cover; border-radius:4px;
                    flex-shrink:0; background:#eee; }
.banner-thumb-empty { width:120px; height:60px; border-radius:4px; flex-shrink:0;
                      background:#f0f0f0; display:flex; align-items:center; justify-content:center;
                      color:var(--col-muted); font-size:.75rem; }
.banner-inactive  { opacity:.45; }
@media (max-width:600px) {
  .banner-slide img { height:200px; }
  .banner-carousel, .banner-track { max-height:200px; }
  .banner-thumb     { width:80px; height:42px; }
}

