/* =========================================
RESET
========================================= */

*{
box-sizing:border-box;
margin:0;
padding:0;
}


/* =========================================
BODY
========================================= */

body{
font-family:Helvetica, Arial, sans-serif;
background:#F3EFE6;
color:white;
}


/* =========================================
HEADER
========================================= */

.header{
background:#264336;
height:64px;
position:sticky;
top:0;
z-index:100;
}

.header-inner{
max-width:1400px;
margin:0 auto;
display:grid;
grid-template-columns:1fr auto 1fr;
align-items:center;
padding:0 32px;
height:64px;
}

.header-left,
.header-center,
.header-right{
display:flex;
align-items:center;
}

.header-left{ justify-content:flex-start; }
.header-center{ justify-content:center; }
.header-right{ justify-content:flex-end; gap:20px; }

.logo{
height:32px;
}

.icon{
width:18px;
cursor:pointer;
opacity:.85;
transition:.2s;
}

.icon:hover{
opacity:1;
}


/* =========================================
MENU
========================================= */

.menu{
position:fixed;
top:64px;
left:0;
width:100%;
background:#264336;
display:flex;
flex-direction:column;
padding:20px;
gap:15px;
z-index:99;
}

.menu a{
color:white;
text-decoration:none;
font-size:14px;
letter-spacing:1px;
}

.hidden{
display:none !important;
}


/* =========================================
GRID (HOME)
========================================= */

.grid{
display:grid;
grid-template-columns:repeat(2,1fr);
}

@media (min-width:768px){
.grid{ grid-template-columns:repeat(3,1fr); }
}

@media (min-width:1200px){
.grid{ grid-template-columns:repeat(5,1fr); }
}


/* =========================================
CARD (🔥 mejora sutil)
========================================= */

.card{
min-height:320px;
display:flex;
flex-direction:column;
justify-content:center;
padding:40px;
position:relative;
color:white;
transition:.3s ease;
}

.card:hover{
opacity:.95;
transform:translateY(-2px); /* 🔥 micro interaction */
}

.card img{
width:110px;
margin:0 auto 25px;
}

.author{
font-size:11px;
opacity:.7;
margin-bottom:6px;
}

.title{
font-size:15px;
font-weight:600;
margin-bottom:10px;
}

.price{
position:absolute;
top:25px;
right:25px;
font-size:13px;
}

.category{
font-size:10px;
opacity:.6;
}

.plus{
position:absolute;
bottom:20px;
right:25px;
font-size:20px;
cursor:pointer;
opacity:.7;
transition:.2s;
}

.plus:hover{
opacity:1;
transform:scale(1.1);
}


/* =========================================
PRODUCT PAGE
========================================= */

.product{
padding:40px 20px;
}

.product-image{
display:flex;
justify-content:center;
margin-bottom:30px;
}

.product-image img{
width:70%;
max-width:420px;
}

.product-info{
max-width:420px;
margin:auto;
}

.product-meta{
font-size:11px;
opacity:.7;
margin-bottom:20px;
}

#productAuthor{
font-size:14px;
margin-bottom:6px;
}

#productTitle{
font-size:26px;
margin-bottom:10px;
}

#productPrice{
font-size:18px;
margin-bottom:20px;
}

.product-description{
line-height:1.6;
margin-bottom:30px;
}

.buy-btn{
background:none;
border:none;
font-weight:600;
letter-spacing:1px;
cursor:pointer;
}


/* =========================================
MODAL
========================================= */

.modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.85);
display:flex;
justify-content:center;
align-items:center;
z-index:200;
}

.modal-content{
background:white;
color:black;
padding:30px;
width:320px;
border-radius:4px;
text-align:center;
position:relative;
}

.modal-content input,
.modal-content select{
width:100%;
padding:10px;
margin-top:10px;
}

#checkoutTotal{
margin-top:15px;
font-weight:600;
}


/* =========================================
LIBROS (SEARCH)
========================================= */

.libros-hero{
padding:40px 20px;
text-align:center;
}

.libros-hero input{
width:260px;
padding:12px;
border:none;
margin-right:10px;
}

.libros-hero button{
padding:12px 20px;
background:#264336;
color:white;
border:none;
cursor:pointer;
}

.results-grid{
display:grid;
gap:20px;
padding:20px;
}

.book-card{
background:#264336;
padding:24px;
display:flex;
flex-direction:column;
gap:8px;
}

.book-title{
font-size:16px;
font-weight:600;
}

.book-meta{
font-size:12px;
opacity:.7;
}

.book-price{
font-size:14px;
margin-top:10px;
}

.book-delivery{
font-size:12px;
opacity:.8;
}

.book-btn{
margin-top:12px;
background:white;
color:#264336;
border:none;
padding:10px;
cursor:pointer;
font-weight:600;
}


/* =========================================
ORDER TRACKING
========================================= */

.order-container{
padding:40px 20px;
max-width:600px;
margin:auto;
}

.order-status{
font-size:18px;
margin-bottom:20px;
font-weight:600;
}

.order-timeline{
display:flex;
flex-direction:column;
gap:10px;
margin-bottom:20px;
}

.timeline-step{
opacity:.5;
}

.timeline-step.active{
opacity:1;
font-weight:600;
}

.order-tracking{
font-size:12px;
opacity:.8;
}


/* =========================================
FOOTER (🔥 FIX REAL)
========================================= */

.footer{
padding:40px 20px;
margin-top:60px;
font-size:12px;
letter-spacing:1px;
color:#111; /* 🔥 FIX importante */
}

.footer-links{
display:flex;
justify-content:space-between;
margin-bottom:30px;
}

.footer-links a{
text-decoration:none;
color:#111; /* 🔥 FIX */
opacity:.8;
}

.footer-links a:hover{
opacity:1;
}

.footer-bottom{
display:flex;
justify-content:space-between;
opacity:.6;
color:#111; /* 🔥 FIX */
}

.footer-bottom a{
text-decoration:none;
color:#111; /* 🔥 FIX */
}