/* =========================================================
   DESGUACES MEILÁN - Diseño industrial sobrio
   ========================================================= */
:root {
  --bg: #f4f4f1;
  --bg-2: #ebeae5;
  --bg-3: #e0dfd9;
  --surface: #ffffff;
  --ink: #1d2024;
  --ink-2: #3a3d44;
  --muted: #6c707a;
  --line: #d8d6cf;
  --line-2: #c5c2b8;

  --brand: #b4541b;
  --brand-dark: #8a3f10;
  --brand-soft: #f3e5d6;
  --steel: #3d4f5c;
  --steel-dark: #2a3742;

  --ok: #4a7c4e;
  --warn: #c08a2e;
  --danger: #a04141;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-1: 0 2px 6px rgba(0,0,0,.06);
  --shadow-2: 0 10px 24px rgba(0,0,0,.10);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: 'Inter', sans-serif; font-weight: 700; margin: 0 0 .6em; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { color: var(--ink-2); }
a { color: var(--brand-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand); }
.muted { color: var(--muted); }
.container { width: min(1200px, 92%); margin: 0 auto; }

.bg-grid, .bg-glow { display: none; }

/* HEADER */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-flex; }
.brand-text { line-height: 1.1; }
.brand-text strong { display: block; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: .3px; }
.brand-text span { color: var(--brand); font-size: .78rem; letter-spacing: 3px; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { font-size: .94rem; font-weight: 500; color: var(--ink-2); padding: 6px 0; position: relative; }
.site-nav a:not(.btn-call)::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--brand); transition: width .25s; }
.site-nav a.active, .site-nav a:hover:not(.btn-call) { color: var(--brand-dark); }
.site-nav a.active::after, .site-nav a:hover:not(.btn-call)::after { width: 100%; }
.btn-call { background: var(--brand); color: #fff !important; padding: 9px 18px; border-radius: var(--radius); font-weight: 600; font-size: .9rem; }
.btn-call:hover { background: var(--brand-dark); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line-2); color: var(--ink); padding: 8px 12px; border-radius: var(--radius); cursor: pointer; }

/* HERO */
.hero { position: relative; padding: 60px 0 70px; background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-canvas { display: none; }
.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 4px; font-size: .76rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 18px; font-weight: 600; }
.eyebrow .dot { width: 6px; height: 6px; background: var(--brand); border-radius: 50%; }

.hero h1 .grad { color: var(--brand-dark); }
.hero p.lead { font-size: 1.05rem; max-width: 560px; margin: 0 0 26px; color: var(--ink-2); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius); font-weight: 600; font-size: .92rem; border: 1px solid transparent; cursor: pointer; transition: all .2s ease; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink-2); color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }

.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-stats .stat strong { display: block; font-weight: 800; font-size: 1.9rem; color: var(--ink); letter-spacing: -.5px; }
.hero-stats .stat span { color: var(--muted); font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; }

.hero-visual { position: relative; }
.hero-cube { position: relative; }
.hero-cube .card3d { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-2); aspect-ratio: 4/3; }
.hero-cube .card3d img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-cube .card3d::after { display: none; }

.float-card { position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-1); font-size: .88rem; }
.float-card .ic { width: 36px; height: 36px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-size: 1rem; }
.float-card .tx strong { display: block; font-size: .88rem; color: var(--ink); }
.float-card .tx span { font-size: .74rem; color: var(--muted); }
.float-card.fc-1 { top: -14px; left: -18px; }
.float-card.fc-2 { bottom: 30%; right: -22px; }
.float-card.fc-3 { bottom: -14px; left: 14%; }

/* SECCIONES */
section { padding: 70px 0; position: relative; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head p { font-size: 1rem; color: var(--muted); }

.servicios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.serv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px; transition: border-color .2s, transform .2s; }
.serv-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.serv-card .ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-dark); font-size: 1.2rem; margin-bottom: 16px; }
.serv-card p { font-size: .92rem; margin: 0; }

.trust-bar { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; }
.trust-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 22px; align-items: center; }
.trust-row .trust-item { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--ink-2); }
.trust-row .trust-item i { font-size: 1.2rem; color: var(--brand); }

.vehiculos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.veh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; display: block; }
.veh-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.veh-card .veh-img { aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--bg-3); }
.veh-card .veh-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.veh-card:hover .veh-img img { transform: scale(1.04); }
.veh-card .veh-img::after { display: none; }
.veh-badge { position: absolute; top: 12px; left: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 4px 10px; font-size: .72rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; z-index: 2; color: var(--ink-2); }
.veh-badge.disponible { background: #e8f1e9; border-color: #c7dccb; color: var(--ok); }
.veh-badge.despiezado { background: var(--brand-soft); border-color: #e3c8aa; color: var(--brand-dark); }
.veh-badge.reservado { background: #fdf5e3; border-color: #ead9b0; color: var(--warn); }
.veh-card .veh-body { padding: 18px 20px 22px; }
.veh-card .veh-marca { font-size: .74rem; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.veh-card .veh-modelo { font-size: 1.05rem; font-weight: 700; margin: 4px 0 10px; color: var(--ink); }
.veh-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.veh-meta span i { color: var(--brand); margin-right: 4px; }

.cats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 16px; text-align: center; transition: all .2s; display: block; }
.cat-card:hover { border-color: var(--brand); background: var(--bg-2); }
.cat-card .cat-ic { width: 44px; height: 44px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-dark); font-size: 1.15rem; }
.cat-card h4 { font-size: .92rem; margin: 0 0 4px; color: var(--ink); }
.cat-card span { font-size: .76rem; color: var(--muted); }

.cta-band { background: var(--steel-dark); color: #fff; border-radius: var(--radius-lg); padding: 44px 40px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c4cbd1; }

.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius); font-size: .94rem; font-family: inherit; transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(180,84,27,.12); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--ink-2); }
.form-check input { width: 16px; height: 16px; margin-top: 3px; }
.form-check label { margin: 0; }

