/**
 * Grilla de Productos - ULTRA FORZADO
 * CON !important para sobrescribir Elementor
 */

/* ===== CONTENEDOR ===== */
.pgw-wrapper {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 20px 15px !important;
}

/* ===== GRID - FORZADO A UNA SOLA COLUMNA ===== */
.pgw-grid {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pgw-grid > * {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ===== TARJETA ===== */
.pgw-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e8edf3 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 16px !important;
    display: block !important;
    float: none !important;
    clear: both !important;
}

.pgw-card:last-child {
    margin-bottom: 0 !important;
}

/* ===== INTERIOR: IMAGEN IZQUIERDA + INFO DERECHA ===== */
.pgw-card-inner {
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 120px !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

/* ===== COLUMNA IZQUIERDA: IMAGEN ===== */
.pgw-card-image {
    flex: 0 0 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 8px 12px 14px !important;
    background: #f8fafc !important;
    border-radius: 16px 0 0 16px !important;
    min-height: 120px !important;
    width: 120px !important;
    max-width: 120px !important;
}

.pgw-card-image img {
    max-height: 95px !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 10px !important;
    background: #f0f2f5 !important;
    padding: 4px !important;
}

/* ===== COLUMNA DERECHA: INFO ===== */
.pgw-card-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px 12px 16px !important;
    gap: 4px !important;
    justify-content: center !important;
    min-width: 0 !important;
}

/* ===== TÍTULO ===== */
.pgw-product-title {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    color: #1a2634 !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
}

/* ===== ATRIBUTOS EN 2 COLUMNAS ===== */
.pgw-attributes {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3px 20px !important;
    font-size: 0.82rem !important;
    color: #2c3e4f !important;
}

.pgw-attr-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.pgw-attr-item i {
    width: 16px !important;
    font-size: 0.8rem !important;
    color: #1a2634 !important;
    flex-shrink: 0 !important;
    text-align: center !important;
}

.pgw-attr-item .pgw-bullet {
    display: inline-block !important;
    width: 5px !important;
    height: 5px !important;
    background: #1a2634 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.pgw-attr-item span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ===== BOTÓN "VER MÁS" ===== */
.pgw-card-action {
    display: flex !important;
    justify-content: flex-end !important;
    padding-top: 6px !important;
    border-top: 1px solid #eef2f7 !important;
    margin-top: 4px !important;
}

.pgw-btn-ver-mas {
    background: transparent !important;
    border: none !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #1a2634 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: inherit !important;
    padding: 4px 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.pgw-btn-ver-mas:hover {
    color: #2c3e50 !important;
}

.pgw-btn-ver-mas:hover i {
    transform: translateX(3px) !important;
}

.pgw-btn-ver-mas i {
    font-size: 0.7rem !important;
    transition: 0.2s !important;
}

/* ============================================ */
/* ===== MODAL 2 COLUMNAS ===== */
/* ============================================ */

.pgw-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(4px) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 20px !important;
}

.pgw-modal-overlay.active {
    display: flex !important;
}

.pgw-modal-container {
    background: #fff !important;
    max-width: 820px !important;
    width: 100% !important;
    border-radius: 28px !important;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    overflow: hidden !important;
    position: relative !important;
    max-height: 90vh !important;
}

/* ===== GALERÍA ===== */
.pgw-modal-gallery {
    padding: 24px 16px 24px 24px !important;
    background: #f8fafc !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.pgw-modal-main-image {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    background: #eef1f5 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.pgw-modal-main-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.pgw-modal-thumbnails {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.pgw-modal-thumb {
    width: 60px !important;
    height: 55px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    flex-shrink: 0 !important;
}

.pgw-modal-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.pgw-modal-thumb.active {
    border-color: #1a2634 !important;
}

/* ===== INFO ===== */
.pgw-modal-body {
    padding: 28px 28px 28px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.pgw-modal-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #141f2b !important;
    margin: 0 0 16px 0 !important;
}

.pgw-modal-attrs {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    font-size: 0.9rem !important;
    color: #1e2a3a !important;
    margin-bottom: 20px !important;
}

.pgw-modal-attr {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid #f0f2f5 !important;
}

.pgw-modal-attr:last-child {
    border-bottom: none !important;
}

.pgw-modal-attr i {
    width: 20px !important;
    font-size: 1rem !important;
    color: #1a2634 !important;
    text-align: center !important;
}

.pgw-modal-attr .pgw-bullet {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    background: #1a2634 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

/* ===== BOTÓN WHATSAPP ===== */
.pgw-modal-btn-whatsapp {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: #25D366 !important;
    color: #fff !important;
    padding: 12px 24px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    width: 100% !important;
    border: none !important;
    cursor: pointer !important;
}

.pgw-modal-btn-whatsapp:hover {
    background: #1da851 !important;
    color: #fff !important;
}

/* ===== BOTÓN CERRAR ===== */
.pgw-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    background: rgba(255,255,255,0.9) !important;
    border: none !important;
    font-size: 1.2rem !important;
    color: #6b7b8c !important;
    cursor: pointer !important;
    padding: 6px 12px !important;
    border-radius: 30px !important;
    z-index: 10 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.pgw-modal-close:hover {
    background: #fff !important;
    color: #1a2634 !important;
}

/* ============================================ */
/* ===== RESPONSIVE ===== */
/* ============================================ */

@media (max-width: 640px) {
    .pgw-card-inner {
        flex-direction: column !important;
        min-height: auto !important;
        padding: 0 !important;
    }
    
    .pgw-card-image {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px 14px 6px 14px !important;
        border-radius: 16px 16px 0 0 !important;
        background: #f8fafc !important;
        min-height: auto !important;
    }
    
    .pgw-card-image img {
        max-height: 120px !important;
        width: auto !important;
        margin: 0 auto !important;
    }
    
    .pgw-card-info {
        padding: 10px 14px 12px 14px !important;
        gap: 4px !important;
    }
    
    .pgw-product-title {
        font-size: 0.95rem !important;
    }
    
    .pgw-attributes {
        font-size: 0.75rem !important;
        gap: 3px 12px !important;
    }
    
    .pgw-modal-container {
        grid-template-columns: 1fr !important;
        max-width: 500px !important;
    }
    
    .pgw-modal-gallery {
        border-radius: 24px 24px 0 0 !important;
        padding: 20px !important;
    }
    
    .pgw-modal-body {
        padding: 20px 24px 24px !important;
    }
    
    .pgw-modal-main-image {
        aspect-ratio: 16/9 !important;
    }
    
    .pgw-modal-thumb {
        width: 50px !important;
        height: 45px !important;
    }
}

@media (max-width: 420px) {
    .pgw-card-image img {
        max-height: 100px !important;
    }
    
    .pgw-product-title {
        font-size: 0.85rem !important;
    }
    
    .pgw-attributes {
        font-size: 0.7rem !important;
        gap: 2px 8px !important;
    }
}