/* ============================================================
   CUSTOM-NORMEX.CSS
   ------------------------------------------------------------
   Archivo de ajustes propios del sitio NORMEX, separado del
   CSS del theme (main.css) para que:

     1) Nunca se pierdan estos cambios si algún día se actualiza
        o regenera main.css (por ejemplo con un nuevo build).
     2) Sea fácil encontrar y editar SOLO lo que se personalizó,
        sin tener que buscar entre miles de líneas de main.css.

   Este archivo se carga DESPUÉS de main.css en:
   include/header.php (línea del <link rel="stylesheet">),
   así que cualquier regla de aquí le gana a main.css sin
   necesidad de usar !important (excepto donde se indica por
   qué sí hace falta).
   ============================================================ */


/* ============================================================
   1) GALARDONES - TARJETAS (nosotros.php)
   ============================================================ */

.tj-project-section-2 .card-img-top {
  width: 100%;
  height: 260px;                                        
  object-fit: contain;                                                                                                                                               
  background: #fff;        
  padding: 15px;           
}

@media only screen and (max-width: 767px) {
  /* En celular reducimos un poco más el alto para que no ocupe tanta pantalla */
  .tj-project-section-2 .card-img-top {
    height: 200px;
  }
}


/* ============================================================
   2) GALARDONES - SLIDER (index.php, sección con Swiper)
   ============================================================ */

.tj-project-section-2 .project-slider .swiper-slide {
  width: 190px !important;   /* Celular (por defecto / mobile-first) */
}

@media only screen and (min-width: 576px) {
  .tj-project-section-2 .project-slider .swiper-slide {
    width: 210px !important;  /* Celular grande / tablet chica */
  }
}

@media only screen and (min-width: 992px) {
  .tj-project-section-2 .project-slider .swiper-slide {
    width: 230px !important;  /* Tablet grande / laptop */
  }
}

@media only screen and (min-width: 1400px) {
  .tj-project-section-2 .project-slider .swiper-slide {
    width: 250px !important;  /* Pantallas grandes de escritorio */
  }
}


.tj-project-section-2 .project-slider .project-item {
  width: 100%;         
  height: auto;
  min-height: unset;   
  aspect-ratio: 2 / 3;  
  margin: 0;
  border-radius: 16px; /* Esquinas redondeadas, opcional */
  overflow: hidden;    /* Necesario para que el border-radius se note en la imagen */
}

.tj-project-section-2 .sec-heading .sub-title {
  background-color: #ffffff;
  color: #2b5b84;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  margin-bottom: 15px;
}

/* Título principal: "Nuestros" azul oscuro y "galardones." en gris/azul claro */
.tj-project-section-2 .sec-heading .sec-title {
  color: #0d2235;
  font-weight: bold;
  font-size: 50px;
}

.tj-project-section-2 .sec-heading .sec-title span {
  color: #9cb0b8;
  font-weight: normal;
}


.tj-project-section-2 .project-content .categories,
.tj-project-section-2 .project-content .project-text .title {
  color: #ffffffd3;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-align: center;
  font-size: 16px; /* Equivalente a 12pt en web */
}

.tj-project-section-2 .project-content {
  text-align: center;
}

/* ============================================================
   3) MODALIDADES
   ============================================================ */

/* Estructura base de las tarjetas */
.tj-pricing-section .pricing-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 35px 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tj-pricing-section .pricing-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Encabezado centrado con espacio inferior */
.tj-pricing-section .pricing-header {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tj-pricing-section .pricing-box.active .pricing-header {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.tj-pricing-section .package-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tj-pricing-section .package-desc p {
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.85;
  margin: 0;
}

/* Listas alineadas a la izquierda con buen espaciado */
.tj-pricing-section .list-items {
  flex-grow: 1;
  text-align: left;
}

.tj-pricing-section .list-items ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tj-pricing-section .list-items li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 14px;
  text-align: left;
}

.tj-pricing-section .list-items li i {
  flex-shrink: 0;
  margin-top: 3px;
}

/* Iconos blancos para la tarjeta activa (azul) */
.tj-pricing-section .pricing-box.active .list-items li i {
  color: #ffffff;
}


/* ============================================================
   4) SUCURSALES
   ============================================================ */
/* --- SUCURSALES: ALINEACIÓN MILIMÉTRICA DE IMÁGENES Y BLOQUES --- */

/* 1. Grid */
#sec-sucursales .sucursales-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* 2. Tarjeta */
#sec-sucursales .sucursal-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#sec-sucursales .sucursal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* 3. Encabezado (Altura fija para absorber 1 o 2 líneas de título) */
#sec-sucursales .sucursal-header {
  min-height: 72px; /* Mantiene la misma altura en los 3 títulos */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 8px;
}

