.producto {
    display: flex;
    width: var(--tamano-contenedores);
    justify-self: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}
.producto .imagen {
    width: 40%;
    height: auto;
}
.woocommerce-product-gallery {
    position: sticky !important;
    top: 130px;
}
.wp-post-image{
    width: 100%;
    height: auto;
    border-radius: 10px;
}
.woocommerce-product-gallery__image a img {
    border-radius: 10px;
}
.summary {
    display: grid;
    grid-template-columns: 1fr 220px;
    width: 60%;
    gap: 10px;
}
.woocommerce-product-gallery__wrapper, .summary .sumary-primary, .summary .anadir-carrito {
    position: sticky;  
    top: 130px;
}
.woocommerce-product-details__description {
    font-size: 14px;
    color: var(--color--text_secondary);
}
.summary .sumary-primary, .summary .anadir-carrito {
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    height: fit-content;
}
.summary .anadir-carrito {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.summary h1 {
    font-size: 1rem;
    font-weight: 500;
}
/* Estilos para el precio en página individual */
.price-wrapper-single {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 5px;
    align-items: center;
}

.price-wrapper-single del {
    color: var(--color--text_secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    break-after: always;
}
.price-wrapper-single del .precio-miles, 
.price-wrapper-single del .precio-cientos,
.price-wrapper-single del .precio-decimal {
    font-size: 0.8rem !important;
}

.price-wrapper-single ins {
    text-decoration: none;
    color: black;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.price-wrapper-single .precio-miles {
    font-size: 2rem;
}

.price-wrapper-single .precio-cientos {
    font-size: 1.5rem;
}

.price-wrapper-single .precio-decimal {
    font-size: 1rem;
    color: var(--color--text_secondary);
}

.price-wrapper-single .ahorro-badge {
    font-size: 0.75rem;
    background-color: rgba(241, 99, 52, 0.27);
    padding: 3px 8px;
    border-radius: 20px;
    color: #f16334;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.2;
}

/* Responsive */
@media (max-width: 768px) {
    .price-wrapper-single .precio-miles {
        font-size: 1.5rem;
    }
    
    .price-wrapper-single .precio-cientos {
        font-size: 1.2rem;
    }
    
    .price-wrapper-single .precio-decimal {
        font-size: 0.85rem;
    }
    .woocommerce-product-gallery__wrapper, .summary .sumary-primary, .summary .anadir-carrito {
        position: relative;
    }
    .woocommerce-product-gallery__wrapper, .summary .sumary-primary, .summary .anadir-carrito {
        top: 0px;
    }
}
.woocommerce-product-details__short-description {
    font-size: 0.9rem;  
    font-weight: 400;
}
/*==========================
 * SELECTOR DE CANTIDAD UNIFICADO
 ==========================*/
.anadir-carrito .quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100px !important; /* Ajustado para que quepa mejor */
    height: 40px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    background-color: #f5f5f5 !important;
}

/* Estilo para el input numérico */
.anadir-carrito .quantity input[type="number"] {
    width: 100% !important;
    height: 100% !important;
    text-align: center !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: transparent !important;
    border: 2px solid #ddd;
}
.qty:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Ocultar flechas nativas */
.anadir-carrito .quantity input::-webkit-outer-spin-button,
.anadir-carrito .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*==========================
 * BOTONES DE ACCIÓN (Añadir y Comprar)
 ==========================*/

/* Contenedor del formulario cart */
form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center;
    gap: 10px !important; /* Espacio uniforme entre elementos */
}
.woocommerce-variation-add-to-cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Estilo Base para ambos botones */
.anadir-carrito form.cart .single_add_to_cart_button {
    height: 40px !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer;
    margin: 0 !important; /* Reseteamos márgenes */
}

/* Botón Añadir al Carrito (Verde) */
.anadir-carrito form.cart .single_add_to_cart_button {
    background-color: #15AD3C !important;
    color: #fff !important;
    position: relative !important;
    flex-grow: 1 !important;
    min-width: 200px !important;
}
.anadir-carrito form.cart .single_add_to_cart_button:hover {
    background-color: var(--color--hover_primary) !important;
}
.single_variation_wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Botón Comprar Ahora (Blanco/Borde Verde) */
.comprar-ahora-container .comprar-ahora-btn-fk {
    background-color: #ffffff !important;
    color: #15ad3c !important;
    border: 2px solid #15AD3C !important;
    flex-grow: 1 !important;
    max-width: 200px !important;
}

.comprar-ahora-btn-fk:hover {
    background-color: #f4fcf6 !important;
    box-shadow: 0 4px 15px rgba(21, 173, 60, 0.15) !important;
}
.disabled {
    opacity: .5;
    cursor: not-allowed !important;
}

/*==========================
 * AJUSTES PARA MÓVIL (768px o menos)
 ==========================*/
@media (max-width: 768px) {
    form.cart {
        align-items: center !important;
        justify-content: center !important;
    }
    .anadir-carrito .quantity {
        margin-bottom: 5px !important;
    }

    .anadir-carrito div.product form.cart .single_add_to_cart_button {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .comprar-ahora-container .comprar-ahora-btn-fk {
    max-width: 100% !important;
}
    
    /* Ocultar el separador "O" de Stripe en móvil si estorba */
    #fkwcs-payment-request-separator {
        margin: 5px 0 !important;
    }
}

/*==========================
 * ANIMACIÓN CARGA (Spinner)
 ==========================*/
@keyframes spinner {
    to { transform: rotate(360deg); }
}
.btn-loader span:first-child {
    border-radius: 50%;
    border: 2px solid rgba(21, 173, 60, 0.3);
    border-top-color: #15AD3C;
    animation: spinner 0.8s linear infinite;
}

.producto .related, .producto .valoraciones {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
}
.producto .related {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.producto .related ul {
    columns: 5;
    column-gap: 10px;
    align-self: center;
}
.producto .related ul .producto-moto {
    margin-bottom: 10px;
}

@media(max-width: 1200px) {
    .producto .related ul {
        columns: 4;
    }
}
@media(max-width: 900px) {
    .producto .related ul {
        columns: 3;
    }
    .producto {
        flex-wrap: wrap;
    }
    .producto .imagen, .producto .summary {
        width: 100%;
    }
}
@media(max-width: 700px) {
    .producto .related ul {
        columns: 2;
    }
    .summary {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   SECCIÓN DE INFORMACIÓN DEL VENDEDOR
   ============================================== */

.vendor-info-section {
    border-top: 1px solid #e5e7eb;
}

.vendor-info-card {
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}
.vendor-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vendor-avatar {
    flex-shrink: 0;
}

.vendor-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #15ad3c;
    background: white;
}

.vendor-details {
    flex: 1;
}

.vendor-name {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
}

.vendor-name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.vendor-name a:hover {
    color: #15ad3c;
}

.vendor-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.vendor-rating .stars {
    display: inline-flex;
}

.vendor-rating .stars .star {
    color: #fbbf24;
    font-size: 12px;
}

.vendor-rating .rating-count {
    font-size: 12px;
    color: #6b7280;
}

.vendor-phone {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6b7280;
}

/* Versión móvil */
@media (max-width: 768px) {
    .vendor-header {
        flex-direction: column;
        text-align: center;
    }
    
    .vendor-rating {
        justify-content: center;
    }
    
    .vendor-phone {
        justify-content: center;
    }
    
    .vendor-actions {
        flex-direction: column;
    }
}