/*
Theme Name:   Storefront Eueletronico
Theme URI:    https://br.wordpress.org/themes/storefront/
Description:  Tema filho do Storefront com homepage personalizada do eueletronico-books.
Author:       Fabiano Monteiro
Template:     storefront
Version:      1.0.0
*/

/* ==========================================================================
VARIÁVEIS
========================================================================== */

:root{
--eb-blue:#063e6d;
--eb-blue2:#0756c9;
--eb-orange:#ff5a00;
--eb-cream:#fff8e7;
--eb-bg:#fffdf7;
--eb-text:#18202a;
--eb-muted:#68727d;
--eb-card:#ffffff;
--eb-radius:22px;
}

/* ==========================================================================
BASE
========================================================================== */

*{
box-sizing:border-box;
}

html{
scroll-behavior:smooth;
}

body{
margin:0;
background:var(--eb-bg);
color:var(--eb-text);
font-family:Inter,Arial,Helvetica,sans-serif;
line-height:1.45;
}

a{
color:inherit;
}

/* ==========================================================================
BARRA SUPERIOR
========================================================================== */

.eb-top{
background:var(--eb-blue);
color:#fff;
padding:8px 4%;
font-size:13px;
}

.eb-top-inner{
max-width:1280px;
margin:auto;
display:flex;
justify-content:space-between;
gap:20px;
}

/* ==========================================================================
HEADER
========================================================================== */

.eb-header{
background:rgba(255,253,247,.96);
position:sticky;
top:0;
z-index:30;
border-bottom:1px solid #eee;
}

.home .site-header{
margin-bottom:3px !important;
}

.eb-nav{
max-width:1280px;
margin:auto;
min-height:86px;
padding:12px 4%;
display:flex;
align-items:center;
gap:28px;
}

.eb-logo{
display:flex;
align-items:center;
gap:10px;
text-decoration:none;
min-width:235px;
}

.eb-logo img{
max-height:64px;
width:auto;
}

.eb-logo-text{
font-size:25px;
font-weight:800;
color:var(--eb-blue2);
}

.eb-logo-text span{
color:var(--eb-orange);
}

/* ==========================================================================
MENU
========================================================================== */

.eb-menu{
display:flex;
gap:26px;
align-items:center;
flex:1;
justify-content:center;
}

.eb-menu a{
text-decoration:none;
font-size:15px;
}

.eb-menu a:hover{
color:var(--eb-orange);
}

/* ==========================================================================
BUSCA
========================================================================== */

.eb-search{
display:flex;
align-items:center;
background:#f5eddb;
border-radius:999px;
padding:0 16px;
min-width:205px;
}

.eb-search input{
border:0;
background:transparent;
outline:0;
padding:12px;
width:100%;
}

.eb-cart{
font-size:22px;
text-decoration:none;
position:relative;
}

/* ==========================================================================
CONTEÚDO PRINCIPAL
========================================================================== */

.eb-main{
max-width:1280px;
margin:auto;
padding:0 4% 70px;
}

/* ==========================================================================
HERO / CARROSSEL PRINCIPAL
========================================================================== */

.eb-hero{
position:relative;
overflow:hidden;
border-radius:var(--eb-radius);
box-shadow:0 10px 40px rgba(0,0,0,.08);
background:#f6ead1;
}

.eb-track{
display:flex;
transition:transform .65s ease;
}

.eb-slide{
min-width:100%;
position:relative;
}

.eb-slide img{
width:100%;
display:block;
height:auto;
}

.eb-slide-content{
position:absolute;
left:6%;
top:50%;
transform:translateY(-50%);
max-width:350px;
}

.eb-slide-content h2{
font-size:40px;
margin:0 0 10px;
}

.eb-slide-content p{
font-size:19px;
}

.eb-cta{
display:inline-block;
background:var(--eb-orange);
color:#fff;
padding:12px 20px;
border-radius:11px;
text-decoration:none;
font-weight:700;
}

/* Setas do carrossel principal */

.eb-arrow{
position:absolute;
background:none;
top:50%;
z-index:5;
border:0;
cursor:pointer;
}

.eb-prev{
left:16px;
}

.eb-next{
right:16px;
}

/* Pontos */

.eb-dots{
position:absolute;
bottom:14px;
left:50%;
transform:translateX(-50%);
display:flex;
gap:8px;
z-index:6;
}

