@import url('https://fonts.googleapis.com/css2?family=Montagu+Slab:opsz,wght@16..144,100..700&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


:root {
    --header-height: 3.5rem; /* altura do header */

    /*============ COLORS ============*/
    /*COLOR MODE HSL(HUE, SATURATION, LIGHTNESS)*/
    
    --first-color: hsl(230, 62%, 56%);
    --title-color: hsl(230, 70%, 16%);
    --text-color: hsl(230, 16%, 45%);
    --border-color: hsl(230, 50%, 90%);
    --white-color: hsl(0, 0%, 100%);
    --body-color: hsl(230, 100%, 96%);
    --container-color: hsl(230, 100%, 97%);

    
      /*============ FONT & TYPOGRAFHY ============*/
    
    --body-font: "Montserrat", sans-serif;
    --second-font: "Montagu Slab", serif;
    --biggest-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /*============ FONT WEIGHT ============*/

    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;

    /*============ Z INDEX ============*/
    --z-fixed: 100;
    --z-tooltip: 10;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
    transition: background-color .4s;
}

input,
button {
    border: none;
    outline: none;
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-family: var(--second-font);
    font-weight: var(--font-medium);
}


.content {
    width: 100%;
    min-height: 100vh;
    background-color: var(--body-color);
    padding-block: 110px;
}

.content-container {
    margin-inline: 1.5rem;
    max-width: 1220px;
}

.container {
    max-width: 1220px;
    margin-inline: 1.5rem;
}

.topo {
    margin-inline: 1.5rem;
    background-color:  hsl(230, 48%, 85%);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 10px;
}

.topo .search-livraria {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topo .searchInput {
    outline: none;
    color: black;
    text-decoration: none;
    border: 1px solid #000;
    padding: 5px 10px;
    text-align: center;
    width: 20%;
    margin: 2px 5px;
    background-color: #fff;
    height: 40px;
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    font-size: 15px;
}

.topo .searchInput::placeholder {
    color: black;
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
}


.select-menu {
    width: 300px;
    cursor: pointer;
    position: relative;
}

.select {
    border: 1px solid #000;
    height: 40px;
    background-color: #fff;
    padding: 5px; 
    color: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-list {
    position: absolute;
    width: 100%;
    background-color: #ffffff;
    margin-top: 14px;
    padding: 0 10px;
    max-height: 100px;
    overflow-y: auto;
    height: 0;
    transition: .3s linear .2s;
}

.option {
    padding: 8px 0;
    font-size: 14px;
    transition: .4s ease-in-out;
}

.option:hover,
.option.selected {
    color: rgb(46, 132, 182);
}

.option-list.active{
    height: 95px;
}


.option-list::-webkit-scrollbar{
    width: 4px;
    background-color: hsl(231, 34%, 78%);
}

.option-list::-webkit-scrollbar-thumb{
    background-color:  hsl(231, 12%, 44%);
}

.btnbuscar {
    border: 1px solid #000;
    text-align: center;
    border-radius: 5px;
    width: 6%;
    margin: 2px 5px;
    height: 40px;
    background-color: #fff;
    cursor: pointer;
    color: #000;
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
}


.content .topo h1 {
    text-align: end;
    padding: 5px;
    margin: 5px 10px;
}

.content h1::after {
    content: " ";
    margin: 2px auto;
    height: 1px;
    width: 200px;
    display: block;
}



/*============ VIZUALIZADOS ============*/
.vizualizados {
    background-color:  hsl(230, 48%, 85%);
    padding: 15px;
    margin-top: 100px;
    margin-inline: 1.5rem;
}

.titulo-vizu {
    width: 60%;
    margin: 0 auto;
}


.titulo-vizu h2 {
    margin: 0 40px;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    background-color :hsl(230, 50%, 90%);
}


.vizu-column {
    display: flex;
    height: auto;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;

    animation-name: slidein;
    animation-duration: 1.3s;
}

@keyframes slidein {
    from{
        margin-left: 100%;
        width: 100%;
    }
    
    to {
        margin-left: 0%;
        width: 100%;
    }
}

.vizu{
    padding: 10px;
    margin: 2px 40px;
    text-align: center;
}


.vizu:hover {
    transform: scale(1.1);
    transition: .3s;
}

.img-vizu {
    width: 100px;
    height: 100%;
    cursor: pointer;
}

.img-vizu img {
    width: 200px;
    height: 300px;
    box-shadow: -4px 7px 10px 2px #00000044;
}

.destaque-vizu {
    background-color: #000000be;
    width: 70px;
    margin-bottom: 4px;
    border-radius: 5px;
}

.destaque-vizu h3 {
    padding: 2px;
    color: #fff;
    text-align: start;
    text-transform: uppercase;
}

.info-vizu {
    text-align: start;
    cursor: pointer;
}

.info-vizu h3 {
    text-align: start;
    padding: 10px;
    margin-left: -10px;
    text-transform: uppercase;
}

.info-vizu p {
    text-align: start;
    line-height: 1.5;
    margin-top: -5px;
}


/*============ BOOKS-COLUMN ============*/


.books-column {
    display: flex;
    height: auto;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    flex-wrap: wrap;
}

.column {
    flex-basis: 10%;
    padding: 10px;
    margin: 2px 10px;
    text-align: center;
}

.image {
    width: 350px;
    height: 350px;
    overflow: hidden;
}

.image img {
    width: 65%;
    height: 100%;
    box-shadow: -4px 7px 10px 2px #00000044;
}

.column .info {
    margin: 10px;
    text-align: center;
}


.info h3 {
    width: 70%;
    text-transform: uppercase;
    text-align: start;
    margin-left: 50px;    
    height: 40px;
}

.info p {
    text-align: start;
    margin: 10px 0px 20px 50px;
}

.info h4 {
    font-size: 11px;
    text-transform: uppercase;
}


.info .btnn {
    text-decoration: none;
    border: none;
    color: #000000;
    outline: none;
    padding: 10px 20px;
    background-color:  hsl(230, 48%, 85%);
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 5px;
    transition: .4s;
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
}

.info .btnn:hover {
    color: rgb(255, 255, 255);
    background-color: #0000003b;
}


/*============ SCROLL BAR ============*/
::-webkit-scrollbar {
    width: .6rem;
    border-radius: .5rem;
    background-color: hsl(230, 16%, 85%);
}

::-webkit-scrollbar-thumb{
    border-radius: .5rem;
    background-color: hsl(230, 16%, 65%);
}

::-webkit-scrollbar-thumb:hover{
    background-color: hsl(230, 16%, 55%);
}


/*============ SCROLL UP ============*/
.scrollup{
    position: fixed;
    right: 1rem;
    bottom: -50%;
    background-color: var(--container-color);
    color: var(--title-color);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, .1);
    display: inline-flex;
    padding: 6px;
    font-size: 1.25rem;
    text-decoration: none;
    transition: bottom .4s, tranform .4s, background-color .4s;
}

/*============ SHOW SCROLL UP ============*/
.show-scroll {
    bottom: 6rem;
}


/*============ DARK THEME ============*/
    body.dark-theme{
        --title-color: hsl(230, 48%, 85%);
        --text-color: hsl(230, 16%, 70%);
        --border-color: hsl(230, 12%, 18%);
        --body-color: hsl(230, 12%, 8%);
        --container-color: hsl(230, 12%, 12%);
    }
    
    
    .dark-theme .content{
        background-color: hsl(230, 12%, 8%);
    }
    
    .dark-theme .btnVoltar {
        box-shadow: 0 2px 16px hsla(0, 0%, 0%, .4);
        background-color: rgba(98, 112, 134, 0.406);
    }
    
    .dark-theme .topo{
        box-shadow: 0 2px 16px hsla(0, 0%, 0%, .4);
        background-color: hsl(230, 12%, 12%);
    }
    
    .dark-theme  .select {
        background-color:hsl(235, 12%, 19%);
        color:  hsl(230, 48%, 85%);
    }
    
    .dark-theme .option-list {
        background-color:hsl(235, 12%, 19%);
        color:  hsl(230, 48%, 85%);
    }
    
    .dark-theme .btnbuscar {
        background-color:hsl(235, 12%, 19%);
        color:  hsl(230, 48%, 85%);
    }
    
    
    .dark-theme .searchInput{
        background-color: hsl(235, 12%, 19%);
    }
    
    .dark-theme .searchInput::placeholder {
        color: hsl(230, 48%, 85%);
    }
    
    
    .dark-theme .vizualizados {
        box-shadow: 0 -8px 32px hsla(0, 0%, 0%, .4);
        background-color: hsl(230, 12%, 12%);
    }
    
    .dark-theme .titulo-vizu h2 {
        background-color: hsl(230, 12%, 12%);
        color:  hsl(230, 48%, 85%);
        border: 1px solid #000;
    }
    
    .dark-theme .destaque-vizu h3 {
        background-color: hsl(235, 12%, 19%);
        color: #fff;
    }
    
    .dark-theme .info-vizu {
        color: hsl(230, 48%, 85%);
    }
    
    .dark-theme .info h3 {
        color: hsl(230, 48%, 85%);
    }
    
    .dark-theme .info p {
        color: hsl(230, 48%, 85%);
    }
    
    .dark-theme .info h4 {
        color:#fff ;
    }
    
    .dark-theme .info .btnn {
        background-color:hsl(235, 12%, 19%);
        color: #fff;
    }
    
    .dark-theme .info .btnn:hover {
        background-color: #fff;
        color: #000;
    }
    
    
    .dark-theme .scrollup {
        box-shadow:  0 2px 8px hsla(0, 0%, 0%, .4);
    }
    .dark-theme::-webkit-scrollbar{
        background-color: hsl(230, 16%, 15%);
    }
    .dark-theme::-webkit-scrollbar-thumb{
        background-color: hsl(230, 16%, 25%);
    }
    .dark-theme::-webkit-scrollbar-thumb:hover{
        background-color: hsl(230, 16%, 35%);
    }


    /*============ SEARCH ============*/

.search {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-fixed);
    background-color: hsla(230, 12%, 96%, .6);
    backdrop-filter: blur(16px);
    padding: 8rem 1.5rem;
    transition: top .4s;
}

.search-form {
    display: flex;
    align-items: center;
    column-gap: .5rem;
    background-color: var(--container-color);
    border: 2px solid var(--border-color);
    padding-inline: 1rem;
}
.search-icon {
    font-size: 1.25rem;
    color: var(--title-color);
}

.search-logo {
    font-size: 1.2rem;
    color: var(--title-color);
} 

.search-input {
    width: 100%;
    padding-block: 1rem;
    background-color: var(--container-color);
    color: var(--text-color);
}

.search-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
}

