/* RESET */

*{
box-sizing:border-box;
}

body{
margin:0;
font-family:Arial,Helvetica,sans-serif;
background:#f6f7fb;
transition:.3s;
overflow-x:hidden;
}

img{
max-width:100%;
height:auto;
display:block;
}

/* DARK MODE */

.dark{
background:#111;
color:white;
}
/* FIX REVIEW KHÔNG BỊ CHỮ TRẮNG */

.dark .reviews{
background:#1a1a1a;
color:#eee;
}

.dark .review-item{
background:#222;
color:#eee;
}

.dark .review-text{
color:#ddd;
}

/* TOPBAR */

.topbar{
background:linear-gradient(90deg,#ff512f,#dd2476);
color:white;
text-align:center;
padding:10px;
font-weight:bold;
font-size:14px;
}

/* HEADER */

header{
display:flex;
justify-content:space-between;
align-items:center;
padding:12px 15px;
background:white;
box-shadow:0 2px 10px rgba(0,0,0,0.1);
flex-wrap:wrap;
}

.dark header{
background:#1c1c1c;
}

.logo{
font-weight:bold;
font-size:18px;
}

.viewers{
font-size:14px;
}

/* ORDER BAR */

.order-bar{
width:100%;
background:#fff3cd;
padding:8px;
font-size:13px;
margin-bottom:5px;
}

/* HERO */

.hero{
padding:20px;
max-width:450px;
margin:auto;
}

.hero-text{
flex:1;
min-width:250px;
}

.hero img{
max-width:380px;
border-radius:10px;
}

.price{
margin:15px 0;
}

.old{
text-decoration:line-through;
color:#999;
margin-right:10px;
}

.new{
color:red;
font-size:28px;
font-weight:bold;
}

/* BUTTON */

button{
background:linear-gradient(90deg,#ff512f,#ff7b00);
border:none;
padding:14px 26px;
color:white;
font-size:17px;
border-radius:8px;
cursor:pointer;
}

/* STOCK */

.stock-bar{
background:#ffe5e5;
color:#d80000;
padding:10px;
text-align:center;
font-weight:bold;
border-radius:6px;
margin-bottom:10px;
}

/* SOLD BAR */

.sold-bar{
background:#fff3cd;
border:1px solid #ffeeba;
padding:10px;
text-align:center;
font-weight:bold;
margin:15px 0;
border-radius:6px;
color:#856404;
}

/* FEATURES */

.features{
padding:30px 20px;
}

.grid{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:12px;
}

.card{
background:#f4f6fb;
padding:15px;
border-radius:8px;
font-size:14px;
}

/* GALLERY */

.gallery{
padding:30px 20px;
}

.gallery-grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:8px;
margin-bottom:20px;
}

.slider{
position:relative;
}

.slide{
display:none;
width:100%;
border-radius:10px;
}

.slide.active{
display:block;
}

/* REVIEWS */

.reviews{
padding:30px 20px;
background:#f7f7f7;
}

.review-summary{
display:flex;
flex-wrap:wrap;
gap:20px;
background:white;
padding:20px;
border:1px solid #ffd6c9;
}

.rating-score{
text-align:center;
}

.score{
font-size:28px;
color:#ff5722;
font-weight:bold;
}

.stars{
color:#ffc107;
font-size:18px;
}


.review-item{
display:flex;
margin-top:20px;
background:white;
padding:15px;
border-radius:6px;
color:#222;
}

.avatar{
width:45px;
height:45px;
border-radius:50%;
margin-right:10px;
}

.review-text{
margin:10px 0;
font-size:14px;
color:#333;
line-height:1.5;
}

.review-img{
width:120px;
border-radius:6px;
}

/* ORDER FORM */

.order{
display:flex;
justify-content:center;
padding:40px 20px;
}

.order-box{
width:100%;
max-width:420px;
background:linear-gradient(180deg,#5dc1c4,#46b6b9);
padding:25px;
border-radius:18px;
border:4px solid #1b9fa2;
text-align:center;
color:white;
}

.discount{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:10px;
}

.sale{
font-weight:bold;
font-size:20px;
}

.sale span{
color:red;
font-size:32px;
}

.price-tag{
background:#ffb347;
padding:6px 14px;
border-radius:20px;
font-weight:bold;
}

.order-box h2{
margin:15px 0;
font-size:22px;
}

.order-box input,
.order-box textarea{
width:100%;
padding:12px;
border-radius:10px;
border:none;
margin-bottom:12px;
font-size:14px;
}

.product-options{
background:#ffffff;
padding:10px;
border-radius:12px;
color:black;
text-align:left;
margin-bottom:10px;
font-size:14px;
}

.product-options label{
display:block;
margin:6px 0;
}

.order-btn{
width:100%;
padding:14px;
background:linear-gradient(90deg,#f6c86e,#f08b2c);
border:none;
border-radius:30px;
font-size:18px;
font-weight:bold;
color:white;
cursor:pointer;
box-shadow:0 4px 10px rgba(0,0,0,0.2);
}


/* DARK BUTTON */

#darkToggle{
position:fixed;
right:20px;
bottom:90px;
font-size:20px;
background:black;
color:white;
padding:10px;
border-radius:50%;
}

/* DISCOUNT POPUP */

#discount-popup{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.5);
display:none;
align-items:center;
justify-content:center;
z-index:999;
}

.popup-box{
background:white;
padding:30px;
border-radius:12px;
text-align:center;
position:relative;
max-width:320px;
width:90%;
}

.close-popup{
position:absolute;
top:10px;
right:15px;
cursor:pointer;
font-size:18px;
}

/* PROMO POPUP */

.promo-popup{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.6);
display:flex;
align-items:center;
justify-content:center;
z-index:999;
animation:fadeIn .4s;
}

