/*
 Theme Name: Astra Child
 Theme URI: https://tu-tienda-online.com
 Description: Tema hijo para la tienda con Astra.
 Author: Tu Nombre
 Author URI: https://tu-web.com
 Template: astra
 Version: 1.0.0
 Text Domain: astra-child
*/








/* ============================
   TARJETAS DE PRODUCTOS
   ============================ */
.custom-product-card {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-card-wrapper {
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    text-align: center;
    transition: none !important;
}

.product-card-wrapper:hover {
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* ============================
   IMAGEN Y BADGE
   ============================ */
.product-image {
    position: relative;
    margin-bottom: 12px;
    text-align: center;
}

.wapl-label {
    position: absolute !important;
    top: -10px;
    right: -10px;
    z-index: 20;
    background: #ff5252;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    height: 35px;
    border-radius: 3px;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ============================
   INFO y PUNTUACIÓN
   ============================ */
.product-info {
    flex-grow: 1;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
    height: 40px;
    overflow: hidden;
    white-space: normal;
}

.product-title a {
    text-decoration: none;
    color: #222;
}

/* Rating */
.product-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: #555;
}

.product-rating .rating-number {
    margin-left: 5px;
    font-weight: bold;
}

.product-price {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: #111;
}

/* ============================
   BOTONES DE ACCIÓN
   ============================ */
.product-actions {
    margin-top: 10px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-4px);
}

/* Estilo para los dos botones en general */
.product-actions a,
.product-actions button {
    display: block;
    width: 90%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #ffffff;
    color: #333 !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.3s;
    text-align: center;
}

/* Regla ultra-específica para el segundo botón */
.product-actions a+a {
    margin-top: -15px !important;
}

/* Reglas de hover para los botones */
.product-actions a:hover,
.product-actions button:hover {
    background: #eee;
}

/* ============================
   GRID DE PRODUCTOS
   ============================ */
ul.products li.product {
    margin: 10px !important;
    width: calc(25% - 20px);
}

@media (max-width: 1024px) {
    ul.products li.product {
        width: calc(33.33% - 20px);
    }
}

@media (max-width: 768px) {
    ul.products li.product {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    ul.products li.product {
        width: 100%;
    }
}

/* ============================
   MODAL MAPA (CORREGIDO)
   ============================ */
#mapModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

#mapModal .map-content {
    position: relative;
    width: 80%;
    max-width: 800px;
    background: #fff;
    padding: 30px;
    /* Aumentado el padding para asegurar espacio para la X */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#mapModal #map {
    width: 100%;
    /* El mapa sigue ocupando el 100% del espacio disponible */
    height: 400px;
    border-radius: 10px;
}

#mapModal .close {
    position: absolute;
    top: 10px;
    /* Ajuste de la posición superior */
    right: 10px;
    /* Ajuste de la posición derecha */
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10000;
    background: #f1f1f1;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#mapModal .close:hover {
    color: black;
}


















#mapModal {
    display: none;
}

#mapModal[style*="display: block"] {
    display: flex !important;
}