/* 4. Nombre con degradado */
#sec-sucursales .sucursal-nombre {
  font-size: 19px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 2px 0;
  line-height: 1.25;
  background-image: linear-gradient(90deg, #002b49 0%, #1d5278 45%, #8a9ea7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* 5. Ciudad */
#sec-sucursales .sucursal-ciudad {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
}

/* 6. Dirección (Altura fija para que las 3 imágenes empiecen EN LA MISMA LÍNEA) */
#sec-sucursales .sucursal-info {
  font-size: 13.5px;
  line-height: 1.45;
  color: #475569;
  margin: 0 0 16px 0;
  min-height: 78px; /* Mantiene la misma altura para direcciones cortas y largas */
  display: flex;
  align-items: flex-start;
}

/* 7. IMAGEN TOTALMENTE ALINEADA */
#sec-sucursales .sucursal-thumb {
  width: 100%;
  height: 175px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background-color: #f1f5f9;
  flex-shrink: 0;
}

#sec-sucursales .sucursal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

#sec-sucursales .sucursal-card:hover .sucursal-thumb img {
  transform: scale(1.04);
}

/* 8. Bloque inferior de contactos */
#sec-sucursales .sucursal-body {
  margin-top: auto; /* Empuja el correo y horario siempre al final de la tarjeta */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#sec-sucursales .sucursal-contacto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
  line-height: 1.4;
}

#sec-sucursales .sucursal-contacto strong {
  color: #0f172a;
  font-size: 13px;
}

#sec-sucursales .sucursal-contacto span {
  color: #475569;
}

#sec-sucursales .sucursal-contacto a {
  color: #1d5278;
  text-decoration: underline;
  word-break: break-all;
  transition: color 0.2s ease;
}

#sec-sucursales .sucursal-contacto a:hover {
  color: #002b49;
}

/* Adaptación Móvil */
@media (max-width: 991px) {
  #sec-sucursales .sucursales-grid {
    grid-template-columns: 1fr;
  }
  #sec-sucursales .sucursal-header,
  #sec-sucursales .sucursal-info {
    min-height: auto; /* En celular las tarjetas van en lista, no requieren min-height */
  }
}
  
/* ============================================================
   5) ROTACIÓN SOBRE EJE VERTICAL PARA IMAGEN DE SERVICIO
   ============================================================ */

/* 1. Prepara la imagen para girar en 3D sobre su eje */
.service-item .service-icon img {
  display: inline-block !important;
  transition: transform 0.8s ease-in-out !important;
  transform-style: preserve-3d;
  /* (Se quitó el filtro de color para conservar el azul original) */
}

/* 2. Rotación planetaria (360° sobre el eje Y) al pasar el cursor */
.service-item:hover .service-icon img,
.service-item-wrapper:hover .service-icon img {
  transform: rotateY(360deg) !important;
}



/* ============================================================
   6) Estilos del blog
   ============================================================ */

/* Imagen: llena todo el alto de la tarjeta */
.tj-blog-section .blog-item.style-2 .blog-thumb {
  align-self: stretch;
  height: auto;
  min-height: 260px;
  overflow: hidden;
}
.tj-blog-section .blog-item.style-2 .blog-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}
.tj-blog-section .blog-item.style-2 .blog-thumb img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  object-position: center;
}

