/*
Theme Name: csWPTrust
Description: Child theme for the Twenty Twenty-Five theme
Template: twentytwentyfive
Version: 1.0.0
Tags: block-template
Text Domain: csWPTrust
*/
:root{
    --primary: #ff0000;
}
:root{
    @media(max-width:990px){
        --wp--preset--font-size--xx-large: 1.4rem;
        --wp--preset--font-size--medium: 1.1rem;
    }
}

/*orokorrak*/
img{
    max-width:100%;
    height:auto;
}
iframe{
    max-width:100%;
}
.wp-site-blocks{
   max-width:2000px;
   margin:0 auto;
}
.lang-item{
    list-style: none;
    aspect-ratio:1/1;
    overflow:hidden;
    display:inline-block;
    border:2px solid white;
    border-radius:50%;
    font-size:16px;
    &.current-lang{
        background-color:var(--primary);
        border:2px solid var(--primary);
    }

    a{
        text-decoration: none;
        color:white;
        text-transform: uppercase;
        display:inline-block;
        padding:8px;

    }
}
#modal-1{/*goiko submenua*/
    li.wp-block-navigation-item:last-child{
        border:1px solid white ;
        padding: 8px 12px 5px 30px;
        text-transform:uppercase;
        font-size:15px;
        background: url(img/i_point.svg) no-repeat 10px 7px;
        &:hover{
            /* opacity:0.7; */
            border-color:red;
        }
        a:hover{
            text-decoration:none;
        }

    }
}
footer.wp-block-template-part{
    margin-top:0;
}
/*stiky header */
@media(min-width:990px){
    header.wp-block-template-part{
        position:fixed;
        top:0;
        left:0;
        width:100%;
        z-index:99999;
    }
    body{
    padding-top:140px;
    }
    body.logged-in{
        padding:0;
        header.wp-block-template-part{
            position:relative;
        }
    }
}
/*header mobile*/
    header.wp-block-template-part .alignwide{
        padding-top:0 !important;
        padding-bottom:0 !important;
    }

/*home*/

.hero-slider, .hero-slider h2, .hero-slider sr7-btn{
    font-family: var(--wp--preset--font-family--helvetica) !important;
}
.hero-slider h2{
    font-size:var(--wp--preset--font-size--xx-large) !important;
    @media(max-width:990px){
        line-height:1.45rem !important;
    }
}
.hero{
    position:relative;
    a{
        text-decoration:none !important;
    }
}


@media(min-width:990px){
    .hero .overlayed-black-block{
        position: absolute;
        bottom:-110px;
        z-index:999;
    }
}
@media(max-width:990px){
.hero .overlayed-black-block{
    margin-top:-30px;
    z-index:999;
    margin-bottom:1rem;
    .has-background{
        margin:0 !important;
        max-width:100% !important;
        p{
            margin:0 !important;
        }
    }
}
}
.related-products{
    padding:0 !important;
}
.home-products, .related-products{

    h2 {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom:3rem;
    }
    h2::before,
    h2::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #000000;
    }
    h2::before {
    margin-right: 20px;
    }
    h2::after {
    margin-left: 20px;
    }
    ul.columns-3 {
        gap:3rem;
    }
    .wp-block-post{
        text-align:center;
        background-color:white;
        padding:1rem 1rem 2rem 1rem;
        box-shadow:0 5px 5px rgba(1,1,1,0.25);
        border:1px solid rgba(1,1,1,0.1);
        img{
            margin-bottom:2rem;
        }
        h3{
            font-weight:normal;
        }
    }
}
.catalog-home{
    padding-top:110px;
}
@media(max-width:990px){
    .catalog-home{
        padding-top:0px;
    }
    /* .home-video, #home-manual{
        margin:1rem 0 !important;
    } */
}
.news-home{
    .wp-block-column.is-vertically-aligned-center {
        align-self: flex-start !important;/***hau oihanarekin komentatu!*/
    }
    .bloke-entrada-news{
        @media(min-width:990px){
            min-height:520px !important;
        }
        @media(max-width:990px){
            margin-bottom: 1rem !important;
        }
        display:flex;
        flex-direction: column;
        justify-content: flex-start;
        gap:1.5rem;
        padding:3rem 2rem !important;
        margin-top:1.7rem !important;
        margin-right:1.5rem;
    }
}
.slider-news{
    position:relative;
    .uagb-post-grid.uagb-post__items.is-carousel{
        gap:3rem;
    }
    article{
        @media(min-width:990px){
        min-height:520px !important;
        }
        h4{
            font-weight:normal;
            font-size:24px;
        }
        .uagb-post__date{
            font-size:16px;
        }
        .wp-block-button{
            a{
                color:var(--primary);
                padding:0 !important;
            }
        }
    }
    button{
        height:40px;
        width:50px;
        background-color:#333 !important;
        display:inline-block;
        color:white;
        font-size:2rem;
        svg{
            fill:white !important;
        }
        &.slick-disabled{
          background-color:#666 !important;
        }
    }
    button.slick-prev{
        position:absolute;
        right:5rem;
        top:0;
        left:auto !important;
        margin:0;
        border:none !important;

    }
    button.slick-next{
        position:absolute;
        right:2.5rem !important;
        top:0;
        left:auto !important;
        margin:0;
        border:none !important;
    }
}
@media (max-width:990px){
    .slider-news .slick-list{
        margin-top:2rem;
        margin-left:1rem;
    }
    .slider-news button.slick-prev, .slider-news button.slick-next{
        top:5px !important;
    }
    .news-home     .slider-news button.slick-prev, .slider-news button.slick-next{
        border:1px solid white !important;
    }
    .slider-news button.slick-prev{
        right:3.2rem !important;
    }
    .slider-news button.slick-next{
        right:0.9rem !important;
    }
}
.mainfooter .social a{
    text-decoration:none;
    &:hover{
        text-decoration:underline;
    }
}
.mainfooter .post-footer a{
    text-decoration:none;
    &:hover{
        text-decoration:underline;
    }
}
/*home buttons*/