/*============ SHOW SEARCH ============*/

.show-search{
    top: 0;
}


/*============ BEAKPOINTS ============*/


/*SMALL DEVICES*/
@media screen and (max-width: 320px){
    .container{
        margin-inline: 1rem;
    }

    /*TOPO*/

    .search-livraria {
        flex-direction: column;
        align-items: center;
    }

    .topo .searchInput {
        margin-bottom: 10px;
        width: 100%;
    }

    .searchInput::placeholder {
        width: auto;
    }

    .select-menu {
        width: 100%;
    }

    .option-list {
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
        display: none; /* Oculta a lista de opções por padrão */
    }

    .option-list.active {
        display: block;
        height: auto; /* Mostra a lista de opções quando o seletor é clicado */
    }

    .option {
        width: 100%;
    }


    .btnbuscar {
        margin-top: 10px;
        width: 100%;
    }

    /*VIZUALIZADOS*/


    .swiper {
        margin: initial;
    }


    .vizu {
        margin: auto; 
        padding: 5px;       
    }

    .vizu:hover {
        transform:none;
    }

    .img-vizu {
        width: 200px;
        height: 100%;
        }

    .img-vizu img {
        width: 200px;
        height: 300px;
        box-shadow: -4px 7px 10px 2px #00000044;
    }

    .titulo-vizu  {
        width: auto;
        display: flex;
    }
    .titulo-vizu h2  {
        margin: 10px;
    }

    .image {
        width: 300px;
        height: 300px;
        overflow: hidden;
    }
    
    .image img {
        width: 65%;
        height: 100%;
        box-shadow: -4px 7px 10px 2px #00000044;
    }

    .info-vizu p {
        margin-top: auto;
        margin-bottom: 20px;
        height: auto;
    }

    .swiper-wrapper {
        margin-left: 11px;
    }
    
    .swiper-button-next:after {
        font-size: 35px;
        margin-bottom: 100px;
    }
    
    .swiper-button-prev:after {
        font-size: 35px;
        margin-bottom: 100px;
    }

    .column {
        padding: 0;
    }
  
}


