/**
 * File: producto.css
 * Path: wp-content/plugins/mjordan/assets/css/producto.css
 *
 * Estilos del single de producto ([mjordan_producto_single])
 * + badge-stack compartido con [mjordan_destacados].
 * Paleta Maquinarias Jordan.
 */

/* ============================================================
   Badges apilados (condición) — compartido single + destacados
   ============================================================ */
   
   
/* Contenedor centrado (mismo criterio que la portada) */
.jm-single .jm-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.jm-badge-stack {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.jm-badge-stack .jm-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.jm-badge.is-nuevo { background: #3E9A54; }
.jm-badge.is-usado { background: #7A1619; }

/* ============================================================
   Single de producto
   ============================================================ */
.jm-single {
  padding: 36px 0 64px;
  background: #F7F8F8;
  font-family: "Barlow", sans-serif;
  color: #3a322e;
}

/* migas */
.jm-single-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #7a6f66;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.jm-single-crumbs a {
  color: #7A1619;
  text-decoration: none;
}
.jm-single-crumbs a:hover { text-decoration: underline; }
.jm-single-crumbs .cur { color: #221A18; font-weight: 600; }

/* top: galería + datos */
.jm-single-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* --- galería --- */
.jm-single-gal { min-width: 0; }
.jm-gal-main {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #EDE5D7;
  box-shadow: 0 12px 30px rgba(34,26,24,.10);
  aspect-ratio: 4 / 3;
}
.jm-gal-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jm-gal-main--empty {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, #EDE5D7 0 14px, #e6dcca 14px 28px);
}
.jm-gal-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.jm-gal-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  background: #EDE5D7;
  aspect-ratio: 1 / 1;
  transition: border-color .15s ease;
}
.jm-gal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jm-gal-thumb.is-active { border-color: #D99A16; }
.jm-gal-thumb:hover { border-color: #7A1619; }

/* --- datos --- */
.jm-single-info { min-width: 0; }
.jm-single-cat {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  font-size: 15px;
  color: #3E9A54;
  margin-bottom: 8px;
}
.jm-single-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  color: #221A18;
  margin: 0 0 16px;
}
.jm-single-estado {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.jm-estado-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  background: #EDE5D7;
  color: #221A18;
}
.jm-estado--disponible { background: #e2f0e5; color: #2C6F3D; }
.jm-estado--vendido    { background: #f0dede; color: #7A1619; }
.jm-estado--reservado  { background: #faedd3; color: #9a6d0f; }

.jm-single-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #EDE5D7;
  border-radius: 12px;
  margin-bottom: 22px;
}
.jm-single-price .lbl {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7a6f66;
}
.jm-single-price .val {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #7A1619;
  line-height: 1.1;
}

.jm-single-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.jm-btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  background: #2C6F3D;
  color: #fff;
  text-decoration: none;
  border-radius: 11px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .02em;
  transition: background .15s ease, transform .15s ease;
}
.jm-btn-wa:hover { background: #24592f; transform: translateY(-1px); }
.jm-btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  background: transparent;
  color: #221A18;
  text-decoration: none;
  border: 1.5px solid #d9cdb9;
  border-radius: 11px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.jm-btn-back:hover { border-color: #7A1619; background: #fff; }

/* bajada corta */
.jm-single-excerpt {
  font-size: 17px;
  line-height: 1.6;
  color: #5a5049;
  margin: 0 0 20px;
  max-width: 52ch;
}

/* botón de folleto */
.jm-btn-folleto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  background: #fff;
  color: #7A1619;
  text-decoration: none;
  border: 1.5px solid #7A1619;
  border-radius: 11px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: background .15s ease, color .15s ease;
}
.jm-btn-folleto:hover { background: #7A1619; color: #fff; }
.jm-btn-folleto .peso {
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 13px;
  opacity: .75;
}

/* --- bloques inferiores (ficha / videos) --- */
.jm-single-block {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid #e3d9c7;
}
.jm-single-h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  color: #221A18;
  margin: 0 0 18px;
}
.jm-single-ficha {
  font-size: 16px;
  line-height: 1.7;
  color: #3a322e;
  max-width: 820px;
}
.jm-single-ficha p { margin: 0 0 14px; }
.jm-single-ficha table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
}
.jm-single-ficha th,
.jm-single-ficha td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e3d9c7;
}
.jm-single-ficha th { background: #EDE5D7; font-weight: 600; }
.jm-single-ficha ul,
.jm-single-ficha ol { margin: 0 0 14px; padding-left: 20px; }
.jm-single-ficha li { margin-bottom: 6px; }

/* --- videos --- */
.jm-single-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.jm-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #221A18;
  box-shadow: 0 8px 22px rgba(34,26,24,.12);
}
.jm-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .jm-single-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .jm-gal-thumbs { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 560px) {
  .jm-single { padding: 24px 0 48px; }
  .jm-gal-thumbs { grid-template-columns: repeat(4, 1fr); }
  .jm-single-block { margin-top: 36px; padding-top: 30px; }
}


.jm-badge-stack {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.jm-badge-stack .jm-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  background: #3E9A54; /* fallback: verde por defecto */
}
.jm-badge-stack .jm-badge.is-nuevo { background: #3E9A54; }
.jm-badge-stack .jm-badge.is-usado { background: #7A1619; }

/* Badges apilados (condición) — para destacados con Nuevo + Usado */
.jm-prod-media .jm-badge-stack{
  position:absolute; top:12px; left:12px; z-index:2;
  display:flex; flex-direction:column; gap:6px;
}
.jm-prod-media .jm-badge-stack .jm-badge{
  position:static; /* anula el posicionamiento del badge suelto original */
  display:inline-block; width:auto;
}