/**
 * WooCommerce CSS
 * Estilos optimizados para WooCommerce
 * 
 * @package RepararPC_Lite
 * @version 1.2.0
 */

/* =============================================================================
   PRODUCTOS - GRID
   ============================================================================= */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.woocommerce ul.products li.product {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product:hover {
    border-color: #8b5cf6;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
    transform: translateY(-5px);
}

/* Imagen del producto */
.woocommerce ul.products li.product img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
}

/* Título del producto */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 15px 15px 10px 15px;
    line-height: 1.3;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
    color: #8b5cf6;
}

/* Precio */
.woocommerce ul.products li.product .price {
    font-size: 22px;
    font-weight: 700;
    color: #8b5cf6;
    margin: 0 15px 15px 15px;
}

.woocommerce ul.products li.product .price del {
    opacity: 0.5;
    font-size: 16px;
}

/* Botón añadir al carrito */
.woocommerce ul.products li.product .button {
    display: block;
    margin: 0 15px 15px 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #8b5cf6, #6b46c1);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.woocommerce ul.products li.product .button:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    transform: scale(1.02);
}

/* Badges */
.woocommerce span.onsale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

/* =============================================================================
   PRODUCTO INDIVIDUAL
   ============================================================================= */

.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

/* Galería */
.woocommerce div.product div.images {
    position: relative;
}

.woocommerce div.product div.images img {
    border-radius: 12px;
}

/* Resumen del producto */
.woocommerce div.product div.summary {
    padding: 20px;
}

.woocommerce div.product .product_title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1f2937;
}

.woocommerce div.product p.price {
    font-size: 32px;
    font-weight: 700;
    color: #8b5cf6;
    margin: 0 0 20px 0;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 25px;
}

/* Botón añadir al carrito */
.woocommerce div.product form.cart .button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #8b5cf6, #6b46c1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce div.product form.cart .button:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    transform: scale(1.05);
}

/* Cantidad */
.woocommerce div.product form.cart div.quantity {
    margin-right: 15px;
}

.woocommerce div.product form.cart div.quantity input.qty {
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    width: 80px;
    text-align: center;
    font-size: 16px;
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs {
    margin-top: 50px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.woocommerce div.product .woocommerce-tabs .panel {
    padding: 20px 0;
}

/* =============================================================================
   MODO CATÁLOGO
   ============================================================================= */

.catalog-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.catalog-whatsapp {
    background: #25d366 !important;
}

.catalog-whatsapp:hover {
    background: #20b858 !important;
}

.catalog-contact {
    background: #8b5cf6 !important;
}

.product-contact-info {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}

.product-contact-info p {
    margin: 5px 0;
    font-size: 14px;
}

.product-contact-info a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

.product-contact-info a:hover {
    text-decoration: underline;
}

/* =============================================================================
   CARRITO Y CHECKOUT
   ============================================================================= */

.woocommerce table.shop_table {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.woocommerce table.shop_table th {
    background: #f9fafb;
    padding: 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.woocommerce table.shop_table td {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 25px;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    margin-top: 0;
}

.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout .button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8b5cf6, #6b46c1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
}

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

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
    
    .woocommerce div.product {
        grid-template-columns: 1fr;
    }
    
    .woocommerce div.product .product_title {
        font-size: 24px;
    }
    
    .catalog-buttons {
        flex-direction: column;
    }
}

/* =============================================================================
   MENSAJES Y NOTIFICACIONES
   ============================================================================= */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.woocommerce-message {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.woocommerce-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.woocommerce-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}
