:root {
  --primary-red: #d93025;
  --primary-green: #1b8e3f;
  --dark: #222;
  --light-gray: #f5f5f5;
  --border-gray: #ddd;
  --text-gray: #555;
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding:0 ;
}

.section-alt {
  background: #fff;
  padding: 3rem 1.5rem;
}

/* ===== WIZARD CARD ===== */
.wizard-wrapper {
  max-width: 100%;
  margin: 0 auto;
}

.wizard {
  background: #fff;
  /* border-radius: 1rem; */
  /* border: 1px solid var(--border-gray); */
  padding: 0;
  /* box-shadow: 0 6px 18px rgba(0,0,0,0.08); */
}

/* ===== HEADER ===== */
.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.wizard-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.wizard-step-indicator {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.progress-bar {
  margin-top: 0.5rem;
  width: 100%;
  height: 6px;
  background: var(--light-gray);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  width: 0;
  background: var(--primary-red);
  transition: width 0.2s ease-out;
}

/* ===== STEPS ===== */
.wizard-step {
  display: none;
  margin-top: 1rem;
}
.wizard-step.active {
  display: block;
}

.wizard-step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.wizard-step p {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 1rem;
}

/* ===== FORM ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  padding: 0.55rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-gray);
  font-size: 0.9rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 2px rgba(217,48,37,0.12);
}

/* ===== SERVICE CARDS STEP 1 ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.service-card {
  cursor: pointer;
}

.service-card input[type="radio"] {
  display: none;
}

.service-card-inner {
  border-radius: 10px;
  border: 1px solid var(--border-gray);
  padding: 0.9rem;
  background: #fff;
  transition: border 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background 0.15s ease-in-out;
}

.service-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-green);
  margin-bottom: 0.2rem;
}

.service-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.service-desc {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.service-card input[type="radio"]:checked + .service-card-inner {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 2px rgba(217,48,37,0.15);
  background: #fff6f5;
}

/* ===== FOOTER BUTTONS ===== */
.wizard-footer {
  margin-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wizard-footer-right {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.18s;
}

.btn-primary {
  background: var(--primary-red);
  color: #fff;
}
.btn-primary:hover {
  background: #b0231b;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-green);
  border: 1px solid var(--primary-green);
}
.btn-outline:hover {
  background: var(--primary-green);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-gray);
  color: var(--dark);
}
.btn-ghost:hover {
  background: var(--light-gray);
}

/* ===== ESTIMATE RESULT ===== */
.estimate-result {
  margin-top: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #cfd8dc;
  background: #f7fbff;
  padding: 20px;
  display: none;
}

.estimate-result h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.estimate-amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 0.3rem;
}

.estimate-sub {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 0.8rem;
}

.estimate-breakdown ul,
.estimate-details ul {
  margin-left: 1.2rem;
  margin-top: 0.3rem;
}

.estimate-details {
  margin-top: 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px solid #d0d7de;
  font-size: 0.9rem;
}

.estimate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
}





/* =============================== */
/*  ESTIMATE RESULT â€“ IMPROVED UI  */
/* =============================== */

.estimate-result {
  margin-top: 2rem;
  margin-bottom: 2rem;
  /* padding: 2rem 2rem 2.2rem; */
  /* border-radius: 12px; */
  background: #ffffff;
  /* border: 1px solid #cfd8dc; */
  /* box-shadow: 0 5px 20px rgba(0,0,0,0.06); */
}

.estimate-result h1,
.estimate-result h2,
.estimate-result h3,
.estimate-result h4 {
  margin-bottom: 0.6rem;
  margin-top: 1.2rem;
  
}

.estimate-result h1 {font-size: 30px;margin:0;padding:0;}
.estimate-result h2 {font-size: 20px;margin-bottom:25px;color:#d52b2c;}

.estimate-header {
  margin-bottom: 1.4rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 1rem;
}

.estimate-company {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.estimate-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-gray);
  margin-bottom: 0.4rem;
}

