/* =========================================
   IZANINE - MASTER MODAL CSS (UNIFIED)
   ========================================= */

:root {
  --magenta: #ea4c89;
  --dark-text: #0d0c22;
  --gray-text: #6e6d7a;
  --light-bg: #f8f8f8;
  --white: #ffffff;
  --border-color: #efefef;
  --input-focus: rgba(234, 76, 137, 0.1);
}

/* OVERLAY & CONTAINER */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0px;
  z-index: 999;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.service-modal {
  width: min(1300px, 100%);
  background: #fff;
  border-radius: 16px; /* Más redondeado, más Dribbble */
  padding: 32px 48px;
  position: relative;
  transform: translateY(40px) scale(0.98);
  transition: transform 0.3s ease;
}

.overlay.active .service-modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--light-bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.modal-close:hover {
  background: #eee;
}

/* HEADER */
.service-header {
  margin-bottom: 24px;
}

.service-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 8px;
}

.author-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-line #modalCategory{
    font-weight: 300;
    color: var(--dark-text);
}
/* LAYOUT */
.service-layout {
  display: grid;
  /* Mantenemos tus proporciones */
  grid-template-columns: 63% 34%; 
  gap: 3%;
  row-gap: 0px;
  /* IMPORTANTE: Alinea al inicio, no estira los fondos */
  align-items: flex-start; 
}

.service-left {
  /* En desktop, la galería y thumbnails ocupan la fila 1, col 1 */
  grid-column: 1;
  grid-row: 1;
}

.service-right {
  /* El checkout ocupa la fila 1 y se puede extender hacia abajo en la col 2 */
  grid-column: 2;
  grid-row: 1 / span 2; 
  position: relative;
}
/* =========================================
   REVISIÓN DE LAYOUT & GALLERY
   ========================================= */


/* El contenedor de la galería debe tener un alto definido */
.gallery {
  width: 100%;
  /*height: 450px;  Medida fija para Desktop */
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #f4f4f4;
}

.gallery-track {
  display: flex;
  height: 100%; /* Que ocupe todo el alto del padre */
  transition: transform 0.4s ease;
}
.gallery-track img {
  min-width: 100%;
  height: 100%;
  
  /* MAGIA: Llena el espacio sin deformar y sin dejar bordes */
  object-fit: cover; 
  
  /* Centra la imagen para que si hay recorte, sea parejo */
  object-position: center; 
}

/* THUMBNAILS - Sin márgenes excesivos */
.thumbnails {
    display: flex;
    gap: 8px;
    margin: 12px 0; /* Espacio controlado */
    justify-content: flex-start;
    overflow-x: auto; /* Por si pones muchos thumbs */
    padding-bottom: 4px;
}

.thumbnails img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  opacity: .5;
  transition: 0.3s;
  flex-shrink: 0;
  border: 1px solid #e4e4e4;
}
.thumbnails img.active {
  opacity: 1;
}
/* PRICE BOX - Sticky solo en Desktop */
.price-box {
    background: var(--light-bg);
    padding: 32px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.03);
    height: fit-content; /* Crece según el paso del checkout */
    transition: all 0.3s ease;
}

/* CHECKOUT BOX (RIGHT SIDE) */


.checkout-step {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.price-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.main-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark-text);
  margin: 0;
}

.badge-quick {
  background: #fff8e1;
  color: #856404;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

/* FORM & STEPS UI */
.step-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark-text);
}

.modern-form {
  margin-top: 0px;
}

.m-input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 12px;
  border: 2px solid #fff;
  background: #fff;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
}

.m-input:focus {
  border-color: var(--magenta);
  box-shadow: 0 0 0 4px var(--input-focus);
}

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin: 10px 0;
  border-top: 1px solid #ebebeb;
}
.total-bar span{
  font-weight: 700;
}
.total-bar strong {
  font-size: 24px;
  color: var(--dark-text);
}

/* MILESTONES (DELIVERY OPTIONS) */
.milestones-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.milestones-desc{
    color: var(--gray-text);
    font-size: 12px;
    margin-bottom: 24px;
}
.milestone-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
  font-weight: 600;
}

.milestone-row:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.milestone-row:hover {
  background: #fafafa;
}
.ms-left, .ms-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ms-number {
  background: #f3f3f4;
  width: 24px;
  height: 24px;
  display: flex; 
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 500;
}
.milestones-card.step2{
  background: #efefef;
}
#step2 .ms-number {
  width: 14px;
  height: 14px;
  font-size: 10px;
  font-weight: 800;
  background: #f9f9f9;
}
.ms-label {
  font-weight: 600;
  color: var(--dark-text);
  font-size: 11px;
}

.ms-price {
  font-weight: 700;
  color: var(--dark-text);
  font-size: 11px;
}

.badge-status {
  background: #f3f3f4;
  color: var(--dark-text);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}
.project-meta{
  font-size: 12px;
}
/* QR & UPLOAD AREA */
.qr-container {
  text-align: center;
  background: #fff;
  padding: 12px;
  border-radius: 18px;
  margin-bottom: 20px;
}

.qr-img {
  width: 100%;
  margin-bottom: 10px;
}

.upload-area {
  margin-bottom: 0px;
}

.custom-file-btn {
  display: block;
  padding: 15px 24px;
  border: 2px dashed #dbdbdb;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: 0.3s;
  color: var(--gray-text);
  font-weight: 600;
  font-size: 14px;
}

