/* ==========================================================
   JHOLISA TEXTIL - PRODUCTOS / CAMISAS
   CSS adaptado exactamente a las clases del index.php enviado.
   ========================================================== */

:root {
  --prod-yellow: #f5c400;
  --prod-yellow-dark: #d9a900;
  --prod-black: #111111;
  --prod-gray: #666666;
  --prod-border: #e6e6e6;
}

/* ==========================================================
   PÁGINA
   ========================================================== */

.productos-page {
  background: #ffffff;
  color: var(--prod-black);
}

.productos-page .container {
  max-width: 1320px;
}

/* ==========================================================
   LISTADO
   ========================================================== */

.productos-listado {
  padding: 70px 0 85px;
  background: #ffffff;
}

/* ==========================================================
   TÍTULO DEL CATÁLOGO
   ========================================================== */

.productos-titulo {
  margin-bottom: 42px;
}

.productos-titulo .productos-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--prod-yellow-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.productos-titulo h2 {
  margin: 0 0 12px;
  color: var(--prod-black);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 800;
}

.productos-titulo h2 span {
  color: var(--prod-yellow-dark);
}

.productos-titulo p {
  max-width: 700px;
  margin: 0;
  color: var(--prod-gray);
  font-size: 16px;
  line-height: 1.7;
}

/* ==========================================================
   TARJETA
   ========================================================== */

