*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Arial, Helvetica, sans-serif;
}

body{
background:#f5f7fb;
color:#333;
line-height:1.6;
}

/* HEADER */

.header{
background:#1e293b;
color:white;
padding:20px;
box-shadow:0 3px 10px rgba(0,0,0,0.2);
display:flex;
justify-content:space-between;
align-items:center;
}

.header__title{
text-shadow:2px 2px 5px rgba(0,0,0,0.5);
}

/* NAV */

.nav__list{
display:flex;
justify-content:flex-end;
gap:20px;
list-style:none;
}

.nav a{
color:white;
text-decoration:none;
font-weight:bold;
}

/* TITULOS */

.section-title{
text-align:center;
margin:40px 0 20px;
font-size:2rem;
color:#1e293b;
}

/* PRODUCTOS (FLEXBOX) */

.products{
padding:40px 20px;
background:#f8fafc;
}

.products__subtitle{
text-align:center;
color:#64748b;
margin-top:-10px;
margin-bottom:30px;
font-size:1.1rem;
}

.products__container{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
gap:30px;
max-width:1400px;
margin:0 auto;
padding:20px;
}

.product{
background:white;
border-radius:12px;
overflow:hidden;
text-align:center;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
transition:transform .3s, box-shadow .3s;
position:relative;
display:flex;
flex-direction:column;
}

.product:hover{
transform:translateY(-8px);
box-shadow:0 8px 25px rgba(0,0,0,0.15);
}

.product__badge{
position:absolute;
top:15px;
right:15px;
background:#ef4444;
color:white;
padding:5px 12px;
border-radius:20px;
font-size:0.75rem;
font-weight:bold;
z-index:10;
}

.product__badge--new{
background:#10b981;
}

.product__badge--sale{
background:#f59e0b;
}

.product img{
width:100%;
height:220px;
object-fit:cover;
}

.product__info{
padding:20px;
display:flex;
flex-direction:column;
flex-grow:1;
}

.product__info h3{
color:#1e293b;
margin-bottom:10px;
font-size:1.2rem;
}

.product__description{
color:#64748b;
font-size:0.9rem;
line-height:1.5;
margin-bottom:12px;
flex-grow:1;
}

.product__rating{
color:#fbbf24;
font-size:1rem;
margin-bottom:10px;
letter-spacing:2px;
}

.product__price{
font-size:1.5rem;
font-weight:bold;
color:#1e293b;
margin-bottom:15px;
}

.product__price--old{
font-size:1rem;
color:#94a3b8;
text-decoration:line-through;
font-weight:normal;
margin-right:8px;
}

.product__btn{
padding:12px 24px;
background:#2563eb;
color:white;
border:none;
border-radius:8px;
cursor:pointer;
font-weight:bold;
font-size:0.95rem;
transition:background .3s, transform .2s;
}

.product__btn:hover{
background:#1e40af;
transform:scale(1.05);
}

/* GALERIA (GRID) */

.gallery{
padding:40px;
display:grid;
justify-items:center;
gap:20px;
}

.gallery__viewer img{
width:100%;
max-width:600px;
border-radius:10px;
box-shadow:0 4px 10px rgba(0,0,0,0.2);
}

.gallery__controls button{
padding:10px 15px;
margin:5px;
border:none;
background:#1e40af;
color:white;
border-radius:5px;
cursor:pointer;
}

/* FORM */

.contact{
padding:40px;
}

.form{
max-width:500px;
margin:auto;
display:flex;
flex-direction:column;
gap:10px;
}

.form input,
.form textarea{
padding:10px;
border-radius:6px;
border:1px solid #ccc;
}

.form button{
padding:10px;
background:#16a34a;
color:white;
border:none;
border-radius:6px;
cursor:pointer;
}

#formMessage{
margin-top:10px;
font-weight:bold;
}

/* FOOTER */

.footer{
background:#1e293b;
color:white;
text-align:center;
padding:20px;
margin-top:40px;
}

/* BLOG SECTION (INDEX) */

.blog{
padding:40px 20px;
background:#fff;
}

.blog__container{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
gap:30px;
max-width:1200px;
margin:0 auto 30px;
}