.eb-dot{
width:10px;
height:10px;
border:0;
border-radius:50%;
background:#d8d8d8;
padding:0;
cursor:pointer;
}

.eb-dot.active{
background:var(--eb-orange);
}

/* ==========================================================================
BENEFÍCIOS
========================================================================== */

.eb-benefits{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:14px;
margin:34px 0 52px;
}

.eb-benefit{
background:#fff;
border:1px solid #eee5d4;
border-radius:18px;
padding:18px;
display:flex;
gap:12px;
align-items:center;
}

.eb-benefit-icon{
width:42px;
height:42px;
border-radius:50%;
background:var(--eb-cream);
display:grid;
place-items:center;
font-size:21px;
}

.eb-benefit strong{
display:block;
}

.eb-benefit small{
color:var(--eb-muted);
}

/* ==========================================================================
CABEÇALHO DA SEÇÃO DE LIVROS
========================================================================== */

.eb-section-head{
text-align:center;
margin-bottom:24px;
}

.eb-kicker{
color:var(--eb-orange);
font-weight:800;
text-transform:uppercase;
font-size:13px;
letter-spacing:1px;
}

.eb-section-head h2{
font-size:34px;
margin:4px 0;
}

.eb-section-head p{
color:var(--eb-muted);
margin:0;
}

/* ==========================================================================
CARROSSEL DE LIVROS
========================================================================== */

.eb-books-wrap{
position:relative;
width:100%;
}

/* Área onde os livros deslizam */

.eb-books{
display:flex;
gap:18px;
width:100%;

/*
IMPORTANTE:
Antes estava overflow:hidden.
Agora permite rolagem horizontal no celular.
*/
overflow-x:auto;
overflow-y:hidden;

scroll-behavior:smooth;

/*
Melhor desempenho de scroll no iPhone/iPad/Android
*/
-webkit-overflow-scrolling:touch;

/*
Esconde a barra de rolagem no Firefox
*/
scrollbar-width:none;

padding:6px 3px 14px;
}

/* Esconde scrollbar no Chrome/Edge/Safari */

.eb-books::-webkit-scrollbar{
display:none;
}

/* Cada livro */

.eb-book{
flex:0 0 calc(20% - 15px);
min-width:190px;

background:var(--eb-card);
border:1px solid #e9e3d7;
border-radius:16px;
overflow:hidden;
box-shadow:0 5px 18px rgba(0,0,0,.05);
}

/* Imagem */

.eb-book-img{
display:block;
aspect-ratio:3/4;
background:#f4efdf;
overflow:hidden;
}

.eb-book-img img{
width:100%;
height:100%;
object-fit:cover;
display:block;
}

/* Corpo */

.eb-book-body{
padding:13px;
}

.eb-book-title-price{
min-height:18%;
padding:3px;
}

.eb-book-title{
font-weight:500;
font-size:11px;
}

.eb-book-author{
color:var(--eb-muted);
font-size:13px;
}

/* Parte inferior */

.eb-book-bottom{
display:flex;
justify-content:space-between;
align-items:center;
margin-top:12px;
}

.eb-price{
font-weight:700;
color:var(--eb-blue);
}

.eb-book-link{
border:1px solid var(--eb-orange);
color:var(--eb-orange);
width:34px;
height:34px;
border-radius:50%;
display:grid;
place-items:center;
text-decoration:none;
}

/* ==========================================================================
SETAS DO CARROSSEL DE LIVROS
========================================================================== */

.eb-books-arrow{
position:absolute;
background:#fff;
top:50%;
transform:translateY(-50%);
width:40px;
height:40px;
border:0;
border-radius:50%;
box-shadow:0 4px 16px rgba(0,0,0,.15);
cursor:pointer;
z-index:5;
font-size:22px;
display:flex;
align-items:center;
justify-content:center;
}

.eb-books-prev{
left:-17px;
}

.eb-books-next{
right:-17px;
}

/* ==========================================================================
BOTÃO VER TODOS
========================================================================== */

.eb-all{
text-align:center;
margin-top:24px;
}

.eb-all a{
display:inline-block;
background:var(--eb-orange);
color:#fff;
text-decoration:none;
padding:12px 24px;
border-radius:10px;
font-weight:800;
}

/* ==========================================================================
FOOTER
========================================================================== */

.eb-footer{
background:#fff2d6;
border-top:1px solid #eadfc9;
}