.estimate-contact {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.estimate-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-red);
  margin: 1.3rem 0 0.4rem;
}

.estimate-sub {
  font-size: 0.95rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

/* BREAKDOWN */
.estimate-breakdown {
  padding: 1rem 1.2rem;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 1.4rem;
  border-left: 4px solid var(--primary-red);
}

.estimate-breakdown ul {
  margin-left: 1.3rem;
  margin-top: 0.6rem;
  line-height: 1.6;
}

/* PROJECT DETAILS */
.estimate-details h4 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.estimate-details ul {
  margin-left: 1.3rem;
  margin-top: 0.4rem;
  line-height: 1.65;
}

/* SIGNATURE AREA */
.estimate-signature {
  margin-top: 2rem;
  border-top: 1px solid #ddd;
  padding-top: 1.3rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* BUTTON ROW */
.estimate-actions {
  margin-top: 2rem !important;
  padding-top: 1.2rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}


.print-signature {padding:100px 0 50px 0;display:none}
.print-signature div {padding:50px 0;display:none}


/* ============================== */
/*   PRINT-ONLY RULES             */
/* ============================== */
@media print {

    /* Oculta absolutamente todo */
    body * {
        visibility: hidden !important;
    }

    /* Solo muestra el estimado */
    #estimateResult, 
    #estimateResult * {
        visibility: visible !important;
    }

    /* Asegura que se imprima en la parte superior */
    #estimateResult {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 20px !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Opcional: quitar colores del wizard */
    .wizard-container, 
    .wizard-step {
        background: #fff !important;
    }

    /* Quitar botones internos */
    button, .btn {
        display: none !important;
    }

    /* No imprimir URLs subrayadas de links */
    a::after {
        content: "" !important;
    }
}


@media print {
    @page {
        size: Letter;
        margin: 0;
    }

    body {
        margin: 0;
        padding: 0;
    }

    #estimateResult {
        transform-origin: top left;
        transform: scale(0.78); /* AJUSTA ESTE VALOR */
        width: 128%; /* compensaciÃ³n del scale */
        page-break-after: avoid;
        page-break-before: avoid;
        page-break-inside: avoid;
    }

    /* Ocultar todo lo demÃ¡s en impresiÃ³n */
    body * {
        visibility: hidden !important;
    }

    #estimateResult, #estimateResult * {
        visibility: visible !important;
    }
}


/* ============================== */
/*        PRINT OPTIMIZATION      */
/* ============================== */
@media print {

    /* 1. Uso de tamaÃ±o Letter con margen cero */
    @page {
        size: A4;
        margin: 0;
    }

    /* 2. Ocultar absolutamente todo excepto #estimateResult */
    body * {
        visibility: hidden !important;
    }

    #estimateResult, 
    #estimateResult * {
        visibility: visible !important;
      border:none;
    }

    /* 3. Contenedor del PDF centrado y sin espacio inferior */
    #estimateResult {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%) scale(0.92); /* Ajusta escala si deseas */
        transform-origin: top center;
        
        width: 100%;
        max-width: 100%; /* Centrado perfecto en Letter */
        
        background: #fff !important;
        margin: 0 !important;
        padding: 30px 40px !important;
        box-shadow: none !important;
        border-radius: 0 !important;

        page-break-before: avoid;
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    /* 4. Evitar cortes en listas, textos y encabezados */
    #estimateResult *,
    .estimate-details *,
    .estimate-breakdown * {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* 5. Quitar botones */
    button, 
    .btn,
    .wizard-footer,
    .wizard-header {
        display: none !important;
    }


.print-signature {padding:50px 0 50px 0;display:block}
.print-signature div {padding:50px 0;display:block}
  
}


/* =======================================================
   Bootstrap-like Alerts for Paint Wizard
   ======================================================= */
.pew-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 1rem;
    border: 1px solid transparent;
}

.pew-alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.pew-alert-error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.pew-alert button.close-btn {
    float: right;
    border: none;
    background: none;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}