/* Contenido: evita que el texto se salga por la derecha */
.tj-blog-section .blog-item.style-2 .blog-content {
  min-width: 0;                 /* clave en contenedores flex */
  overflow-wrap: anywhere;
}

/* Título: máximo 3 líneas */
.tj-blog-section .blog-item.style-2 .blog-content .title {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  font-size: 22px;
  line-height: 1.3;
}

/* Descripción: máximo 4 líneas */
.tj-blog-section .blog-item.style-2 .blog-content .desc {
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-align: left;
}

/* Celular: la tarjeta se apila, imagen arriba */
@media (max-width: 767px) {
  .tj-blog-section .blog-item.style-2 .blog-thumb,
  .tj-blog-section .blog-item.style-2 .blog-thumb img {
    min-height: 0;
    height: 220px;
  }
}

/* Modal por encima del header y del resto del tema */
.modal          { z-index: 99999 !important; }
.modal-backdrop { z-index: 99998 !important; }

/* Texto largo dentro del modal */
.modal-body            { overflow-wrap: anywhere; }
.modal-body .desc-full { text-align: left; line-height: 1.7; white-space: normal; }




/* ============================================================
   7) Estilos del carrito.php
   ============================================================ */

/* Imagen: llena todo el alto de la tarjeta */

  .tienda-carrito .carrito-card {
    background: #fff;
    border: 1px solid #e3eaf1;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
  }
  .tienda-carrito .carrito-card > h4 { margin-bottom: 1.25rem; }
  .tienda-carrito .carrito-seguir { font-weight: 600; text-decoration: underline; }

  /* Fila de producto */
  .tienda-carrito .item {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e8eef4;
  }
  .tienda-carrito .item:first-child { padding-top: 0; }
  .tienda-carrito .item:last-child  { border-bottom: 0; padding-bottom: 0; }
  .tienda-carrito .item-img {
    width: 84px;
    height: 100px;
    border: 1px solid #e3eaf1;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .tienda-carrito .item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
  .tienda-carrito .item-titulo { font-weight: 700; display: block; overflow-wrap: anywhere; line-height: 1.3; }
  .tienda-carrito .item-sku    { font-size: .8rem; color: #6b7c8c; }
  .tienda-carrito .item-meta   { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-top: .5rem; }
  .tienda-carrito .badge-version {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    background: #fff3cd;
    color: #7a5b00;
  }
  .tienda-carrito .badge-version.digital { background: #d9ecf9; color: #124d7a; }
  .tienda-carrito .item-precio { color: #44566a; font-size: .95rem; }

  .tienda-carrito .item-lado { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
  .tienda-carrito .item-subtotal { font-weight: 700; font-size: 1.1rem; color: #082032; }

  .tienda-carrito .cantidad {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c9d6e2;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
  }
  .tienda-carrito .cantidad button {
    width: 34px; height: 36px;
    border: 0; background: transparent;
    font-size: 1.1rem; line-height: 1; cursor: pointer; color: #082032;
  }
  .tienda-carrito .cantidad button:hover { background: #e8f0f8; }
  .tienda-carrito .cantidad input {
    width: 48px; height: 36px;
    border: 0; text-align: center; font-weight: 600; background: transparent;
    -moz-appearance: textfield;
  }
  .tienda-carrito .cantidad input::-webkit-outer-spin-button,
  .tienda-carrito .cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

  .tienda-carrito .btn-quitar {
    border: 0; background: transparent; color: #b71c1c;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .85rem; font-weight: 600; cursor: pointer; padding: 4px 0;
  }
  .tienda-carrito .btn-quitar:hover { text-decoration: underline; }
  .tienda-carrito .btn-quitar svg { width: 16px; height: 16px; }

  /* Carrito vacío */
  .tienda-carrito .vacio { text-align: center; padding: 3rem 1rem; }
  .tienda-carrito .vacio svg { width: 64px; height: 64px; color: #9cb0c2; margin-bottom: 1rem; }

  /* Resumen */
  .tienda-carrito .resumen-fila {
    display: flex; justify-content: space-between; align-items: center;
    padding: .75rem 0; border-bottom: 1px solid #e8eef4;
  }
  .tienda-carrito .resumen-bloque { padding: .9rem 0; border-bottom: 1px solid #e8eef4; }
  .tienda-carrito .resumen-total { font-size: 1.35rem; font-weight: 800; color: #082032; border-bottom: 0; }
  .tienda-carrito .envio-op {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .75rem; margin-top: .5rem;
    border: 1px solid #dbe5ee; border-radius: 10px; cursor: pointer;
  }
  .tienda-carrito .envio-op:hover { background: #f3f8fc; }
  .tienda-carrito .envio-op input { flex-shrink: 0; accent-color: #24588d; }
  .tienda-carrito .envio-op span { flex: 1; font-size: .92rem; }
  .tienda-carrito .envio-op b { white-space: nowrap; }

  .tienda-carrito .acciones { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.25rem; }
  .tienda-carrito .acciones .tj-primary-btn { width: 100%; justify-content: space-between; }
  .tienda-carrito .acciones .tj-primary-btn[disabled] { opacity: .5; pointer-events: none; }
  .tienda-carrito .btn-cancelar {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #b71c1c;
    border-radius: 999px;
    background: transparent;
    color: #b71c1c;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s;
  }
  .tienda-carrito .btn-cancelar:hover { background: #b71c1c; color: #fff; }

  /* Avisos flotantes (reemplazan al toast anterior) */
  #mensajes-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 380px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
  }
  #mensajes-toast .toast-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    background: #e6f6e3;
    color: #14391a;
    font-size: .92rem;
    font-weight: 500;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
    animation: toastIn .25s ease;
  }
  #mensajes-toast .toast-item.error { background: #fdeceb; border-left-color: #b71c1c; color: #5c1210; }
  #mensajes-toast .toast-item .txt  { flex: 1; overflow-wrap: anywhere; }
  #mensajes-toast .toast-item .cerrar { cursor: pointer; opacity: .6; border: 0; background: transparent; font-size: 1rem; line-height: 1; padding: 0 2px; }
  #mensajes-toast .toast-item .cerrar:hover { opacity: 1; }
  #mensajes-toast .toast-item.saliendo { animation: toastOut .2s ease forwards; }
  @keyframes toastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
  @keyframes toastOut { to   { opacity: 0; transform: translateX(20px); } }

  @media (max-width: 575px) {
    .tienda-carrito .item { grid-template-columns: 70px 1fr; }
    .tienda-carrito .item-img { width: 70px; height: 86px; }
    .tienda-carrito .item-lado {
      grid-column: 1 / -1;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }
    #mensajes-toast { top: 80px; right: 12px; width: calc(100% - 24px); }
  }


/* ============================================================
   7) Estilos de veoempresacertificada.php
   ============================================================ */

  .ec-section { background: #f6f8fb; }

  /* Selector de área */
  .ec-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 30px; }
  .ec-tab {
    padding: 10px 20px; border-radius: 50px; border: 1px solid #d5dde8;
    background: #fff; color: #082032; font-weight: 600; font-size: 14px;
    text-decoration: none; transition: all .25s ease;
  }
  .ec-tab:hover { border-color: #24588d; color: #24588d; }
  .ec-tab.active { background: #24588d; border-color: #24588d; color: #fff; }

  /* Tarjetas */
  .ec-card {
    background: #fff; border-radius: 16px; padding: 24px;
    box-shadow: 0 6px 24px rgba(8,32,50,.07); margin-bottom: 24px;
  }

  /* Estadísticas */
  .ec-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
  .ec-stat { background: #fff; border-radius: 16px; padding: 20px; text-align: center; box-shadow: 0 6px 24px rgba(8,32,50,.07); }
  .ec-stat strong { display: block; font-size: 36px; line-height: 1.1; color: #24588d; }
  .ec-stat.ok strong { color: #1e9e5a; }
  .ec-stat.bad strong { color: #d64545; }
  .ec-stat span { font-size: 13px; color: #6b7a8c; }

  /* Controles */
  .ec-controls { display: flex; flex-wrap: wrap; gap: 12px; }
  .ec-search { position: relative; flex: 1 1 300px; }
  .ec-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #6b7a8c; }
  .ec-input, .ec-select {
    width: 100%; height: 48px; border: 1px solid #d5dde8; border-radius: 12px;
    padding: 0 16px; font-size: 15px; color: #082032; background: #fff; outline: none;
  }
  .ec-search .ec-input { padding-left: 42px; }
  .ec-input:focus, .ec-select:focus { border-color: #24588d; box-shadow: 0 0 0 3px rgba(36,88,141,.15); }
  .ec-select { flex: 0 1 220px; width: auto; }
  .ec-btn {
    height: 48px; padding: 0 22px; border: 0; border-radius: 12px; cursor: pointer;
    background: #24588d; color: #fff; font-weight: 600; transition: background .25s ease;
  }
  .ec-btn:hover { background: #082032; }
  .ec-btn.ghost { background: #eef2f7; color: #082032; }
  .ec-btn.ghost:hover { background: #dde5ef; }

  /* Tabla */
  .ec-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #e3e9f1; }
  .ec-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
  .ec-table th {
    background: #082032; color: #fff; text-align: left; padding: 14px 16px;
    white-space: nowrap; cursor: pointer; user-select: none; font-weight: 600;
  }
  .ec-table th:hover { background: #0d3350; }
  .ec-table th .ec-arrow { opacity: .5; margin-left: 6px; font-size: 11px; }
  .ec-table td { padding: 13px 16px; border-top: 1px solid #edf1f6; color: #2b3a4a; vertical-align: middle; }
  .ec-table tbody tr:nth-child(even) { background: #fafbfd; }
  .ec-table tbody tr:hover { background: #eef4fb; }
  .ec-nowrap { white-space: nowrap; }

  /* Estatus */
  .ec-badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; white-space: nowrap; }
  .ec-badge.ok { background: #e3f6ec; color: #1e9e5a; }
  .ec-badge.bad { background: #fde8e8; color: #d64545; }
  .ec-badge.warn { background: #fff3dc; color: #b9770e; }
  .ec-badge.neutral { background: #eaeef3; color: #5b6b7d; }

  /* Pie de tabla y paginación */
  .ec-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: 14px; color: #6b7a8c; }
  .ec-pager { display: flex; flex-wrap: wrap; gap: 6px; }
  .ec-page {
    min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid #d5dde8; border-radius: 10px;
    background: #fff; color: #082032; cursor: pointer; font-weight: 600;
  }
  .ec-page:hover:not(:disabled) { border-color: #24588d; color: #24588d; }
  .ec-page.active { background: #24588d; border-color: #24588d; color: #fff; }
  .ec-page:disabled { opacity: .4; cursor: not-allowed; }

  /* Estados */
  .ec-state { text-align: center; padding: 50px 20px; color: #6b7a8c; }
  .ec-state h3 { color: #082032; font-size: 20px; margin-bottom: 8px; }
  .ec-spinner {
    width: 38px; height: 38px; border: 4px solid #dde5ef; border-top-color: #24588d;
    border-radius: 50%; margin: 0 auto 16px; animation: ec-spin .8s linear infinite;
  }
  @keyframes ec-spin { to { transform: rotate(360deg); } }

  /* Selector cuando no hay área */
  .ec-choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
  .ec-choose a {
    display: block; padding: 28px 22px; background: #fff; border-radius: 16px; text-decoration: none;
    box-shadow: 0 6px 24px rgba(8,32,50,.07); color: #082032; font-weight: 700; text-align: center;
    border: 2px solid transparent; transition: all .25s ease;
  }
  .ec-choose a:hover { border-color: #24588d; transform: translateY(-4px); color: #24588d; }

  @media (max-width: 767px) {
    .ec-select, .ec-btn { flex: 1 1 100%; width: 100%; }
  }
  @media print {
    .ec-controls, .ec-tabs, .ec-pager, .header-area { display: none !important; }
  }

/* ============================================================
   8) Estilos de tienda.php
   ============================================================ */

  /* ---- Tarjetas de producto (reutilizan el diseño del blog) ---- */
  .tj-tienda-section .blog-item.style-2.tienda-item .blog-thumb {
    align-self: stretch;
    height: auto;
    min-height: 260px;
    overflow: hidden;
    background: #fff;
  }
  .tj-tienda-section .blog-item.style-2.tienda-item .blog-thumb a {
    display: block;
    width: 100%;
    height: 100%;
  }
  .tj-tienda-section .blog-item.style-2.tienda-item .blog-thumb img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: contain;      /* portadas de normas: se ven completas */
    padding: 10px;
  }
  .tj-tienda-section .blog-item.style-2.tienda-item .blog-content {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .tj-tienda-section .blog-item.style-2.tienda-item .title {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .tj-tienda-section .tienda-precio {
    display: block !important;
    -webkit-line-clamp: unset !important;
    color: #c0392b;
    font-weight: 700;
    font-size: 1.1rem;
  }
  .tj-tienda-section .tienda-estado {
    text-align: center;
    padding: 3rem 0;
  }

  /* Celular: tarjeta apilada, imagen arriba */
  @media (max-width: 767px) {
    .tj-tienda-section .blog-item.style-2.tienda-item .blog-thumb,
    .tj-tienda-section .blog-item.style-2.tienda-item .blog-thumb img {
      min-height: 0;
      height: 240px;
    }
  }

  /* ---- Buscador ---- */
  .tienda-buscador {
    max-width: 640px;
    margin: 1.5rem auto 0;
    display: flex;
    gap: .5rem;
  }
  .tienda-buscador .form-control { flex: 1; min-width: 0; }

  /* ============================================================
   9) Estilos de tiendafin.php
   ============================================================ */

  /* ================= Terminar pedido ================= */
  .tienda-fin .fin-card {
    background: #fff;
    border: 1px solid #e3eaf1;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
  }
  .tienda-fin .fin-card + .fin-card { margin-top: 24px; }
  .tienda-fin .fin-card > h4 { margin-bottom: 1.25rem; }

  .tienda-fin .form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
  .tienda-fin .form-label.req::after { content: " *"; color: #dc3545; }
  .tienda-fin .form-control,
  .tienda-fin .form-select {
    border-radius: 10px;
    border: 1px solid #c9d6e2;
    padding: .65rem .9rem;
  }
  .tienda-fin .form-control:focus,
  .tienda-fin .form-select:focus {
    border-color: #24588d;
    box-shadow: 0 0 0 .2rem rgba(36, 88, 141, .15);
  }
  .tienda-fin .form-control[readonly] { background: #f3f6f9; }
  .tienda-fin hr { margin: 1.5rem 0; opacity: .15; }

  .tienda-fin .aviso-previo {
    padding: 14px 18px;
    border-radius: 12px;
    background: #fff8e1;
    border-left: 4px solid #f0ad00;
    color: #5c4300;
    margin-bottom: 24px;
    font-size: .95rem;
  }

  /* Botones de acción */
  .tienda-fin .tj-primary-btn { width: 100%; justify-content: space-between; }
  .tienda-fin .tj-primary-btn[disabled] { opacity: .5; pointer-events: none; }
  .tienda-fin .nota-chica { display: block; text-align: center; margin-top: .6rem; font-size: .85rem; color: #6b7c8c; }

  /* Pago con Stripe */
  .tienda-fin #card-element {
    border: 1px solid #c9d6e2;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
  }
  .tienda-fin #card-element.StripeElement--focus   { border-color: #24588d; box-shadow: 0 0 0 .2rem rgba(36, 88, 141, .15); }
  .tienda-fin #card-element.StripeElement--invalid { border-color: #dc3545; }
  .tienda-fin #card-element.StripeElement--complete{ border-color: #198754; }
  .tienda-fin #card-errors { color: #dc3545; font-size: .88rem; margin-top: .5rem; display: none; }
  .tienda-fin .seguro-nota {
    display: flex; align-items: center; gap: .5rem;
    margin-top: 1.25rem; padding: 12px 16px;
    border: 1px dashed #c9d6e2; border-radius: 10px;
    font-size: .88rem; color: #44566a;
  }
  .tienda-fin .seguro-nota svg { width: 20px; height: 20px; color: #198754; flex-shrink: 0; }

  /* Avisos */
  .tienda-fin .aviso {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: 12px 16px; border-radius: 10px; border-left: 4px solid;
    font-size: .93rem; margin-top: 1rem;
    animation: avisoIn .25s ease;
  }
  .tienda-fin .aviso .txt { flex: 1; overflow-wrap: anywhere; }
  .tienda-fin .aviso .cerrar { border: 0; background: transparent; opacity: .6; cursor: pointer; font-size: 1rem; line-height: 1; }
  .tienda-fin .aviso .cerrar:hover { opacity: 1; }
  .tienda-fin .aviso-success { background: #e6f6e3; border-color: #2e7d32; color: #14391a; }
  .tienda-fin .aviso-error   { background: #fdeceb; border-color: #b71c1c; color: #5c1210; }
  .tienda-fin .aviso-warning { background: #fff8e1; border-color: #f0ad00; color: #5c4300; }
  .tienda-fin .aviso-info    { background: #e8f1fb; border-color: #24588d; color: #123456; }
  @keyframes avisoIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  /* Transición entre secciones */
  .tienda-fin .seccion { animation: seccionIn .4s ease; }
  @keyframes seccionIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

  /* Detalle del pedido */
  .tienda-fin .resumen-fila { display: flex; justify-content: space-between; padding: .55rem 0; }
  .tienda-fin .resumen-total { font-size: 1.3rem; font-weight: 800; color: #082032; border-top: 1px solid #e3eaf1; margin-top: .5rem; padding-top: .9rem; }
  .tienda-fin .resumen-items { list-style: none; padding: 0; margin: 0 0 1rem; }
  .tienda-fin .resumen-items li { display: flex; justify-content: space-between; gap: .75rem; padding: .4rem 0; font-size: .9rem; border-bottom: 1px dashed #e3eaf1; }
  .tienda-fin .resumen-items li span:first-child { overflow-wrap: anywhere; }

  /* Pasos */
  .tienda-fin .pasos { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 0; position: relative; }
  .tienda-fin .pasos::before {
    content: ""; position: absolute; top: 16px; left: 16%; right: 16%;
    height: 2px; background: #dbe5ee; z-index: 0;
  }
  .tienda-fin .pasos li { position: relative; z-index: 1; flex: 1; text-align: center; font-size: .82rem; color: #6b7c8c; }
  .tienda-fin .pasos li span {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin: 0 auto .4rem;
    border-radius: 50%; background: #fff; border: 2px solid #dbe5ee; font-weight: 700;
  }
  .tienda-fin .pasos li.activo { color: #082032; font-weight: 700; }
  .tienda-fin .pasos li.activo span { border-color: #24588d; background: #24588d; color: #fff; }
  .tienda-fin .pasos li.hecho span  { border-color: #198754; background: #198754; color: #fff; }

  .tienda-fin .instrucciones { padding-left: 1.2rem; margin: 0; font-size: .9rem; line-height: 1.7; }

  /* Éxito */
  .tienda-fin .exito { text-align: center; padding: 2rem 1rem; }
  .tienda-fin .exito .check {
    width: 84px; height: 84px; margin: 0 auto 1.25rem;
    border-radius: 50%; background: #e6f6e3; color: #2e7d32;
    display: flex; align-items: center; justify-content: center;
  }
  .tienda-fin .exito .check svg { width: 44px; height: 44px; }
  .tienda-fin .exito .botones { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.75rem; }
  .tienda-fin .exito .botones .tj-primary-btn { width: auto; }

  .contact-item .contact-icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}