.eb-footer-inner{
max-width:1280px;
margin:auto;
padding:38px 4%;
display:grid;
grid-template-columns:2fr 1fr 1fr 1.4fr;
gap:32px;
}

.eb-footer h3{
margin-top:0;
}

.eb-footer a{
text-decoration:none;
}

.eb-footer ul{
padding:0;
margin:0;
list-style:none;
display:grid;
gap:7px;
color:#59616a;
}

.eb-footer-brand{
font-size:24px;
font-weight:900;
color:var(--eb-blue2);
}

.eb-footer-brand span{
color:var(--eb-orange);
}

.eb-bottom{
background:var(--eb-blue);
color:#fff;
padding:12px 4%;
font-size:13px;
}

.eb-bottom-inner{
max-width:1280px;
margin:auto;
display:flex;
justify-content:space-between;
}

/* ==========================================================================
TABLET
========================================================================== */

@media(max-width:1000px){

.eb-menu{
display:none;
}

.eb-nav{
justify-content:space-between;
}

.eb-search{
min-width:180px;
}

.eb-benefits{
grid-template-columns:repeat(2,1fr);
}

/*
3 livros por vez aproximadamente
*/
.eb-book{
flex:0 0 calc(33.333% - 12px);
min-width:0;
}

.eb-footer-inner{
grid-template-columns:repeat(2,1fr);
}

}

/* ==========================================================================
MOBILE
========================================================================== */

@media(max-width:650px){

.eb-top-inner{
font-size:11px;
}

.eb-top-inner span:last-child{
display:none;
}

/* Header */

.eb-nav{
min-height:68px;
padding:8px 4%;
}

.eb-logo{
min-width:auto;
}

.eb-logo img{
max-height:50px;
}

.eb-logo-text{
font-size:19px;
}

.eb-search{
display:none;
}

/* Conteúdo */

.eb-main{
padding-top:0;
}

.eb-hero{
border-radius:15px;
}

/* Setas hero */

.eb-arrow{
width:34px;
height:34px;
font-size:18px;
}

/* Benefícios */

.eb-benefits{
grid-template-columns:1fr;
margin-bottom:38px;
}

/* Título */

.eb-section-head h2{
font-size:28px;
}



/* ==========================================================================
   CARROSSEL DE LIVROS
   ========================================================================== */

.eb-books-wrap {
	position: relative;
	width: 100%;
	min-width: 0;
}

.eb-books {
	display: flex;
	flex-wrap: nowrap;
	gap: 18px;

	width: 100%;
	min-width: 0;

	overflow-x: auto;
	overflow-y: hidden;

	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;

	/* Permite gesto horizontal no celular */
	touch-action: pan-x;

	/* Impede seleção acidental durante o arraste */
	user-select: none;
	-webkit-user-select: none;

	/* Esconde barra */
	scrollbar-width: none;

	padding: 6px 3px 14px;

	cursor: grab;
}

.eb-books::-webkit-scrollbar {
	display: none;
}

.eb-books.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.eb-book {
	flex: 0 0 calc(20% - 15px);
	min-width: 190px;

	box-sizing: border-box;

	overflow: hidden;
}

/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1000px) {

	.eb-books {
		gap: 15px;
	}

	.eb-book {
		flex: 0 0 calc(33.333% - 10px);
		min-width: 0;
	}

}

@media (max-width: 768px) {
    

	.eb-books {
		gap: 15px;
	}

	.eb-book {
		flex: 0 0 calc(33.333% - 10px);
		min-width: 0;
	}

}



/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 650px) {

	.eb-books-wrap {
		width: 100%;
		overflow: visible;
	}

	.eb-books {
		display: flex;
		flex-wrap: nowrap;

		width: 100%;

		gap: 12px;

		overflow-x: auto;
		overflow-y: hidden;

		-webkit-overflow-scrolling: touch;

		touch-action: pan-x;

		scroll-snap-type: x proximity;

		padding: 6px 10px 18px;

		cursor: grab;

		user-select: none;
		-webkit-user-select: none;
	}

	.eb-books.is-dragging {
		cursor: grabbing;
		scroll-behavior: auto;
	}

	.eb-book {
		flex: 0 0 78%;
		min-width: 0;

		scroll-snap-align: start;

		-webkit-user-drag: none;
	}

	.eb-book img {
		-webkit-user-drag: none;
		user-drag: none;
	}

	.eb-books-arrow {
		display: none !important;
	}

}