.contact-info { background: var(--steel-dark); color: #d8dde2; border-radius: var(--radius-lg); padding: 32px; }
.contact-info h5, .contact-info p, .contact-info a { color: #fff; }
.info-item { display: flex; gap: 14px; margin-bottom: 22px; }
.info-item .ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius); background: rgba(255,255,255,.08); color: var(--brand); display: grid; place-items: center; font-size: 1rem; }
.info-item h5 { margin: 0 0 2px; font-size: .82rem; letter-spacing: 1px; text-transform: uppercase; color: #c4cbd1; }
.info-item p { margin: 0; color: #fff; font-size: .92rem; }
.info-item a { color: #fff; }

.alert { padding: 12px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: .9rem; border: 1px solid; }
.alert-success { background: #e8f1e9; color: var(--ok); border-color: #c7dccb; }
.alert-error { background: #f7e6e6; color: var(--danger); border-color: #e8c8c8; }
.alert-info { background: #e8eef2; color: var(--steel-dark); border-color: #c5d2db; }

.page-hero { padding: 60px 0 40px; text-align: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 14px; }
.page-hero .breadcrumb { display: inline-flex; gap: 6px; font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.page-hero .breadcrumb a { color: var(--brand-dark); }

.site-footer { background: var(--steel-dark); color: #c4cbd1; padding: 56px 0 18px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-col h4 { font-size: .9rem; margin-bottom: 16px; color: #fff; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.footer-col a { display: block; color: #b8c0c8; font-size: .9rem; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-col p { color: #b8c0c8; font-size: .88rem; margin: 6px 0; }
.footer-col p i { color: var(--brand); margin-right: 8px; }
.footer-col .brand-text strong { color: #fff; }
.footer-col .muted { color: #9ba2aa; }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius); background: rgba(255,255,255,.08); color: #fff; }
.socials a:hover { background: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: .8rem; color: #9ba2aa; flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: #b8c0c8; margin-right: 12px; }
.footer-bottom a:hover { color: #fff; }

.float-wa { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 52px; height: 52px; border-radius: 50%; background: #25D366; color: #fff !important; display: grid; place-items: center; font-size: 1.5rem; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.float-wa:hover { transform: scale(1.05); }

.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.detail-img { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 2rem; }
.detail-specs { list-style: none; padding: 0; margin: 24px 0; }
.detail-specs li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.detail-specs li span:first-child { color: var(--muted); }
.detail-specs li span:last-child { font-weight: 600; color: var(--ink); }

.reveal { opacity: 1; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .contact-grid, .cta-band { grid-template-columns: 1fr; padding: 32px 24px; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; top: 64px; right: -100%; height: calc(100vh - 64px); width: 80%; max-width: 300px; background: var(--surface); border-left: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 26px 22px; gap: 16px; transition: right .3s; }
  .site-nav.open { right: 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  section { padding: 50px 0; }
  .float-card { display: none; }
}

/* ADMIN */
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.admin-side { background: var(--steel-dark); color: #c4cbd1; padding: 22px 16px; }
.admin-side .brand { margin-bottom: 28px; }
.admin-side .brand-text strong { color: #fff; }
.admin-side a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius); color: #b8c0c8; font-size: .92rem; margin-bottom: 2px; text-decoration: none; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,.06); color: #fff; }
.admin-side a.active { background: var(--brand); color: #fff; }
.admin-side a i { width: 16px; }
.admin-main { padding: 26px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-topbar h1 { margin: 0; font-size: 1.5rem; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 16px; margin-bottom: 30px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; }
.admin-card .ic { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; margin-bottom: 12px; background: var(--brand-soft); color: var(--brand-dark); }
.admin-card strong { display: block; font-weight: 800; font-size: 1.7rem; color: var(--ink); }
.admin-card span { color: var(--muted); font-size: .82rem; }

table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
table.tbl th, table.tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.tbl th { background: var(--bg-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: var(--bg-2); }

.tag { display: inline-block; padding: 3px 9px; border-radius: 4px; font-size: .72rem; font-weight: 600; letter-spacing: .3px; border: 1px solid; }
.tag-ok { background: #e8f1e9; color: var(--ok); border-color: #c7dccb; }
.tag-warn { background: #fdf5e3; color: var(--warn); border-color: #ead9b0; }
.tag-info { background: #e8eef2; color: var(--steel-dark); border-color: #c5d2db; }
.tag-muted { background: var(--bg-2); color: var(--muted); border-color: var(--line); }

.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-danger { background: #f7e6e6; color: var(--danger); border-color: #e8c8c8; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow-2); }
.login-card .brand { justify-content: center; margin-bottom: 24px; }
.login-card h2 { text-align: center; }

.cat-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cat-filters select, .cat-filters input { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); padding: 9px 12px; border-radius: var(--radius); font-size: .88rem; font-family: inherit; }
.cat-filters .btn { padding: 9px 18px; }

.pieza-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; display: block; }
.pieza-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.pieza-card .p-img { aspect-ratio: 1/1; overflow: hidden; background: var(--bg-3); }
.pieza-card .p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pieza-card:hover .p-img img { transform: scale(1.04); }
.pieza-card .p-body { padding: 16px 18px 20px; }
.pieza-card h4 { font-size: .95rem; margin: 0 0 4px; color: var(--ink); font-weight: 600; }
.pieza-card .p-ref { font-size: .72rem; color: var(--muted); }
.pieza-card .p-price { font-weight: 700; font-size: 1.15rem; color: var(--brand-dark); margin-top: 8px; }