.promo-box{
background:white;
padding:30px;
border-radius:12px;
text-align:center;
animation:popup .4s;
position:relative;
max-width:320px;
width:90%;
}

.close-btn{
position:absolute;
top:10px;
right:15px;
cursor:pointer;
}

/* MOBILE OPTIMIZE */

@media (max-width:768px){

.hero{
flex-direction:column;
text-align:center;
}

.hero img{
max-width:100%;
}

.grid{
grid-template-columns:1fr 1fr;
}

.gallery-grid{
grid-template-columns:repeat(2,1fr);
}

.review-item{
flex-direction:column;
}

.review-img{
width:100%;
}

}

/* ANIMATION */

@keyframes popup{
from{transform:scale(.6)}
to{transform:scale(1)}
}

@keyframes fadeIn{
from{opacity:0}
to{opacity:1}
}

/* MOBILE BUY BAR */

.mobile-buy{

position:fixed;
bottom:0;
left:0;

width:100%;

background:white;

display:flex;

justify-content:space-between;

align-items:center;

padding:10px 15px;

box-shadow:0 -2px 10px rgba(0,0,0,0.2);

z-index:999;

}

.mobile-buy button{

padding:12px 20px;

font-size:16px;

}

.mobile-price .old{

font-size:14px;

}

.mobile-price .new{

font-size:20px;

color:red;

font-weight:bold;

}
/* ORDER TOAST */

#order-toast{

position:fixed;

left:20px;

bottom:140px;

background:white;

padding:12px 16px;

border-radius:10px;

box-shadow:0 0 10px rgba(0,0,0,0.2);

display:none;

z-index:999;

}

.policy{

padding:40px 20px;

background:#ffffff;

}

.policy h2{

text-align:center;

margin-bottom:25px;

}

.policy-grid{

display:grid;

grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

gap:20px;

}

.policy-item{

background:#f6f7fb;

padding:20px;

border-radius:10px;

box-shadow:0 2px 8px rgba(0,0,0,0.08);

}

.policy-item h3{

margin-bottom:8px;

color:#ff5722;

}

.policy-item p{

font-size:14px;

line-height:1.6;

}

.footer{

background:#111;

color:white;

text-align:center;

padding:25px;

font-size:14px;

}


#buyer-popup strong{

display:block;

font-size:15px;

color:#222;

}

#buyer-popup p{

margin:3px 0 0 0;

color:#666;

}

@keyframes popupSlide{

from{

transform:translateY(30px);
opacity:0;

}

to{

transform:translateY(0);
opacity:1;

}

}

