/* HEADER */
#header #menu ul {
    display: flex;
}

#header #menu ul a {
    margin-left: 3rem;
}
/* Botón hamburguesa — oculto en desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    order: 3; /* se sitúa después del carrito si hace falta reordenar */
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Estado abierto — animación a X */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ─── MOBILE ─────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    #header #menu {
        /* Panel desplegable */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff; /* ajusta al color de tu header */
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease;
        z-index: 999;
    }

    #header #menu.is-open {
        max-height: 500px; /* valor suficientemente grande */
        top: 127px;
        box-shadow: 1px 10px 40px #989898;
    }

    #header #menu ul {
        flex-direction: column;
        padding: 1rem 0;
    }

    #header #menu ul a {
        display: block;
        margin-left: 0;
        padding: 0.75rem 1.5rem;
    }
}
/*-------- 'display none' ---------*/
.wp-block-woocommerce-empty-cart-block .wc-block-grid.wp-block-product-new.wp-block-woocommerce-product-new.wc-block-product-new.has-4-columns {
    display: none;
}
/*-------- 'carriot' ---------*/

.header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.branding.contenido {
    flex: 0 0 180px;
}
@media only screen and (min-width:768px) {
    .branding.contenido {
    flex: 0 0 222px;
}
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 600;
}
/*-------- 'fade up' ---------*/
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/*-------- 'boton' ---------*/
.button,
.woocommerce a.button,
.woocommerce .button,
.woocommerce .course-sidebar__footer .button,
.theme-psa a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained,
.woocommerce .woocommerce-error .button, .woocommerce .woocommerce-info .button, .woocommerce .woocommerce-message .button, .woocommerce-page .woocommerce-error .button, .woocommerce-page .woocommerce-message .button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;

    /*min-width: 264px;*/
    height: 54px;
    padding-inline: 1.5rem;
    padding: 0;

    border-radius: 4px;
    border: 2px solid transparent;

    font-size: var(--text-16);
    font-weight: 700;
    text-decoration: none;

    transition:
        background .3s ease,
        color .3s ease,
        border-color .3s ease,
        transform .3s ease;

    /*margin-top: 2rem;*/
    align-self: flex-start;
}

.button:hover {
    transform: translateY(-2px);
}
.single_add_to_cart_button::after {
    content: "";

    width: 22px;
    height: 22px;

    display: block;

    background-image: url('../img/ico-flecha-blanca.svg');
    background-size: contain;
    background-repeat: no-repeat;
}
.button-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;

    transition: transform .3s ease;
}

.button:hover .button-icon {
    transform: translateX(4px);
}
/* boton rojo */
.button--primary {
    background: linear-gradient(90deg, #F00 0%, #D82626 100%);
    color: #fff;
    width: 100%;
}

.woocommerce a.button--primary,
.theme-psa a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained,
button.wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.contained,
.woocommerce .woocommerce-error .button, .woocommerce .woocommerce-info .button, .woocommerce .woocommerce-message .button, .woocommerce-page .woocommerce-error .button, .woocommerce-page .woocommerce-message .button,


.theme-psa .course-sidebar .button {
    background: linear-gradient(90deg, #F00 0%, #D82626 100%);
    color: #fff;
    border: none;
    width: 100%;
}
.theme-psa a.woocommerce-button.button.view,
.woocommerce-page .woocommerce-info .button {
    color: #f00;
    padding: 0 1rem;
    background: none;
}
.woocommerce a.button--primary {
    border: 1px solid #fff;
    width: 100%;
}
/* boton blanco */
.button--light {
    background: #fff;
    border-color: var(--color-primary);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0 2rem;
}
/* boton transparente */
.button--transparent {
    background:transparent;
    border-color: #fff;
    color: #fff;
    border: 2px solid #fff;
    padding: 0 2rem
}
/*-------- 'hero page' ---------*/
.section-page-hero {
    position:relative;
    min-height:35vh;
    display:flex;
    align-items:center;
    overflow:hidden;
}
section.section-page-hero.section-page-hero--no-image {
    min-height: 25vh;
}
.page-hero-media {
    position: absolute;
    inset: 0;
}
.page-hero-media:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
    90deg,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,.75) 60%,
    rgba(255,255,255,0) 80%
);
    z-index: 1;
}
.page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-hero__content {
    position: relative;
    z-index: 2;
    color: #fff;
    margin: auto;
}

.page-hero__content .page-hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: #000;
}

/*-------- 'buscador woo' ---------*/
.shop-search {
    width: 100%;
}
@media only screen and (min-width:768px) {
    .shop-search {
    width: 31%;
}
}

.shop-search .woocommerce-product-search {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 6px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 16px;

    background: #ededed;

    transition: all .3s ease;
}

.shop-search .woocommerce-product-search:focus-within {
    border-color: #f1f1f1;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

.shop-search .search-field {
    flex: 1;

    border: none;
    background: transparent;

    padding: 12px 4px;

    font-size: 16px;
    color: var(--color-primary)

    outline: none;
}

.shop-search .search-field::placeholder {
    color: #999;
}

.shop-search button {
    border: none;

    padding: 12px 20px;
    border-radius: 12px;

    background: var(--color-primary);
    color: #fff;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition: all .25s ease;
}

.shop-search button:hover {
    transform: translateY(-1px);
    background: var(--color-rojo-intenso)
}

.shop-search .search-field:focus,
.shop-search .search-field:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
}