.producto-card {
  height: 100%;
  display: flex;
  flex-direction: column;

  background: #ffffff;
  border: 1px solid var(--prod-border);
  border-radius: 10px;
  overflow: hidden;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.producto-card:hover {
  transform: translateY(-6px);
  border-color: #d5d5d5;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

/* ==========================================================
   IMAGEN
   La imagen queda separada del marco mediante padding.
   ========================================================== */

.producto-card-imagen {
  height: 270px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 25px;

  background: #ffffff;
  border-bottom: 1px solid #eeeeee;

  overflow: hidden;
}

.producto-card-imagen img {
  width: 100%;
  height: 100%;
  display: block;

  object-fit: contain;

  transition: transform 0.35s ease;
}

.producto-card:hover .producto-card-imagen img {
  transform: scale(1.045);
}

/* ==========================================================
   CONTENIDO
   ========================================================== */

.producto-card-body {
  flex: 1;

  display: flex;
  flex-direction: column;

  padding: 24px 24px 22px;
}

.producto-card-categoria {
  display: block;
  margin-bottom: 7px;

  color: var(--prod-yellow-dark);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.producto-card-body h3 {
  margin: 0 0 11px;

  color: var(--prod-black);

  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.producto-card-body p {
  margin: 0 0 22px;

  color: #666666;

  font-size: 14px;
  line-height: 1.65;
}

/* ==========================================================
   BOTÓN DE CADA PRODUCTO
   ========================================================== */

.producto-card-btn {
  width: 100%;
  min-height: 46px;

  margin-top: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 0 18px;

  background: var(--prod-yellow);
  color: var(--prod-black);

  border: 2px solid var(--prod-yellow);
  border-radius: 6px;

  text-decoration: none;

  font-size: 13px;
  font-weight: 800;

  transition: all 0.2s ease;
}

.producto-card-btn .fa-whatsapp {
  font-size: 18px;
}

.producto-card-btn .fa-arrow-right {
  font-size: 11px;
  margin-left: 3px;
}

.producto-card-btn:hover {
  background: var(--prod-black);
  border-color: var(--prod-black);
  color: #ffffff;

  transform: translateY(-1px);
}

/* ==========================================================
   PAGINACIÓN
   ========================================================== */

.productos-paginacion {
  margin-top: 55px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.pagina-numeros {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pagina-numeros a {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;
  color: #333333;

  border: 1px solid #dddddd;
  border-radius: 5px;

  text-decoration: none;

  font-size: 13px;
  font-weight: 700;

  transition: all 0.2s ease;
}

.pagina-numeros a:hover,
.pagina-numeros a.activo {
  background: var(--prod-yellow);
  border-color: var(--prod-yellow);
  color: var(--prod-black);
}

.pagina-btn {
  min-height: 40px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 0 16px;

  background: #ffffff;
  color: #333333;

  border: 1px solid #dddddd;
  border-radius: 5px;

  text-decoration: none;

  font-size: 13px;
  font-weight: 700;

  transition: all 0.2s ease;
}

.pagina-btn:hover {
  background: var(--prod-yellow);
  border-color: var(--prod-yellow);
  color: var(--prod-black);
}

/* ==========================================================
   BLOQUE DESTACADO
   ========================================================== */

.productos-destacado {
  padding: 0 0 35px;
  background: #ffffff;
}

.productos-destacado-box {
  display: flex;
  align-items: center;
  gap: 22px;

  padding: 30px 35px;

  background: #f7f7f7;

  border: 1px solid #e8e8e8;
  border-left: 5px solid var(--prod-yellow);
  border-radius: 10px;
}

.productos-destacado-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--prod-yellow);
  color: var(--prod-black);

  border-radius: 8px;
}

.productos-destacado-icon i {
  font-size: 23px;
}

.productos-destacado-box span {
  display: block;
  margin-bottom: 5px;

  color: var(--prod-yellow-dark);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.productos-destacado-box h2 {
  margin: 0;

  color: var(--prod-black);

  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 800;
}

/* ==========================================================
   CTA FINAL
   Zona principal de llamada a la acción.
   ========================================================== */

.productos-cta {
  padding: 35px 0 90px;
  background: #ffffff;
}

.productos-cta-contenido {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 45px;

  padding: 48px 55px;

  background: linear-gradient(135deg, #171717 0%, #252525 100%);

  border-radius: 14px;
  overflow: hidden;

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

/* Franja amarilla lateral */

.productos-cta-contenido::before {
  content: "";

  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;

  width: 7px;

  background: var(--prod-yellow);
}

/* Círculo decorativo */

.productos-cta-contenido::after {
  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  right: -110px;
  bottom: -150px;

  background: rgba(245, 196, 0, 0.1);

  border-radius: 50%;
}

.productos-cta-contenido > div {
  position: relative;
  z-index: 2;
}

.productos-cta-contenido span {
  display: block;
  margin-bottom: 9px;

  color: var(--prod-yellow);

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.productos-cta-contenido h2 {
  margin: 0;

  color: #ffffff;

  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
}

/* ==========================================================
   BOTÓN CTA
   ========================================================== */

.productos-cta-btn {
  position: relative;
  z-index: 3;

  flex-shrink: 0;

  min-height: 54px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 0 27px;

  background: var(--prod-yellow);
  color: var(--prod-black);

  border: 2px solid var(--prod-yellow);
  border-radius: 6px;

  text-decoration: none;

  font-size: 14px;
  font-weight: 800;

  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);

  transition: all 0.2s ease;
}

.productos-cta-btn i {
  font-size: 20px;
}

.productos-cta-btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--prod-black);

  transform: translateY(-3px);

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 991.98px) {
  .productos-listado {
    padding: 60px 0 70px;
  }

  .producto-card-imagen {
    height: 250px;
    padding: 22px;
  }

  .productos-cta-contenido {
    padding: 42px;
    gap: 30px;
  }
}

/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 767.98px) {
  .productos-listado {
    padding: 50px 0 60px;
  }

  .productos-titulo {
    margin-bottom: 32px;
  }

  .productos-titulo h2 {
    font-size: 31px;
  }

  .productos-titulo p {
    font-size: 14px;
  }

  .producto-card-imagen {
    height: 280px;
    padding: 25px;
  }

  .producto-card-body {
    padding: 22px 20px 20px;
  }

  .producto-card-body h3 {
    font-size: 20px;
  }

  .productos-paginacion {
    gap: 8px;
  }

  .productos-destacado-box {
    padding: 25px;
  }

  .productos-destacado-box h2 {
    font-size: 25px;
  }

  .productos-cta {
    padding: 25px 0 60px;
  }

  .productos-cta-contenido {
    flex-direction: column;
    align-items: stretch;

    padding: 38px 30px;

    gap: 28px;
  }

  .productos-cta-contenido h2 {
    font-size: 27px;
  }

  .productos-cta-btn {
    width: 100%;
  }
}

/* ==========================================================
   MÓVIL PEQUEÑO
   ========================================================== */

@media (max-width: 480px) {
  .productos-titulo h2 {
    font-size: 28px;
  }

  .producto-card-imagen {
    height: 250px;
  }

  .productos-destacado-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .productos-cta-contenido {
    padding: 32px 25px;
  }

  .productos-cta-contenido h2 {
    font-size: 24px;
  }

  .pagina-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .pagina-btn i {
    font-size: 12px;
  }
}

/* ==========================================================
   POPUP DE IMAGEN DEL PRODUCTO
   ========================================================== */

.producto-card-imagen {
  cursor: pointer;
}

/* Fondo del popup */
.producto-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 30px;
}

/* Popup visible */
.producto-popup.activo {
  display: flex;
}

/* Imagen ampliada */
.producto-popup img {
  max-width: 90%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Botón X */
.producto-popup-cerrar {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 45px;
  height: 45px;
  border: none;
  background: #f5c400;
  color: #111;
  border-radius: 50%;
  font-size: 28px;
  font-weight: bold;
  line-height: 45px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.producto-popup-cerrar:hover {
  transform: scale(1.08);
  background: #ffffff;
}

/* Móvil */
@media (max-width: 768px) {
  .producto-popup {
    padding: 15px;
  }

  .producto-popup img {
    max-width: 95%;
    max-height: 80vh;
  }

  .producto-popup-cerrar {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 24px;
  }
}

/* ==================================================
   PAGINACIÓN DE PRODUCTOS
   ================================================== */

.paginacion-productos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 45px 0 20px;
}

.paginacion-productos .btn {
  min-width: 45px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 5px;
  text-decoration: none;
}

.paginacion-productos .btn:hover {
  transform: translateY(-2px);
}

/* ==========================================================
   MODAL DE DETALLE DEL PRODUCTO
   ========================================================== */

.producto-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  overflow-y: auto;
}

.producto-modal.activo {
  display: flex;
}

.producto-modal-contenido {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  padding: 32px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.producto-modal-cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--prod-yellow, #f5c400);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.producto-modal-cerrar:hover {
  background: #111;
  color: #fff;
  transform: rotate(90deg);
}

.producto-modal-imagen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 18px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
}

.producto-modal-imagen img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.producto-modal-info {
  align-self: center;
  padding: 12px 8px;
}

.producto-modal-categoria {
  display: block;
  margin: 0 0 10px;
  color: var(--prod-yellow-dark, #d9a900);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.producto-modal-info h2 {
  margin: 0 0 16px;
  color: var(--prod-black, #111);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 800;
}

.producto-modal-info p {
  margin: 0 0 24px;
  color: #666;
  font-size: 15px;
  line-height: 1.75;
}

.producto-modal-cotizar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--prod-yellow, #f5c400);
  border-radius: 6px;
  background: var(--prod-yellow, #f5c400);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
}

.producto-modal-cotizar:hover {
  border-color: #111;
  background: #111;
  color: #fff;
}

body.producto-modal-abierto {
  overflow: hidden;
}

@media (max-width: 700px) {
  .producto-modal {
    align-items: flex-start;
    padding: 14px;
  }

  .producto-modal-contenido {
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: calc(100vh - 28px);
    padding: 54px 20px 22px;
  }

  .producto-modal-imagen {
    min-height: 220px;
    padding: 12px;
  }

  .producto-modal-imagen img {
    max-height: 300px;
  }

  .producto-modal-info {
    padding: 0;
  }

  .producto-modal-info h2 {
    font-size: 25px;
  }

  .producto-modal-info p {
    font-size: 14px;
  }

  .producto-modal-cotizar {
    width: 100%;
  }
}

/* ==========================================================
   CORRECCIÓN DEFINITIVA: POPUPS FLOTANTES SOBRE TODA LA WEB
   Compatible con .producto-popup y .producto-modal
   ========================================================== */

html.producto-popup-abierto,
body.producto-popup-abierto,
body.producto-modal-abierto {
  overflow: hidden !important;
}

#productoPopup,
.producto-popup,
#productoModal,
.producto-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  z-index: 2147483647 !important;
  background: rgba(0, 0, 0, 0.84) !important;
  overflow-y: auto !important;
  align-items: center !important;
  justify-content: center !important;
}

#productoPopup:not(.activo),
.producto-popup:not(.activo),
#productoModal:not(.activo),
.producto-modal:not(.activo) {
  display: none !important;
}

#productoPopup.activo,
.producto-popup.activo,
#productoModal.activo,
.producto-modal.activo {
  display: flex !important;
}

#productoPopup .producto-popup-contenido,
.producto-popup .producto-popup-contenido,
#productoModal .producto-modal-contenido,
.producto-modal .producto-modal-contenido {
  position: relative !important;
  flex: 0 1 900px !important;
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  max-height: calc(100dvh - 48px) !important;
  margin: auto !important;
  overflow-y: auto !important;
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4) !important;
}

#productoPopup .producto-popup-cerrar,
.producto-popup .producto-popup-cerrar,
#productoModal .producto-modal-cerrar,
.producto-modal .producto-modal-cerrar {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 10 !important;
}

@media (max-width: 700px) {
  #productoPopup,
  .producto-popup,
  #productoModal,
  .producto-modal {
    padding: 12px !important;
  }

  #productoPopup .producto-popup-contenido,
  .producto-popup .producto-popup-contenido,
  #productoModal .producto-modal-contenido,
  .producto-modal .producto-modal-contenido {
    max-height: calc(100dvh - 24px) !important;
  }
}