/*MEDIUM DEVICES*/
@media screen and (min-width: 450px){

    /*TOPO*/

    .topo {
        margin: 0 auto;
    }

    .topo .searchInput {
        width: 120px;
    }

    .searchInput::placeholder {
        width: auto;
    }

    .select-menu {
        width: 200px;
    }

    .btnbuscar {
        width: 80px;
    }

    /*VIZUALIZADOS*/

    .titulo-vizu {
        width: auto;
    }

    .info-vizu {
        margin-left: 75px ;
        margin-bottom: 25px;
    }

    .info-vizu h3 {
        width: 80%;
    }


    .destaque-vizu {
        margin-left: 75px;
    }

    .img-vizu {
        width: 200px;
        height: 100%;
        margin: 0 auto;
    }

    .img-vizu img {
        width: 200px;
        height: 300px;
        box-shadow: -4px 7px 10px 2px #00000044;
    }

    .swiper-slide {
        width: 100%;
        margin: 0 auto;
        justify-content: center;
    }

    .vizu:hover {
        transform: none;
    }
    
    .swiper-button-next:after {
        font-size: 35px;
        margin-bottom: 100px;
    }
    
    .swiper-button-prev:after {
        font-size: 35px;
        margin-bottom: 100px;
    }
  

}


@media screen and (min-width: 576px) {

    .titulo-vizu {
        width: auto;
    }

    .info-vizu {
        margin-left: 140px ;
        margin-bottom: 25px;
    }

    .info-vizu h3 {
        width: 70%;
    }

    .destaque-vizu {
        margin-left: 140px;
    }

    /*SEARCH*/

    .search-form {
        width: 500px;
        margin-inline: auto;
    }

    .search-close {
        width: max-content;
        top: 3rem;
        left: 0;
        right: 0;
        margin-inline: auto;
    }


}


