/* ===============================
   JMARKETPLACE CSS FINAL
================================ */

/* ---- RESET ANTI-ESPACIOS ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- GRID RESPONSIVE ---- */
.jm-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* ---- TARJETA ---- */
.jm-card {
    width: 220px;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.jm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ---- IMAGEN ---- */
.jm-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* ---- CONTENIDO ---- */
.jm-card > div {
    padding: 10px !important;
    box-sizing: border-box;
}

/* ---- TEXTO COMPACTO SIN ESPACIOS ---- */
.jm-card > div * {
    display: block;
    font-size: 13px;
    line-height: 1.1;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---- MICRO ESPACIADO ENTRE LÍNEAS ---- */
.jm-card > div * + * {
    margin-top: 2px !important;
}

/* ---- TÍTULO ---- */
.jm-card strong {
    font-size: 14px;
    font-weight: 600;
    color: #1f2d3d;
}

/* ---- PRECIO ---- */
.jm-price {
    font-weight: 700;
    color: #2c3e50;
}

/* ---- BOTONES ---- */
.jm-card button {
    font-size: 13px;
    padding: 6px;
    border-radius: 6px;
    border: 0;
    cursor: pointer;
    margin-top: 6px;
    width: 100%;
}

.jm-card button:nth-of-type(1) {
    background: #000;
    color: #fff;
}

.jm-card button:nth-of-type(2) {
    background: #d63638;
    color: #fff;
}

/* ---- POPUP CARRUSEL ---- */
.jm-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.jm-popup img {
    max-width: 90%;
    max-height: 80%;
    display: block;
}

.jm-popup .jm-prev,
.jm-popup .jm-next,
.jm-popup .jm-close {
    position: absolute;
    color: white;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
}

.jm-popup .jm-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.jm-popup .jm-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.jm-popup .jm-close {
    top: 10px;
    right: 20px;
    font-size: 40px;
}

/* ---- RESPONSIVE MÓVIL ---- */
@media (max-width: 480px){
    .jm-card {
        width: 46%;
    }
}

@media (max-width: 360px){
    .jm-card {
        width: 100%;
    }
}
