/*
Theme Name: Mi Tienda 
Author: Miguel Angel
Description: eCommerce desarrollado con código puro para WooCommerce.
Version: 1.0
*/

/* Reset básico */
body { font-family: sans-serif; margin: 0; color: #333; }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.sitio-header { background: #222; color: #fff; padding: 20px 0; }
.sitio-header .contenedor { display: flex; justify-content: space-between; align-items: center; }
.logo { color: #fff; text-decoration: none; font-size: 1.5rem; font-weight: bold; }

/* Grid de Productos */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.producto-card {
    text-align: center;
    border: 1px solid #eee;
    padding: 20px;
    transition: 0.3s;
}

.producto-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.producto-card img { max-width: 100%; height: auto; margin-bottom: 15px; }
.producto-card h3 { font-size: 1.1rem; margin: 10px 0; }
.precio { display: block; font-weight: bold; color: #e67e22; margin-bottom: 15px; }

/* Botón de WooCommerce */
.add_to_cart_button {
    background: #27ae60;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}






.producto-unico-contenedor {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
}

.producto-layout-custom {
    display: flex;
    gap: 50px;
    flex-wrap: wrap; /* Para que sea responsivo en móviles */
}

.producto-galeria {
    flex: 1;
    min-width: 300px;
}

.producto-info {
    flex: 1;
    min-width: 300px;
}

.producto-info h1 { font-size: 2.5rem; margin-top: 0; }
.precio-premium { font-size: 2rem; color: #27ae60; margin: 20px 0; font-weight: bold; }
.descripcion-corta { line-height: 1.6; color: #666; margin-bottom: 30px; }

/* Estilo para el botón de compra */
.cart .single_add_to_cart_button {
    background: #333;
    color: #fff;
    padding: 15px 40px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
}

.cart .single_add_to_cart_button:hover { background: #e67e22; }

/* --- CORRECCIÓN SENIOR: Selectores Genéricos --- */

/* Atacamos el contenedor inmediato que genera WooCommerce */
.productos-relacionados-custom .products, 
.productos-relacionados-custom .related.products {
    display: grid;
    /* Grid responsivo automático */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
    padding: 0; /* Quitamos padding por si acaso es una lista */
}

/* Atacamos cada tarjeta de producto individual */
.productos-relacionados-custom .product,
.productos-relacionados-custom .type-product {
    list-style: none; /* Por si WooCommerce decidió usar li */
    border: 1px solid #eee;
    padding: 20px;
    text-align: center;
    box-sizing: border-box; /* Asegura que el padding no rompa el grid */
}

/* Asegurar que las imágenes no rompan el layout */
.productos-relacionados-custom .product img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Botones y textos */
.productos-relacionados-custom h2.woocommerce-loop-product__title {
    font-size: 1rem;
    min-height: 2.5em; /* Alinea los títulos si tienen diferente largo */
}

.productos-relacionados-custom .price {
    display: block;
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 10px;
}