.blog-card{
background:white;
border-radius:10px;
overflow:hidden;
box-shadow:0 4px 15px rgba(0,0,0,0.1);
transition:transform .3s, box-shadow .3s;
}

.blog-card:hover{
transform:translateY(-5px);
box-shadow:0 8px 20px rgba(0,0,0,0.15);
}

.blog-card img{
width:100%;
height:200px;
object-fit:cover;
}

.blog-card__content{
padding:20px;
}

.blog-card__date{
color:#64748b;
font-size:0.85rem;
display:block;
margin-bottom:8px;
}

.blog-card__title{
color:#1e293b;
margin-bottom:10px;
font-size:1.3rem;
}

.blog-card__excerpt{
color:#475569;
line-height:1.6;
margin-bottom:15px;
}

.blog-card__link{
color:#2563eb;
text-decoration:none;
font-weight:bold;
transition:color .3s;
}

.blog-card__link:hover{
color:#1e40af;
}

.blog__cta{
text-align:center;
margin-top:20px;
}

.btn-primary{
display:inline-block;
padding:12px 30px;
background:#2563eb;
color:white;
text-decoration:none;
border-radius:8px;
font-weight:bold;
transition:background .3s;
}

.btn-primary:hover{
background:#1e40af;
}

/* BLOG PAGE */

.blog-page{
max-width:1400px;
margin:0 auto;
padding:20px;
display:grid;
grid-template-columns:1fr;
gap:40px;
}

.blog-page__header{
text-align:center;
padding:40px 20px;
background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color:white;
border-radius:10px;
margin-bottom:20px;
}

.blog-page__header h1{
font-size:2.5rem;
margin-bottom:10px;
}

.blog-page__header p{
font-size:1.2rem;
opacity:0.9;
}

.blog-page__container{
display:flex;
flex-direction:column;
gap:40px;
}

.blog-post{
background:white;
border-radius:12px;
overflow:hidden;
box-shadow:0 4px 20px rgba(0,0,0,0.08);
}

.blog-post--featured{
border:3px solid #667eea;
}

.blog-post__image{
width:100%;
height:400px;
object-fit:cover;
}

.blog-post__content{
padding:30px;
}

.blog-post__category{
display:inline-block;
background:#667eea;
color:white;
padding:5px 15px;
border-radius:20px;
font-size:0.85rem;
font-weight:bold;
margin-right:10px;
}

.blog-post__date{
color:#64748b;
font-size:0.9rem;
}

.blog-post__title{
font-size:2rem;
color:#1e293b;
margin:20px 0;
line-height:1.3;
}

.blog-post__text{
color:#334155;
line-height:1.8;
font-size:1.05rem;
}

.blog-post__text h3{
color:#1e293b;
margin-top:25px;
margin-bottom:15px;
font-size:1.4rem;
}

.blog-post__text p{
margin-bottom:15px;
}

.blog-post__footer{
display:flex;
justify-content:space-between;
align-items:center;
padding-top:20px;
margin-top:20px;
border-top:2px solid #e2e8f0;
}

.blog-post__author{
color:#64748b;
font-style:italic;
}

.share-btn{
padding:8px 20px;
background:#10b981;
color:white;
border:none;
border-radius:6px;
cursor:pointer;
font-weight:bold;
transition:background .3s;
}

.share-btn:hover{
background:#059669;
}

/* BLOG SIDEBAR */

.blog-sidebar{
display:none;
}

@media (min-width:1024px){
.blog-page{
grid-template-columns:1fr 300px;
grid-template-rows:auto auto;
}

.blog-page__header{
grid-column:1 / -1;
}

.blog-page__container{
grid-column:1;
}

.blog-sidebar{
display:block;
grid-column:2;
grid-row:2;
position:sticky;
top:20px;
height:fit-content;
}

.sidebar-widget{
background:white;
padding:20px;
border-radius:10px;
box-shadow:0 4px 15px rgba(0,0,0,0.08);
margin-bottom:20px;
}

.sidebar-widget h3{
color:#1e293b;
margin-bottom:15px;
font-size:1.2rem;
border-bottom:2px solid #667eea;
padding-bottom:10px;
}

.category-list,
.popular-list{
list-style:none;
}

.category-list li,
.popular-list li{
margin-bottom:10px;
}

.category-list a,
.popular-list a{
color:#475569;
text-decoration:none;
transition:color .3s;
}

.category-list a:hover,
.popular-list a:hover{
color:#667eea;
}

.newsletter-form{
display:flex;
flex-direction:column;
gap:10px;
margin-top:15px;
}

.newsletter-form input{
padding:10px;
border:1px solid #cbd5e1;
border-radius:6px;
}

.newsletter-form button{
padding:10px;
background:#667eea;
color:white;
border:none;
border-radius:6px;
cursor:pointer;
font-weight:bold;
transition:background .3s;
}

.newsletter-form button:hover{
background:#5568d3;
}
}