.has-custom-negro-background-color .wp-block-button a,
.bloke-entrada-news a,
.home-row-distribuidor .wp-block-button a,
.home-row-bgred a{
    border:none !important;
}
.home-row-distribuidor .wp-block-button a,
.home-row-bgred a{
    background-color:black !important;
}

/*faceted*/
@media(max-width:770px){
    .sidebar-facet{
        display:none
    }
    #mega-menu-wrap-menu-mobile-facet #mega-menu-menu-mobile-facet > li.mega-menu-item > a.mega-menu-link {
        text-transform: uppercase;
    }
    #mega-menu-wrap-menu-mobile-facet h4.mega-block-title{
        display:none !important;
    }
}
@media(min-width:770px){
    #mega-menu-wrap-menu-mobile-facet{
        display:none !important;
    }
}
.facetwp-checkbox{
    font-size:1rem;
    color:#666;
    text-transform: uppercase;
    background-position:  0 2px !important;
    &.checked{
        color:black;
    }
}
.cartuchos-grid{
    display:flex;
    flex-wrap:wrap;
    justify-content: space-between;
    width:100%;
    flex-direction: row;
}
.cartucho-item{
    margin-bottom:1.5rem;
    max-width:28%;
   text-align: center;
    background-color: white;
    padding: 1rem 1rem 2rem 1rem;
    img{
        max-width:100%;
    }
    h3.cartucho-title{
        font-weight:normal;
        margin:-1rem 0 0 0;
        a{
            text-decoration:none;
        }
    }
}
@media (max-width:990px){
    .cartucho-item{
        max-width:38%;
        padding:1rem;
        h3{
            margin:0;
        }
    }
}
.mega-facet-mobile p{
    text-transform:uppercase;
    font-weight:bold;
}
.facetwp-checkbox.checked, .facetwp-checkbox.checked {
    line-height: 20px;
}
.facetwp-toggle{
    font-size:1rem;
}
/*catalogo cartuchos*/
ul.wp-block-post-template{
    margin-bottom:2rem !important;
}
li.cartucho {
    .wp-block-post-featured-image{
        margin-bottom:0;
        z-index:1;
    }
    h2.wp-block-post-title{
        font-size:1.3rem;
        margin-top:-1rem;
        z-index:2;
        position:relative;
        font-weight:600;
        text-align:center;
    }
}
/*cartucho*/
@media (min-width:990px){
    .ficha{
        padding-left:5rem !important;
    }
}
.valor-ficha{
    display:flex;
    font-size:1rem;
    .prefix{
        font-weight:bold;
        width:70%;
    }
    .value a{
        text-decoration: none;
        &:hover{
            text-decoration: underline;
        }
    }
}
h2.related-title{
    margin-bottom:2rem !important;
}


/*tirador**/
.related{
    h2 {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom:3rem;
    }
    h2::before,
    h2::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #000000;
    }
    h2::before {
    margin-right: 20px;
    }
    h2::after {
    margin-left: 20px;
    }
}