.custom-file-btn:hover {
  border-color: var(--magenta);
  color: var(--magenta);
  background: var(--input-focus);
}

/* BUTTONS */
.price-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn-hire, .btn-request {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 25px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}
.btn-hire {
    background: var(--berry);
    color: var(--white);
}

.btn-hire:hover {
  background: var(--berry);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(127, 103, 250, 0.3);
}

.btn-request {
  background: var(--white);
  color: var(--dark-text);
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid #dbdbdb;
  cursor: pointer;
  transition: 0.2s;
}

.btn-request:hover {
  background: #f3f3f4;
}

/* DESCRIPTION */
.service-description{
  padding-bottom: 18px;
}
.service-description h3 {
  font-size: 18px;
  margin: 12px 0 12px;
  color: var(--dark-text);
}

.service-description p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-text);
  text-align: justify;
}
/* STEP 2 MODAL */
/* Estilos del Paso de Pago */
.btn-back-modal {
    background: none;
    border: none;
    color: #888;
    font-size: 0.9em;
    cursor: pointer;
    padding: 0;
    margin-bottom: 15px;
}

.payment-tabs {
    /*display: flex;
    gap: 8px;*/
    margin-bottom: 20px;
}

.p-tab {
    flex: 1;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
    color: #060318;
    font-size: 14px;
    /*para alinear*/
    display: inline-flex;  /* O 'flex' si quieres que ocupe todo el ancho */
    align-items: center;   /* Alineación vertical perfecta */
    gap: 8px;              /* Espacio uniforme entre icono y texto */
    padding: 10px 15px;    /* Ajusta según tu diseño */
}

.p-tab.active {
    background: #e9e9e9;

}
.p-tab i svg{
  width: 20px;
  display: block;
}
.qr-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px dashed #ddd;
}

.qr-img-modal {
    max-width: 220px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.qr-info .qr-number {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.qr-info .qr-name {
    display: block;
    font-size: 0.85em;
    color: #777;
    margin-bottom: 10px;
}

.btn-copy-mini {
    background: #e9ecef;
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    cursor: pointer;
}

.bank-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
}

.bank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.bank-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.bank-data strong { display: block; font-size: 0.9em; }
.bank-data span { font-size: 0.85em; color: #555; }

.btn-copy-link {
    background: none;
    border: none;
    color: #007bff;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
}

.delivery-notice {
    background: #fff4e5;
    padding: 12px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #ff9800;
}

.delivery-notice p {
    margin: 0;
    font-size: 0.85em;
    color: #663c00;
    line-height: 1.4;
}

.btn-confirm-wa {
    width: 100%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;


    background: var(--berry);
    color: var(--white);
    padding: 11px 25px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

.alt-contact {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 0.8em;
    color: #999;
    text-decoration: none;
}
/* END STEP 2 MODAL */
/* =========================================
   RESPONSIVE DESIGN (Nivel Dribbble)
   ========================================= */
@media (max-width: 900px) {
    /* 1. Definimos el mapa del modal en móvil */
    .service-modal {
      padding: 13px;
    }
    .service-layout {
        display: grid !important;
        grid-template-columns: 100% !important; /* Una sola columna */
        grid-template-areas: 
            "galeria"
            "checkout"
            "descripcion" !important;
        gap: 0 !important;
    }

    /* 2. Asignamos cada contenedor a su lugar en el mapa */
    .service-left {
        grid-area: galeria !important;
        display: block !important;
        width: 100% !important;
    }

    .service-right {
        grid-area: checkout !important;
        display: block !important;
        width: 100% !important;
        margin-top: 20px;
    }

    .service-description {
        grid-area: descripcion !important;
        display: block !important;
        width: 100% !important;
        margin-top: 30px !important;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }

    /* 3. Mantenemos el visor de imágenes funcionando */
    .gallery {
        width: 100%;
        position: relative;
        overflow: hidden;
        aspect-ratio: 1 / 1;
        background: #fff;
        border-radius: 12px;
    }

    .gallery-track {
        display: flex;
        width: 100%;
        transition: transform 0.4s ease-in-out;

    }

    .gallery-track img {
        width: 100% !important;
        min-width: 100%;
        height: 100%;
        object-fit: contain;
        flex-shrink: 0;
    }

    .thumbnails {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 10px 0;
        margin-bottom: 10px;
    }

    .thumbnails img {
        flex-shrink: 0;
    }
}
@media (max-width: 768px) {
  .gallery {
    height: 320px; /* Más bajito para que entre el precio y la descripción en la pantalla */
  }
}
@media (max-width: 480px) {
    .price-box{
      padding: 17px 16px;
    }
    .milestone-row {
      padding: 10px 7px;
    }
    .price-actions {
      display: inherit;
    }
    .btn-request {
        margin-top: 10px;
    }
    .modal-close {
      top: 0px;
      right: 2px;
      background: none;
    }
    .service-header {
      margin-bottom: 12px;
    }
    .service-header h1 {
        font-size: 22px;
        padding-right: 27px; /* Para que no choque con la X */
        margin-bottom: 3px;
    }

    .main-price {
        font-size: 28px;
    }

    .btn-hire, .btn-request {
        width: 100%; /* Botones grandes en móvil */
    }
    .service-description h3 {
      font-size: 16px;
      margin: 0px 0 12px;
    }
    .service-description p {
      font-size: 14px;
      line-height: 1.3;
    }
}
@media (max-width: 468px) {
  .gallery {
    height: 213px; /* Más bajito para que entre el precio y la descripción en la pantalla */
  }
}