.rating-bars{

margin-top:15px;
width:100%;

}

.bar-row{

display:flex;
align-items:center;
gap:10px;
margin:6px 0;

}
.bar-row span{
min-width:30px;
font-size:14px;
color:#333;
}

.bar{

flex:1;
height:8px;
background:#eee;
border-radius:10px;
overflow:hidden;

}

.fill{

height:100%;
background:linear-gradient(90deg,#ff7b00,#ff512f);

border-radius:10px;

}

.review-filter button{

margin:5px;
padding:6px 12px;
border:1px solid #ddd;
background:white;
cursor:pointer;
font-size:13px;
color:#333;

}

.review-filter .active{

border-color:#ff5722;
color:#ff5722;

}


/* PRODUCT GALLERY */

.product-gallery{
max-width:420px;
margin:auto;
}

.main-image img{
width:100%;
border-radius:12px;
box-shadow:0 5px 20px rgba(0,0,0,0.1);
}

.thumb-list{
display:flex;
gap:8px;
margin-top:10px;
overflow-x:auto;
}

.thumb-list img{
width:70px;
height:70px;
object-fit:cover;
border-radius:8px;
cursor:pointer;
border:2px solid transparent;
transition:.2s;
}

.thumb-list img:hover{
border:2px solid #ff5722;
}

.product-info{
background:#fff;
padding:20px;
border-radius:10px;
margin:20px 0;
}

.product-title{
font-size:20px;
line-height:1.4;
}

.hot{
background:#ff9800;
color:white;
padding:4px 8px;
border-radius:6px;
margin-right:6px;
font-size:12px;
}

.rating{
margin-top:8px;
font-size:14px;
display:flex;
gap:10px;
align-items:center;
flex-wrap:wrap;
}

.score{
color:#ff5722;
font-weight:bold;
}

.stars{
color:#ffc107;
}

.reviews{
color:#0066cc;
}

.sold{
color:#666;
}

.price-box{
display:flex;
margin-top:12px;
border:2px solid #ff0000;
}

.price-left{
background:#ff0000;
color:white;
padding:10px;
flex:1;
}

.new-price{
font-size:28px;
font-weight:bold;
}

.old-price{
font-size:14px;
text-decoration:line-through;
}

.save{
display:block;
font-size:12px;
background:#ff5722;
padding:2px 6px;
margin-top:4px;
width:fit-content;
}

.flash-sale{
background:#ffd54f;
padding:10px;
text-align:center;
font-weight:bold;
min-width:150px;
}

.countdown{
margin-top:5px;
font-size:18px;
background:white;
padding:4px 6px;
display:inline-block;
}

.cheap-box{
background:#f1e5ea;
padding:10px;
display:flex;
gap:10px;
align-items:center;
margin-top:10px;
}

.cheap-badge{
background:#ff5722;
color:white;
padding:6px 10px;
border-radius:4px;
font-size:12px;
}

.product-desc{
margin-top:12px;
font-size:14px;
line-height:1.6;
}

.free-ship{
margin-top:10px;
background:#e0f7fa;
padding:8px;
border-radius:6px;
color:#ff5722;
font-weight:bold;
}

.product-video{
text-align:center;
margin:40px 0;
}

.video-box{
max-width:420px;
margin:auto;
border:3px solid #222;
padding:5px;
background:#fff;
}

.video-box video{
width:100%;
height:auto;
display:block;
}

.product-video h3{
margin-top:10px;
color:#ff9800;
font-size:22px;
font-weight:bold;
}

#buyer-popup{

position:fixed;
bottom:90px;
left:20px;

background:white;

padding:12px 16px;

border-radius:12px;

box-shadow:0 6px 20px rgba(0,0,0,0.15);

display:none;

font-size:14px;

z-index:999;

transform:translateY(40px);
opacity:0;

transition:all .5s ease;

}

#buyer-popup.show{

display:block;
transform:translateY(0);
opacity:1;

}

#buyer-popup strong{

display:block;
font-size:15px;

}

#buyer-popup span{

font-size:12px;
color:#888;
display:block;
margin-top:2px;

}
.order-bar{
width:100%;
order:-1;
}
.product-gallery{
max-width:420px;
margin:auto;
}