.tiradores-grid-container{
    @media (min-width:990px){
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap:1rem 3rem !important;
    padding: 0 !important;
    margin: 0 !important;
    }

    h2{
        grid-column: 1 / -1;
    }
    .tirador-card{
        text-align: center;
        h3{
            font-weight:300;
        }
        img{
            box-shadow: 0 4px 5px rgba(1, 1, 1, 0.25);
            width:100%;
            height:auto;
        }
        a{
            text-decoration:none;
        }
        a:hover{
            text-decoration:underline;
        }
    }
}

.card-container{

    h3{
        font-weight:300;
    }
    img{
        box-shadow: 0 4px 5px rgba(1, 1, 1, 0.25);
    }
}



/* Argazki galeria */
.element-gallery-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.element-main-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
}
.element-thumbnails {
    display: flex;
    gap: 8px;
    padding-bottom: 5px;
}
.element-thumb {
    width: 70px;
    height: 70px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.element-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.element-thumb:hover, .element-thumb.active {
    opacity: 1;
    border-color: #000;
}


/*megamenu*/
.mega-menu.max-mega-menu.mega-menu-horizontal{
    padding-left:12px !important;
    padding-top:10px !important;

}
#rap-max_mega_menu_1 #mega-menu-max_mega_menu_1 {
    padding:0 !important;
}
#mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item > a.mega-menu-link{
    padding:0 20px 0 0;
    text-transform: uppercase;
    font-size:18px;
}

