:root {
    --primary: #25D366; --primary-dark: #1DA851;
    --secondary: #2c3e50; --secondary-dark: #1a252f;
    --bg: #f8f9fa; --card-bg: #ffffff; --muted: #e9ecef;
    --text: #333333; --heading: #2c3e50; --note: #555555;
    --border: #dddddd; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --dtf-blue: #0C5A8B; --dtf-cyan: #009FDF; --dtf-gray: #595A5C;
    --max-width: 500px; --spacing: 20px; --input-padding: 10px; --btn-padding: 12px 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    max-width: var(--max-width); 
    margin: 40px auto; 
    padding: var(--spacing); 
    background-color: var(--bg); 
    color: var(--text); 
}

.card { background: var(--card-bg); padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.logo-img { width: 100%; margin-bottom: var(--spacing); display: block; }
h2, h3 { color: var(--heading); }

/* UTILIDADES INDEX */
.status-bar { background: #f8f9fa; border: 2px solid #e9ecef; border-radius: 8px; padding: 15px; margin: 0 auto 25px auto; text-align: center; max-width: 600px; }
.status-bar p { margin: 5px 0; font-size: 15px; color: #333; }
.badge-status { padding: 4px 10px; border-radius: 4px; font-weight: bold; font-size: 13px; }
.info-section { margin-bottom: 25px; text-align: left; }
.info-section h3 { border-bottom: 2px solid var(--primary); padding-bottom: 5px; margin-bottom: 10px; }
.info-section p, .info-section ul { font-size: 14px; line-height: 1.5; margin: 0 0 15px 0; }
.info-section ul { padding-left: 20px; }

/* UTILIDADES FORMULARIO Y DRAG & DROP */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
input[type="text"], input[type="number"], textarea, select { 
    width: 100%; padding: var(--input-padding); border: 1px solid var(--border); 
    border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
    transition: 0.15s ease;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12); }

.drop-zone { border: 2px dashed var(--dtf-cyan); padding: 30px 20px; text-align: center; border-radius: var(--radius-md); background: #f1f8ff; cursor: pointer; transition: 0.2s ease; margin-bottom: 10px; }
.drop-zone:hover, .drop-zone.dragover { background: #e0f0ff; border-color: var(--dtf-blue); }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #ddd; padding: 10px 12px; border-radius: 6px; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); font-weight: bold;}
.file-item-remove { color: #dc3545; cursor: pointer; font-weight: bold; background: none; border: none; padding: 0; margin: 0; font-size: 16px; width: auto; }

.clean-fieldset { border: none; padding: 0; margin: 0 0 20px 0; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; padding: 0; }
.radio-group { display: flex; gap: 15px; align-items: center; }
.radio-group-column { display: flex; flex-direction: column; gap: 10px; }
.radio-item { display: flex; align-items: center; gap: 8px; }
.radio-label { margin-bottom: 0; display: inline; cursor: pointer; font-weight: 400; }
.envio-container { background-color: var(--muted); padding: 15px; border-radius: var(--radius-md); margin-bottom: 20px; }
.envio-nota { font-size: 13px; color: var(--note); margin: 0 0 15px 0; font-style: italic; }
.cotizacion-box { background: #f1f8ff; border: 2px solid #009FDF; padding: 20px; border-radius: 8px; text-align: center; margin-top: 25px; margin-bottom: 15px; }
.cotizacion-box h3 { margin: 0; color: #0C5A8B; font-size: 24px; }

/* BOTONES */
button, .btn { display: block; text-align: center; text-decoration: none; color: #ffffff; border: none; padding: var(--btn-padding); font-size: 16px; border-radius: var(--radius-sm); cursor: pointer; width: 100%; font-weight: 700; background-color: var(--primary); transition: 0.2s ease; font-family: inherit;}
button:hover, .btn-whatsapp:hover { background-color: var(--primary-dark); }
.btn { background-color: var(--secondary); }
.btn-blue { background-color: var(--dtf-blue); }
.btn:hover { background-color: var(--secondary-dark); }
.btn-blue:hover { background-color: #084063; }
.button-group { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-disabled { pointer-events: none; background-color: #6c757d !important; opacity: 0.7; }

/* MODAL Y PROGRESO */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); z-index: 999999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { background: #fff; padding: 30px; border-radius: 12px; width: 90%; max-width: 450px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.progress-warning { color: #dc3545; font-weight: 800; text-align: center; margin-bottom: 15px; font-size: 15px; border: 2px dashed #dc3545; padding: 10px; border-radius: 6px; background: #fff8f8; }
.oculto { display: none !important; }

/* BOTÓN FLOTANTE DE WHATSAPP */
.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px;
    background: var(--primary); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3); z-index: 500; transition: transform 0.15s ease, background-color 0.15s ease;
}
.whatsapp-float:hover { background: var(--primary-dark); transform: scale(1.08); }

/* LÍNEA DE TIEMPO DE SEGUIMIENTO DE PEDIDO */
.seguimiento-timeline { display: flex; justify-content: space-between; margin: 20px 0 5px 0; position: relative; }
.seguimiento-timeline::before {
    content: ''; position: absolute; top: 15px; left: 8%; right: 8%; height: 3px; background: var(--muted); z-index: 0;
}
.seguimiento-timeline__progreso {
    content: ''; position: absolute; top: 15px; left: 8%; height: 3px; background: var(--primary); z-index: 1; transition: width 0.3s ease;
}
.seguimiento-paso { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.seguimiento-paso__punto {
    width: 30px; height: 30px; border-radius: 50%; background: var(--muted); border: 3px solid var(--muted);
    display: flex; align-items: center; justify-content: center; font-size: 14px; color: #999; font-weight: 900;
}
.seguimiento-paso__label { font-size: 11px; font-weight: 700; color: var(--note); text-align: center; }
.seguimiento-paso--activo .seguimiento-paso__punto { background: var(--primary); border-color: var(--primary); color: #fff; }
.seguimiento-paso--activo .seguimiento-paso__label { color: var(--primary-dark); }
.seguimiento-paso--completo .seguimiento-paso__punto { background: var(--primary); border-color: var(--primary); color: #fff; }
.seguimiento-paso--cancelado .seguimiento-paso__punto { background: #dc3545; border-color: #dc3545; color: #fff; }
.seguimiento-paso--cancelado .seguimiento-paso__label { color: #dc3545; }

/* ADMIN OVERRIDES BASICOS (Para no ensuciar admin.css) */
.btn-cyan { background: var(--dtf-cyan); color: white; border: none; padding: 10px 18px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; font-family: inherit; }
.btn-cyan:hover { background: #0088cc; }
.btn-gray { background: #6c757d; color: white; border: none; padding: 10px 18px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; }

@media (max-width: 420px) { body { margin: 20px; padding: 16px; } .card { padding: 20px; } }
@media (min-width: 768px) {
    body { max-width: 850px; }
}

/* ==========================================================
   REDISEÑO SITIO PÚBLICO (index.html / formulario.html)
   Todo scopeado bajo body.rediseno-publico para no afectar
   el panel admin, que carga este mismo style.css.
   ========================================================== */
body.rediseno-publico {
    max-width: 1120px; margin: 0 auto; padding: 0; background: #F3F7FB;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.rediseno-publico h1, .rediseno-publico h2, .rediseno-publico h3 { font-family: 'Sora', 'Inter', sans-serif; }
.lp-wrap, .lp-form-wrap { padding: 28px 20px 60px 20px; }
.lp-wrap { max-width: 680px; margin: 0 auto; }

/* Botones */
.rediseno-publico .lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 12px; padding: 14px 22px; font-size: 14.5px; font-weight: 700;
    font-family: inherit; cursor: pointer; text-decoration: none; width: auto; color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.rediseno-publico .lp-btn:hover { transform: translateY(-1px); }
.rediseno-publico .lp-btn--magenta { background: var(--dtf-magenta, #E4007D); box-shadow: 0 10px 20px -8px rgba(228,0,125,0.5); }
.rediseno-publico .lp-btn--magenta:hover { background: #c40069; }
.rediseno-publico .lp-btn--ghost { background: #fff; color: var(--dtf-blue, #0C5A8B); border: 1.5px solid #CFE0EC; box-shadow: none; }
.rediseno-publico .lp-btn--ghost:hover { background: #EAF4FB; }
.rediseno-publico .lp-btn--whatsapp { background: var(--primary, #25D366); box-shadow: 0 10px 20px -8px rgba(37,211,102,0.5); white-space: nowrap; }
.rediseno-publico .lp-btn--whatsapp:hover { background: var(--primary-dark, #1DA851); }
.rediseno-publico .lp-btn.btn-disabled { pointer-events: none; background: #9aa5ac !important; box-shadow: none; }

/* Header */
.lp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.lp-logo { height: 40px; }
.lp-estado-chip { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E3EBF2; border-radius: 999px; padding: 7px 14px 7px 8px; box-shadow: 0 2px 8px rgba(12,90,139,0.05); }
.lp-estado-dot { width: 9px; height: 9px; border-radius: 50%; background: #ccc; display: inline-block; }
.lp-estado-texto { font-size: 12.5px; font-weight: 700; color: #3E525F; }

/* Hero */
.lp-hero {
    background: linear-gradient(135deg, var(--dtf-blue, #0C5A8B) 0%, #0A4A73 100%);
    border-radius: 22px; padding: 36px 32px; color: #fff;
    display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center;
    box-shadow: 0 20px 40px -14px rgba(12,90,139,0.35); margin-bottom: 18px;
}
.lp-hero__kicker { display: inline-block; background: rgba(255,255,255,0.14); border-radius: 999px; padding: 5px 13px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
.lp-hero__titulo { font-size: 27px; line-height: 1.2; font-weight: 800; margin-bottom: 12px; }
.lp-hero__sub { font-size: 14px; line-height: 1.6; color: #D7E7F2; margin: 0 0 22px 0; max-width: 440px; }
.lp-hero__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-hero__precios { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; padding: 18px; }
.lp-hero__precios-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #A9CBE0; margin: 0 0 12px 0; }
.lp-precio-row { display: flex; justify-content: space-between; gap: 10px; background: rgba(255,255,255,0.08); border-radius: 10px; padding: 11px 13px; font-size: 12.5px; color: #D7E7F2; margin-bottom: 8px; }
.lp-precio-row:last-child { margin-bottom: 0; }
.lp-precio-row strong { color: #fff; font-size: 13.5px; }
.lp-precio-row--destacado { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.32); color: #fff; }

/* Alertas y notas */
.lp-alerta { background: #FFF6E0; border: 1px solid #F5D98A; color: #7A5306; border-radius: 14px; padding: 13px 16px; font-weight: 600; font-size: 13px; margin-bottom: 18px; }
.lp-nota-ubicacion { background: #EAF4FB; border: 1px solid #CFE4F2; border-radius: 12px; padding: 13px 16px; color: #175177; font-size: 13px; line-height: 1.6; margin-bottom: 26px; }

/* Cards de info */
.lp-seccion-titulo { font-size: 18px; font-weight: 800; color: #14202A; margin: 0 0 14px 0; }
.lp-cards-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 26px; }
.lp-card { background: #fff; border: 1px solid #E7EDF3; border-radius: 16px; padding: 20px; }
.lp-card h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 10px 0; color: #14202A; }
.lp-card p, .lp-card ul { font-size: 13px; line-height: 1.7; color: #4B5C68; margin: 0 0 8px 0; }
.lp-card ul { padding-left: 18px; }
.lp-card__icono { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 10px; }
.lp-card__icono--azul { background: #EAF4FB; }
.lp-card__icono--magenta { background: #FCE9F2; }
.lp-card__icono--verde { background: #E9F9F0; }
.lp-card__destacado { color: #E4007D; font-weight: 700; font-size: 12.5px; }
.lp-card__nota { font-size: 12px; color: #7C8B96; }

/* CTA final */
.lp-cta-final { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border: 1px solid #E7EDF3; border-radius: 18px; padding: 20px 24px; flex-wrap: wrap; }
.lp-cta-final h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px 0; }
.lp-cta-final p { font-size: 13px; color: #4B5C68; margin: 0; }

/* ===== FORMULARIO ===== */
.lp-form-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; max-width: 1080px; }
.lp-form-header { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.lp-form-logo { height: 32px; }
.lp-form-header__divisor { width: 1px; height: 24px; background: #DCE6EE; }
.lp-form-header__titulo { font-size: 18px; font-weight: 800; margin: 0; }

.lp-paso { background: #fff; border: 1px solid #E7EDF3; border-radius: 16px; padding: 22px; margin-bottom: 16px; }
.lp-paso__titulo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.lp-paso__titulo h3 { font-size: 14.5px; font-weight: 700; margin: 0; }
.lp-paso__num { width: 23px; height: 23px; border-radius: 50%; background: var(--dtf-blue, #0C5A8B); color: #fff; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: 'Sora', sans-serif; }
.lp-paso__grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-ayuda { display: block; font-size: 12px; color: #7C8B96; margin-top: 6px; }

/* Pills de selección (radios estilizados) */
.lp-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-pill-input { position: absolute; opacity: 0; width: 0; height: 0; }
.lp-pill {
    display: flex; align-items: center; gap: 7px; border: 1.5px solid #DEE7EF; border-radius: 10px;
    padding: 11px 16px; font-size: 13.5px; font-weight: 600; color: #3E525F; cursor: pointer;
    transition: 0.15s ease; user-select: none;
}
.lp-pill-input:checked + .lp-pill { border-color: var(--dtf-blue, #0C5A8B); background: #EAF4FB; color: var(--dtf-blue, #0C5A8B); }
.lp-pill-input:focus-visible + .lp-pill { outline: 2px solid var(--dtf-blue, #0C5A8B); outline-offset: 1px; }

.lp-envio-box { background: #F7FAFC; border: 1px solid #E7EDF3; border-radius: 12px; padding: 18px; margin-top: 14px; }
.lp-dropzone { border-radius: 14px; }

/* Resumen: sidebar sticky en desktop, barra fija abajo en mobile */
.lp-resumen {
    position: sticky; top: 20px; background: #fff; border: 1px solid #E7EDF3; border-radius: 16px;
    padding: 22px; box-shadow: 0 12px 28px -12px rgba(12,90,139,0.15); text-align: center;
}
.lp-resumen__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #93A3AE; margin: 0 0 6px 0; }
.lp-resumen__total { font-size: 28px; font-weight: 800; color: var(--dtf-blue, #0C5A8B); margin: 0 0 18px 0; }
.lp-resumen .lp-btn { width: 100%; margin-bottom: 10px; }
.lp-resumen__volver { display: block; font-size: 12.5px; font-weight: 600; color: #93A3AE; text-decoration: none; }

/* 16px evita que Safari/Chrome mobile hagan zoom automático de toda la página al tocar un campo */
.rediseno-form input[type="text"], .rediseno-form input[type="number"], .rediseno-form textarea, .rediseno-form select { font-size: 16px; }

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 860px) {
    .lp-hero { grid-template-columns: 1fr; padding: 26px 22px; }
    .lp-cards-grid { grid-template-columns: 1fr; }
    .lp-form-wrap { grid-template-columns: 1fr; padding-bottom: 120px; }
    .lp-paso__grid2 { grid-template-columns: 1fr; }
    .lp-cta-final { flex-direction: column; align-items: flex-start; }

    /* Pasos del formulario más compactos en mobile */
    .lp-btn { padding: 11px 18px; font-size: 13.5px; }
    .lp-form-logo { height: 26px; }
    .lp-form-header { margin-bottom: 14px; gap: 10px; }
    .lp-form-header__titulo { font-size: 15.5px; }
    .lp-paso { padding: 14px; margin-bottom: 10px; }
    .lp-paso__titulo { margin-bottom: 10px; gap: 8px; }
    .lp-paso__titulo h3 { font-size: 13.5px; }
    .lp-paso__num { width: 19px; height: 19px; font-size: 10px; }
    .rediseno-form .form-group { margin-bottom: 12px; }
    .lp-pill { padding: 9px 13px; font-size: 12.5px; }
    .lp-envio-box { padding: 14px; }

    /* La columna de resumen se convierte en barra fija abajo: total arriba, botón ancho completo abajo */
    .lp-resumen {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 400;
        border-radius: 16px 16px 0 0; box-shadow: 0 -10px 26px -10px rgba(20,32,42,0.18);
        display: flex; flex-direction: column; gap: 6px; text-align: left;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 16px;
    }
    .lp-resumen__info { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
    .lp-resumen__label, .lp-resumen__total { margin: 0; }
    .lp-resumen__label { font-size: 10px; }
    .lp-resumen__total { font-size: 17px; }
    .lp-resumen .lp-btn { width: 100%; margin-bottom: 0; padding: 12px 18px; }
    .lp-resumen__volver { display: none; }

    /* La barra fija de resumen ya ocupa esa esquina: el flotante de WhatsApp se oculta acá para no taparla */
    .rediseno-form .whatsapp-float { display: none; }
}
@media (max-width: 480px) {
    .lp-wrap, .lp-form-wrap { padding: 18px 14px 100px 14px; }
    .lp-hero__titulo { font-size: 22px; }
}