/*
Theme Name: Uncode Child
Description: Child theme for Uncode theme
Author: Undsgn™
Author URI: http://www.undsgn.com
Template: uncode
Version: 1.0.0
Text Domain: uncode
*/

/* =========================================================
   BOTONES Y ELEMENTOS DE ACCIÓN
   ========================================================= */

/* Botón del menú */
.botonmenu.btn {
    background-color: #dc4364 !important;
    border: none;
    color: #fff !important;
}

.botonmenu.btn:hover {
    color: #ffffffd1 !important;
    border: none;
}

/* =========================================================
   BOTÓN SCROLL TOP (FOOTER)
   ========================================================= */

.footer-scroll-top .scroll-top .btn-default {
    background-image: url("https://blissfulthinking.es/wp-content/uploads/2025/09/up_arrow_transparent.png") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-color: #705472 !important;
    border-color: #705472 !important;
}

.footer-scroll-top i {
    width: 75px;
    height: 75px;
    border-radius: 50px !important;
}

/* =========================================================
   ICONOS SOCIALES FOOTER
   ========================================================= */

.footersocials .footer-last.footer-center .social-icon i,
.uncode-vc-social.icons-lead .social-icon i {
    font-size: 50px;
    color: #fff;
}

.footersocials .footer-last.footer-center .social-icon i:hover,
.uncode-vc-social.icons-lead .social-icon i:hover {
    color: #dc4364 !important;
    fill: #dc4364 !important;
}

/* =========================================================
   FILTROS UNCODE
   ========================================================= */

/* Tipografía más grande y aireada */
.menu-horizontal .filter-list__link {
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 12px;
}

@media (min-width: 960px) {
    .ajax-grid-system .grid-filters .filter-list ul,
    .ajax-grid-system .grid-filters .filter-list li {
        margin-right: 12px !important;
    }
}

/* =========================================================
   WOOCOMMERCE – CHECKOUT Y CARRITO
   ========================================================= */

/* Quitar borde del payment box de Redsys */
#payment .payment_methods li .payment_box.payment_method_redsys,
#payment .payment_methods li .payment_box.payment_method_redsys fieldset {
    border: none;
    box-shadow: none;
}

/* Layout móvil del add to cart */
@media (max-width: 767px) {

    form.cart.dynamic-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    form.cart.dynamic-button .quantity {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    form.cart.dynamic-button .qty-inset {
        justify-content: center;
    }

    form.cart.dynamic-button button.single_add_to_cart_button {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
}

/* =========================================================
   ICONO CARRITO (HEADER)
   ========================================================= */

@media (max-width: 959px) {
    .mobile-additional-icons 
    .mobile-shopping-cart 
    .cart-icon-container i.fa-shopping-bag1 {
        color: #dc4364 !important;
    }
}

@media (min-width: 960px) {
    body[class*=hmenu] .menu-icons .uncode-cart i.fa-shopping-bag1 {
        color: #f47e5d !important;
        font-size: 20px;
        width: 1.5em;
    }
}

/* Línea inferior del menú */
.menu-container.style-color-xsdn-bg.menu-borders.menu-h-borders.needs-after {
    border-bottom: 1px solid #dc4364;
}

/* =========================================================
   GRID / TARJETAS / PRODUCTOS
   ========================================================= */

/* Overlay add to cart */
.enhanced-atc.tmb .t-entry-visual:hover .add-to-cart-overlay a {
    bottom: 113px !important;
}

/* Ajuste de espaciados internos */
.main-container .row-container .row-parent .column_child.half-internal-gutter .uncont
> *:not(.uncode-owl-nav-wrap):not(:first-child):not(.pin-spacer):not([data-sticky]) {
    margin-top: 9px;
}

/* Producto destacado */
.pdtodestacada img {
    border-radius: 20px;
}

/* =========================================================
   METADATOS DE PRODUCTO
   ========================================================= */

.datos-autores {
    color: #666;
    font-size: 0.9rem;
}

.producto-tag,
.producto-isbn,
.separador {
    color: #bbb;
    font-size: 0.8rem;
}

.separador {
    margin: 0 6px;
}

/* Género (badge) */
.data-field--genero,
.data-field--genero .data-field-content {
    display: inline-block;
}

.data-field--genero .data-field-value {
    display: inline-block;
    background-color: #ed6207;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
}

/* =========================================================
   AUTORES – GRID
   ========================================================= */

.autor-grid-bootstrap {
    width: 100%;
}

.autor-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 991px) {
    .autor-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .autor-row {
        grid-template-columns: 1fr;
    }
}

.autor-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.autor-thumb img {
    width: 100%;
    height: auto;
}

.autor-cart {
    margin-top: auto;
}

/* =========================================================
   BADGE ESTADO EDITORIAL
   ========================================================= */

.tmb {
    position: relative;
}

.tmb .t-entry-cf-estado_editorial {
    position: absolute;
    top: -40px;
    left: 14px;
    z-index: 999;

    padding: 6px 14px;
    background: #f47e5d;
    color: #fff;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    pointer-events: none;
}

.t-entry-cf-estado_editorial:empty {
    display: none;
}

/* =========================================================
   AUTORES – FICHA INDIVIDUAL
   ========================================================= */

.autores-container {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.autor-flex {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.autor-foto {
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    border-radius: 50%;
    overflow: hidden;
}

.autor-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.autor-datos {
    flex: 1;
}

.autor-titulo a {
    font-size: 1.2em;
    font-weight: 700;
    color: #222;
    text-decoration: none;
}

.autor-titulo a:hover {
    color: #0073aa;
}

.autor-roles {
    margin: 5px 0 15px;
    font-style: italic;
    color: #555;
}

.autor-contenido p {
    margin-bottom: 0;
    font-size: 0.95em;
    line-height: 1.6em;
}

@media (max-width: 767px) {
    .autor-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .autor-foto {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
}

/* =========================================================
   TEXTOS LEGALES
   ========================================================= */

.texto-legal {
    font-size: 8px;
    line-height: 1;
    margin-top: 4px;
}

/* =========================================================
   ICONO MASTODON (REEMPLAZO fa-times-circle)
   ========================================================= */

.social-icon.mastodon .fa-times-circle::before {
    content: none !important;
}

.fa-times-circle::after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url('https://raw.githubusercontent.com/carbon-design-system/carbon/refs/heads/main/packages/icons/src/svg/32/logo--mastodon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.fa-times-circle:hover::after {
    filter: invert(37%) sepia(79%) saturate(4770%) hue-rotate(333deg) brightness(94%) contrast(96%);
}