@media (min-width:770px){
    ul.mega-sub-menu{
        margin-top:5px !important;
    }
    ul.mega-sub-menu:has(li.megamenu-tiradores){
        background:#efefef url(img/tiradores.jpg) no-repeat top right !important;
        /*scrolla ekiditzeko ???*/
            /* max-width:100% !important;padding:0 !important; */
    }
    ul.mega-sub-menu:has(li.megamenu-cazadores){
        background:#efefef url(img/cazadores.jpg) no-repeat top right !important;

    }
    ul.mega-sub-menu:has(li.megamenu-cartuchos){
        background:#efefef url(img/product1.png) no-repeat top right !important;

    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item a{
        padding:0 !important;
        margin-right:20px !important;
        border-bottom: 2px solid transparent !important;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item a:hover{
                border-bottom: 2px solid white !important;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item.mega-current-menu-item a{
        border-bottom: 2px solid white !important;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item ul.mega-sub-menu a{
        color:black;
        text-decoration:none;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item ul.mega-sub-menu a{
        border: none !important;
        line-height:40px;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item ul.mega-sub-menu a:hover{
        opacity:0.8;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item ul.mega-sub-menu a.buscador{
        padding:0.6rem 0 !important;
        border-top:1px solid black !important;
        border-bottom:1px solid black !important;
        display:block;
        width:90%;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item ul.mega-sub-menu h3,
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item ul.mega-sub-menu li{
        margin-bottom:0 !important;
        margin-top:0 !important;
    }
    #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu {
        padding: 40px 0;
        width: 99.2vw;
        min-height:380px;
    }
}

ul.mega-sub-menu{
    text-transform: uppercase !important;
    font-size:18px;
    .wp-block-heading, .mega-block-title{
        text-transform: uppercase !important;
        font-weight:300 !important;
        font-size:18px;
        margin-bottom:0.5rem;
    }
    .wp-block-query{
        margin-top:1rem;
    }
    h2,h3, h4{
        font-size:18px !important;
        margin:0;
        font-weight:300 !important;
    }

}
#mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu li.mega-menu-column-standard, #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-megamenu > ul.mega-sub-menu li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
        font-size:18px !important;
        margin:0;
}

@media only screen and (max-width: 768px) {
    #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle {
        padding-left:2rem;
        background-color: transparent !important;
    }
    #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle .mega-toggle-block-0 .mega-toggle-animated-inner, #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle .mega-toggle-block-0 .mega-toggle-animated-inner::before, #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle .mega-toggle-block-0 .mega-toggle-animated-inner::after {
        background-color: white;
    }
    #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle + #mega-menu-max_mega_menu_1 {
        background-color: black;
        padding:3rem 1rem 1rem 1rem !important;
        li{
            margin-bottom:1rem;
        }
        li a.mega-menu-link{

            padding-left:.5rem !important;
        }
    }
    .header-menu3{
        display:none !important;
    }
}
button.mega-close{
    border:1px solid rgba(255,255,255,0.5) !important;
    background: url(./img/i_close.svg) no-repeat center center !important;
    display:block;
}


/*news*/
.filtro-etiqueta{
    display:flex !important;
    justify-content: center;
    gap:1rem;
    text-align:center;
    a{
        text-decoration:none;
        text-transform: uppercase;
        border:1px solid black;
        display:inline-block;
        padding:8px 20px 3px 20px;
    }
}


/*pagination*/

nav.wp-block-query-pagination{
    margin:4rem 0 !important;
    .wp-block-query-pagination-numbers{
        display:flex;
    }
    .page-numbers{
        aspect-ratio: 1/1;
        overflow:hidden;
        border:1px solid #ccc;
        border-radius:50%;
        min-width:46px;
        width:46px;
        display:flex;
        align-items: center;
        justify-content: center;
        margin:0 0.5rem;
        text-decoration:none;
        line-height:15px;
        &.current, &:hover{
            border:1px solid black;
        }
    }
    .page-numbers.dots{
        border:none;
    }
}
.facetwp-facet-paginate {
    margin:4rem 0 !important;
    font-size:18px;
    .facetwp-pager{
        display:flex;
        a.facetwp-page{
            aspect-ratio: 1/1;
            overflow:hidden;
            border:1px solid #ccc;
            border-radius:50%;
            min-width:46px;
            width:46px;
            height:52px;
            display:flex;
            align-items: center;
            justify-content: center;
            margin:0 0.5rem;
            text-decoration:none;
            line-height:15px;
            &.active, &:hover{
                border:1px solid black;
                font-weight:normal;
                    font-size:18px;
            }
        }
    }
}


/* Query Loop-eko azpimenuko esteka aktiboaren kolorea aldatu */
.mega-menu-sub-current-menu a.is-active-link {
   color : black !important; /* Jarri hemen zure kolore korporatiboa */
    font-weight: bold !important;
}

/* Nahi baduzu, profil aktiboaren <li> elementu osoari atzeko plano leun bat jarri */
.mega-menu-sub-current-menu li.is-active-post {
    background-color: rgba(0, 0, 0, 0.05); /* Edo nahi duzun itxura */
}

/*distribuidores*/
.cartuchos-grid{
    justify-content: flex-start;
    .distribuidores-item{
        width:25%;
        margin:0 2% 2% 0;
        border:1px solid #efefef;
        padding:2%;
        h2{
            font-size:1.2rem;
            border-bottom:1px solid black;
            padding-bottom:0.5rem;
        }
        p{
            font-size:1rem;
        }
    }
}
.facetwp-facet-distribuidores.facetwp-type-dropdown{
    /* background-color:#efefef; */
    /* padding:5px; */
    text-align:right;
    /* border-bottom:1px solid black;
    border-top:1px solid #ccc; */
    select{
        width:50%;
        padding:5px;
        font-size:1rem;
    }
}
@media(max-width:990px){
    .order-1{
        order:1;
    }
    .order-2{
        order:2;
    }
    .cartuchos-grid{
        justify-content: space-between !important;
        .distribuidores-item{
            width:42%;
            margin-right:0;
            margin-bottom:1rem;
        }
    }
    #plano-provincias{
        display:none;
    }
    .facetwp-facet {
        margin-bottom: 20px !important;
    }
    body.tax-provincia .wp-block-column.is-layout-flow.wp-block-column-is-layout-flow{
        order:1;
    }
     body.tax-provincia .facetwp-template.wp-block-column.is-layout-flow.wp-block-column-is-layout-flow{
        order:2;
     }
}
/**/
button.wp-block-search__button{
    padding:0 !important;
    margin-top:0.6rem;
    margin-top:-3px;
    svg{
        min-height: 32px;
        min-width: 32px;
    }
}
.wp-block-search.wp-block-search__button-only .wp-block-search__input {
    height: 30px;
    margin-right:6px;
}
:root :where(.wp-block-search .wp-block-search__input) {
    border:none !important;
}
:where(.wp-site-blocks :focus) {
    outline-style: none !important;
}
main .wp-block-search__input{
    border:1px solid #ccc !important;
}
main .wp-block-search__button{
    padding-right:1rem !important;
    margin-top:0;
}
/**/
.contact-form{

    input, textarea{
        width:100%;
        padding:0.8rem 0.5rem;
    }
    input[type="submit"]{
        background-color:black;
        color:white;
        border:none;
        padding:0.8rem 1.5rem;
        text-transform:uppercase;
        font-size:1rem;
        width:fit-content;
        &:hover{
                   background-color:var(--primary);
        }
    }
}
@media(min-width:770px){
  .contact-form{
    padding-right:2rem;
  }
}