@media screen and (min-width: 768px) {

    .topo .searchInput {
        width: 20%;
    }

    .swiper-slide {
        width: 100%;
    }
    
    .destaque-vizu {
        margin-left: 60px;
    }


    .info-vizu {
        margin-left: 60px ;
        margin-bottom: 25px;
    }

    .info-vizu h3 {
        width: 85%;
    }


     /*BOOKS-COLUMN*/
    
    .info h3, p {
        margin-left: 42px;
    }

     .image {
        width: 300px;
        height: 300px;
     }
}


@media screen and (min-width: 769px) {
    .swiper-slide {
        width: 50%;
    }
}

/*LARGE DEVICES*/
@media screen and (min-width: 1024px) {


/*BOOKS-COLUMN*/

.image {
    width: 250px;
    height: 280px;
}

.image img {
    width: 70%;
    height: 100%;
}

.destaque-vizu {
    margin-left: 40px;
}


.info-vizu {
    margin-left: 40px ;
    margin-bottom: 25px;
}

.info-vizu h3 {
    width: auto;
}

.info h3 {
    width: 80%;
    margin-left: 27px;
    margin-bottom: 40px;
}

.info p {
    width: 90%;
    margin-left: 27px;
}

}


@media screen and (min-width: 1124px) {
    .destaque-vizu {
        margin-left: 13px;
    }


    .info-vizu {
        margin-left: 13px ;
        margin-bottom: 25px;
    }

    .info-vizu h3 {
        width: auto;
    }

    .swiper-button-prev, .swiper-button-next, .swiper-pagination {
        display: none; 
    }

    .swiper-wrapper {
        touch-action: pan-y; /* Permite deslizamento vertical mas bloqueia horizontal */

        pointer-events: none; /* Desativa eventos de mouse */
    }
}


@media screen and (min-width: 1220px) {

    .content {
        margin-inline: auto;
    }

    .topo {
        margin-inline: 1.5rem;
    }

    
    
    .destaque-vizu {
        margin-left: 20px;
    }


    .info-vizu {
        margin-left: 20px ;
        margin-bottom: 25px;
    }
    
    .info-vizu h3 {
        width: auto;
    }
    
    .image {
        width: 300px;
        height: 350px;
    }

    .info h3 {
        margin-left: 35px;
        margin-bottom: 25px;
    }

    .info p {
        margin-left: 35px;
    }
    
}


@media screen and (min-width: 1280px) {

    .destaque-vizu {
        margin-left: 28px;
    }


    .info-vizu {
        margin-left: 28px ;
        margin-bottom: 25px;
    }

    .info-vizu h3 {
        width: auto;
    }

    .info-vizu p {
        width: auto; 
        margin-left: 0px;
    }

    
}

@media screen and (min-width: 1920px) { 

    .destaque-vizu {
        margin-left: 108px;
    }

    .info-vizu {
        margin-left: 108px ;
        margin-bottom: 25px;
    }

    .info-vizu h3 {
        width: 85%;
    }

    .column {
        flex-basis: 20%;
        padding: 10px;
        margin: 2px 10px;
        text-align: center;
    }

    .image {
        margin: 0 auto;
    }

    .info h3 {
        width: 60%;
        margin-left: 65px;
    }

    .info p {
        width: 60%;
        margin-left: 65px;
    }
}