/* RESPONSIVE */

@media (max-width:768px){

.header{
flex-direction:column;
gap:15px;
}

.nav__list{
flex-direction:column;
gap:10px;
}

.products__container{
grid-template-columns:1fr;
padding:10px;
}

.product img{
height:200px;
}

.blog__container{
grid-template-columns:1fr;
}

.blog-post__image{
height:250px;
}

.blog-post__content{
padding:20px;
}

.blog-post__title{
font-size:1.5rem;
}

.blog-post__footer{
flex-direction:column;
gap:15px;
align-items:flex-start;
}

.blog-page__header h1{
font-size:1.8rem;
}

}

/* MODAL PRODUCTO */

.modal{
display:none;
position:fixed;
z-index:1000;
left:0;
top:0;
width:100%;
height:100%;
overflow:auto;
background-color:rgba(0,0,0,0.6);
animation:fadeIn 0.3s;
}

@keyframes fadeIn{
from{ opacity:0; }
to{ opacity:1; }
}

.modal--active{
display:flex;
align-items:center;
justify-content:center;
}

.modal__content{
background:white;
margin:auto;
padding:0;
border-radius:15px;
width:90%;
max-width:800px;
box-shadow:0 10px 40px rgba(0,0,0,0.3);
animation:slideDown 0.3s;
position:relative;
}

@keyframes slideDown{
from{
transform:translateY(-50px);
opacity:0;
}
to{
transform:translateY(0);
opacity:1;
}
}

.modal__close{
position:absolute;
right:20px;
top:15px;
color:#64748b;
font-size:35px;
font-weight:bold;
cursor:pointer;
z-index:10;
transition:color .3s;
}

.modal__close:hover,
.modal__close:focus{
color:#ef4444;
}

.modal__body{
display:flex;
gap:30px;
padding:30px;
}

.modal__image{
width:50%;
height:400px;
object-fit:cover;
border-radius:10px;
}

.modal__info{
width:50%;
display:flex;
flex-direction:column;
gap:15px;
}

.modal__info h2{
color:#1e293b;
font-size:1.8rem;
margin-bottom:5px;
}

.modal__rating{
color:#fbbf24;
font-size:1.2rem;
letter-spacing:2px;
}

.modal__description{
color:#475569;
line-height:1.6;
flex-grow:1;
}

.modal__price{
font-size:2rem;
font-weight:bold;
color:#2563eb;
}

.modal__quantity{
display:flex;
align-items:center;
gap:10px;
margin:10px 0;
}

.modal__quantity label{
font-weight:bold;
color:#1e293b;
}

.modal__quantity input{
width:80px;
padding:8px;
border:2px solid #cbd5e1;
border-radius:6px;
font-size:1rem;
text-align:center;
}

.modal__btn{
width:100%;
padding:15px;
background:#10b981;
color:white;
border:none;
border-radius:8px;
font-size:1.1rem;
font-weight:bold;
cursor:pointer;
transition:background .3s, transform .2s;
}

.modal__btn:hover{
background:#059669;
transform:scale(1.02);
}

.modal__message{
text-align:center;
font-weight:bold;
margin-top:10px;
min-height:20px;
}

@media (max-width:768px){
.modal__content{
width:95%;
margin:20px auto;
}

.modal__body{
flex-direction:column;
padding:20px;
}

.modal__image,
.modal__info{
width:100%;
}

.modal__image{
height:300px;
}

.modal__close{
right:15px;
top:10px;
font-size:30px;
}
}