/* ==========================================================================
   ESTILOS EXCLUSIVOS: FICHA DE PRODUCTO INDIVIDUAL (SINGLE PRODUCT)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LIMPIEZA Y OCULTACIÓN DE ELEMENTOS
   -------------------------------------------------------------------------- */

/* Ocultar bloques globales de Mini Cart y texto residual de carrito */
.single-product .wc-block-mini-cart,
.single-product .wc-block-mini-cart__drawer,
.single-product .wc-block-mini-cart__template-part,
.single-product .widget_shopping_cart_content,
.single-product .widget_shopping_cart,
.single-product [class*="mini-cart"],
.single-product [data-block-name="woocommerce/mini-cart"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ocultar SKU, Categorías y Etiquetas (Metadatos) */
.single-product .product_meta,
.single-product .sku_wrapper,
.single-product .posted_in,
.single-product .tagged_as,
.single-product .taxonomy-product_cat,
.single-product .taxonomy-product_tag,
.single-product .wc-block-components-product-meta,
.single-product .wp-block-post-terms {
    display: none !important;
}


/* --------------------------------------------------------------------------
   2. GALERÍA E IMAGEN DEL PRODUCTO
   -------------------------------------------------------------------------- */

.single-product .woocommerce-product-gallery figure,
.single-product .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery__image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}


/* --------------------------------------------------------------------------
   3. RESUMEN Y BLOQUE DE COMPRA (PRECIO, CANTIDAD Y BOTÓN)
   -------------------------------------------------------------------------- */

/* Precio */
.single-product .price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 15px !important;
}

/* Descripción corta */
.single-product .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 25px;
}

/* Indicador de Stock */
.single-product .stock {
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32 !important;
    margin-bottom: 15px;
}

/* Alineación Horizontal de Cantidad + Botón */
.single-product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 25px !important;
}

/* Input Selector de Cantidad */
.single-product .quantity input.qty {
    width: 65px !important;
    height: 48px !important;
    border: 1px solid #cccccc !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background-color: #f9f9f9 !important;
}

/* Botón Añadir al Carrito */
.single-product .single_add_to_cart_button {
    height: 48px !important;
    background-color: #3B3B3B !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0 30px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.single-product .single_add_to_cart_button:hover {
    background-color: #7DF9F1 !important;
    color: #1a1a1a !important;
    transform: translateY(-2px);
}


/* --------------------------------------------------------------------------
   4. INSIGNIAS DE CONFIANZA (TRUST BADGES)
   -------------------------------------------------------------------------- */

.lineyes-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.badge-item {
    font-size: 13px;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}


/* --------------------------------------------------------------------------
   5. PESTAÑAS Y CONTENIDO DABAJO (DESCRIPCIÓN Y VALORACIONES)
   -------------------------------------------------------------------------- */

.single-product .woocommerce-tabs {
    margin-top: 40px !important;
    padding-top: 20px !important;
    border-top: 1px solid #eeeeee !important;
}

.single-product .woocommerce-tabs ul.tabs {
    border-bottom: 2px solid #e5e5e5 !important;
    padding: 0 !important;
    margin-bottom: 25px !important;
    display: flex !important;
    gap: 25px !important;
}

.single-product .woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 0 10px 0 !important;
}

.single-product .woocommerce-tabs ul.tabs li a {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #888888 !important;
    padding: 0 !important;
}

.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #3B3B3B !important;
    border-bottom: 3px solid #7DF9F1 !important;
}

.single-product .woocommerce-Tabs-panel {
    font-size: 15px;
    line-height: 1.7;
    color: #444444;
    min-height: 350px !important; /* Evita saltos bruscos de altura al cambiar de pestaña */
}

/* Formulario de Reseñas */
.single-product #review_form_wrapper {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
}

.single-product #review_form .form-submit input#submit {
    background-color: #3B3B3B !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 25px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.single-product #review_form .form-submit input#submit:hover {
    background-color: #7DF9F1 !important;
    color: #1a1a1a !important;
}


/* --------------------------------------------------------------------------
   6. SECCIÓN PRODUCTOS RELACIONADOS (COMPATIBLE CON BLOQUES FSE TWENTY TWENTY-FOUR)
   -------------------------------------------------------------------------- */

/* Contenedor principal y línea separadora superior */
.wp-block-woocommerce-related-products,
.single-product .related.products,
.single-product section.related {
    border-top: 2px solid #e5e5e5 !important;
    margin-top: 60px !important;
    padding-top: 40px !important;
    clear: both !important;
    width: 100% !important;
}

/* Título "Productos relacionados" */
.wp-block-woocommerce-related-products h2,
.single-product .related.products > h2,
.single-product .related.products > h2 span {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #3B3B3B !important;
    text-transform: uppercase !important;
    text-align: center !important;
    margin-bottom: 35px !important;
    letter-spacing: 0.5px !important;
}

/* Cuadrícula de productos */
.wp-block-woocommerce-related-products .wc-block-grid__products,
.single-product .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Tarjeta individual del producto relacionado */
.wp-block-woocommerce-related-products .wc-block-grid__product,
.single-product .related.products ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    text-align: center !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.wp-block-woocommerce-related-products .wc-block-grid__product:hover,
.single-product .related.products ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

/* Imagen dentro de la tarjeta */
.wp-block-woocommerce-related-products .wc-block-grid__product-image img,
.single-product .related.products ul.products li.product img {
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
    margin-bottom: 12px !important;
}

/* Título de la tarjeta del producto relacionado */
.wp-block-woocommerce-related-products .wc-block-grid__product-title,
.single-product .related.products ul.products li.product .woocommerce-loop-product__title,
.single-product .related.products ul.products li.product h2 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #3B3B3B !important;
    margin-bottom: 8px !important;
}

/* Precio en la tarjeta */
.wp-block-woocommerce-related-products .wc-block-grid__product-price,
.single-product .related.products ul.products li.product .price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 15px !important;
}

/* Botón de la tarjeta */
.wp-block-woocommerce-related-products .wp-block-button__link,
.single-product .related.products ul.products li.product .button {
    background-color: #3B3B3B !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 8px 15px !important;
    border-radius: 4px !important;
    border: none !important;
    text-transform: uppercase !important;
    transition: background-color 0.3s ease !important;
}

.wp-block-woocommerce-related-products .wp-block-button__link:hover,
.single-product .related.products ul.products li.product .button:hover {
    background-color: #7DF9F1 !important;
    color: #1a1a1a !important;
}

/* Forzar que el separador de la ficha de producto ocupe el 100% del ancho */
.single-product hr.wp-block-separator,
.single-product .wp-block-separator {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-bottom-width: 2px !important;
}