/* RESET TẬN GỐC */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
body{
    background: #fff7f2;
}
/* Thanh trên cùng */
.top-bar{
    background:#ff914d;
    color:white;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 10%;
    font-size:16px;
}

.top-left{
    display:flex;
    gap:10px;
    align-items:center;
}

.top-right a{
    color:#003cff;
    text-decoration:none;
    font-weight:bold;
    margin:0 5px;
}

.top-right a:hover{
    text-decoration:underline;
}
/* TRANG ĐĂNG NHẬP*/

.login-page{
    min-height:80vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:50px 20px;
}

.login-box{
    width:400px;
    background:white;
    padding:40px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,0.1);
    text-align:center;
}

.login-logo{
    width:120px;
    margin-bottom:20px;
}

.login-box h2{
    color:#ff914d;
    margin-bottom:25px;
}

.login-box input{
    width:100%;
    padding:14px;
    margin-bottom:15px;
    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
    font-size:15px;
}

.login-box input:focus{
    border-color:#ff914d;
}

.login-btn{
    width:100%;
    background:#ff914d;
    color:white;
    border:none;
    padding:14px;
    border-radius:25px;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:0.3s;
}

.login-btn:hover{
    background:#e07f3d;
}

.login-text{
    margin-top:20px;
}

.login-text a{
    color:#ff914d;
    text-decoration:none;
    font-weight:bold;
}
/* HEADER */
.header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 50px;
    background: white;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    gap: 15px;
}
.logo img{
    width: 120px;
}
/* INFO */
.info-box{
    display: flex;
    align-items: center;
    gap: 10px;
    color: black;
}
.info-box img{
    width: 35px;
}
/* CART */
.cart-btn{
    background: #ff914d;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;	
}

.cart-btn:hover{
    transform: scale(1.05);
    background: #e07f3d;
}
/* MENU */
.menu{
    background: #ff914d;
}
.menu > ul{
    display: flex;
    list-style: none;
    justify-content: center;
	align-items: center; 
    gap: 20px; 
    flex-wrap: nowrap;
}
.menu ul li a{
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}
.menu ul li a:hover{
    background: #ffb380;
}
/* MENU DROPDOWN */

.menu ul li{
    position:relative;
}

/* SUBMENU */
.submenu{
    position:absolute;
    top:100%;
    left:0;
    background:white;
    width:250px;
    display:none;
    list-style:none;
    box-shadow:0 5px 10px rgba(0,0,0,0.2);
    z-index:999;
	flex-direction: column;
}
.submenu li{
    width:100%;
}
.has-submenu{
    position: relative;
}

/* LINK SUBMENU */

.submenu li a{
    color:black !important;
    padding:15px 20px !important;
    display:block;
    border-bottom:1px solid #eee;
    background:white;
}

/* HOVER */
.submenu li a:hover{
    background:#f5f5f5;
    color:#ff914d !important;
}

/* HIỆN MENU */
.has-submenu:hover > .submenu{
    display:block;
}

/* BANNER */
.banner{
    height: 400px;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/banner.jpg');
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffe082;
    text-align: center;
    padding: 20px;
}

.banner h1{
    font-size: 45px;
    color: #ffe082;
    margin-bottom: 10px;
}

.banner button{
    margin-top: 15px;
    padding: 12px 25px;
    border: none;
    background: #ff914d;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.banner button:hover{
    background: #e07f3d;
}

/* KHU VỰC SẢN PHẨM (GIỐNG FORM MẪU) */
.cate {
    padding: 60px 50px;
    max-width: 1300px;
    margin: 0 auto;
}

.cate-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 26px;
    color: #333;
    font-weight: bold;
    letter-spacing: 1px;
}

/* GRID SẢN PHẨM DÀN HÀNG NGANG */
.list-product {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center; 
}

/* TỪNG Ô SẢN PHẨM (CARD) */
.product {
    background: white;
    border-radius: 15px;
    padding: 20px;
    width: calc(25% - 18px);
    min-width: 250px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}



/* HÌNH ẢNH SẢN PHẨM */
.product .photo {
    width: 100%;
    height: 200px;
    object-fit: contain; 
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: #f9f9f9; 
}

/* TÊN SẢN PHẨM */
.product .name {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.4;
}

/* GIÁ SẢN PHẨM */
.product .price {
    display: block;
    color: #ff914d; 
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

/* NÚT THÊM VÀO GIỎ */
.product button {
    background: #ff914d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
    width: 100%;
}

.product button:hover {
    background: #e07f3d;
}

/* FOOTER */
.footer{
    background: #ff914d;
    color: white;
    padding: 50px 50px 20px 50px;
    margin-top: 50px;
}

.footer-container{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-box{
    flex: 1;
    min-width: 220px;
}
.footer-box h3 {
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}
.footer-box p, .footer-box a {
    font-size: 14px;
    line-height: 1.8;
}
.footer-box a{
    display: block;
    color: white;
    text-decoration: none;
    transition: 0.2s;
}
.footer-box a:hover{
    color: #ffe082;
    padding-left: 5px;
}
.hotline{
    color: white;
    background: aqua;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}
.socials a {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 8px;
    font-weight: bold;
}
.socials a:hover {
    background: white;
    color: #ff914d;
}
.copyright{
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 20px;
    font-size: 14px;
}
/* TRANG CHI TIẾT DANH MỤC SẢN PHẨM */
.intro-product{
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    line-height: 1.8;
}
.intro-product h2{
    color: #ff914d;
    margin-bottom: 15px;
    text-align: center;
}

.intro-product p{
    color: #555;
    text-align: justify;
}

.back-home{
    display: inline-block;
    margin-top: 30px;
    padding: 12px 25px;
    background: #ff914d;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: 0.3s;
}

.back-home:hover{
    background: #e07f3d;
}

.product-description{
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
    min-height: 70px;
}
.product-detail{
    display:flex;
    gap:40px;
    background:white;
    padding:30px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
    margin-bottom:30px;
}

.product-image{
    flex:1;
}

.product-image img{
    width:100%;
    border-radius:15px;
}

.product-info{
    flex:1;
}

.product-info h1{
    margin-bottom:15px;
    color:#333;
}

.detail-price{
    display:block;
    color:#ff914d;
    font-size:30px;
    font-weight:bold;
    margin-bottom:20px;
}

.buy-now,
.add-cart{
    padding:12px 25px;
    border:none;
    border-radius:25px;
    cursor:pointer;
    font-weight:bold;
    margin-right:10px;
}

.buy-now{
    background:#ff914d;
    color:white;
}

.add-cart{
    background:#333;
    color:white;
}

.product-content{
    background:white;
    padding:30px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

.product-content h2{
    color:#ff914d;
    margin-bottom:15px;
    margin-top:20px;
}
.product a,
.product a:visited,
.product a:hover{
    text-decoration: none;
    color: inherit;
}
.messenger-btn{
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

.messenger-btn img{
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: 0.3s;
}

.messenger-btn img:hover{
    transform: scale(1.1);
}

@media(max-width:768px){
    .product-detail{
        flex-direction:column;
    }
}

/*GIỎ HÀNG*/

#cart-list{
    max-width:1000px;
    margin:auto;
}

.cart-item{
    display:flex;
    align-items:center;
    gap:20px;
    background:white;
    padding:20px;
    margin-bottom:20px;
    border-radius:15px;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
}

.cart-item img{
    width:120px;
    height:120px;
    object-fit:cover;
    border-radius:10px;
}

.cart-info{
    flex:1;
}

.cart-info h3{
    margin-bottom:10px;
    color:#333;
}

.cart-price{
    color:#ff914d;
    font-size:22px;
    font-weight:bold;
}

.delete-btn{
    background:red;
    color:white;
    border:none;
    padding:10px 20px;
    border-radius:10px;
    cursor:pointer;
}

.delete-btn:hover{
    opacity:0.8;
}

.cart-total{
    text-align:right;
    font-size:28px;
    font-weight:bold;
    margin-top:30px;
    color:#333;
}
/* ADMIN PANEL */

.admin-container{
    max-width:1200px;
    margin:40px auto;
    padding:0 20px;
}

.admin-title{
    text-align:center;
    color:#ff914d;
    margin-bottom:30px;
}

.admin-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:30px;
}

.admin-card{
    background:white;
    padding:25px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
    text-align:center;
}

.admin-card h3{
    color:#666;
    margin-bottom:10px;
}

.admin-card span{
    font-size:30px;
    font-weight:bold;
    color:#ff914d;
}

.admin-section{
    background:white;
    padding:25px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
    margin-bottom:30px;
}

.admin-section h2{
    margin-bottom:20px;
    color:#ff914d;
}

.admin-form{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}

.admin-form input{
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
}

.admin-form button{
    background:#ff914d;
    color:white;
    border:none;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.admin-form button:hover{
    background:#e07f3d;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
}

.admin-table th{
    background:#ff914d;
    color:white;
    padding:12px;
}

.admin-table td{
    padding:12px;
    border-bottom:1px solid #eee;
    text-align:center;
}

.delete-product{
    background:red;
    color:white;
    border:none;
    padding:8px 12px;
    border-radius:8px;
    cursor:pointer;
}

.delete-product:hover{
    opacity:0.8;
}

@media(max-width:768px){

    .admin-grid{
        grid-template-columns:1fr 1fr;
    }

    .admin-form{
        grid-template-columns:1fr;
    }

}
/* TỰ ĐỘNG THÍCH ỨNG (RESPONSIVE) MÀN HÌNH ĐIỆN THOẠI/MÁY TÍNH BẢNG */
@media (max-width: 1024px) {
    .product {
        width: calc(33.33% - 16px); /* Màn hình vừa hiển thị 3 sản phẩm/dòng */
    }
}
@media (max-width: 768px) {
    .product {
        width: calc(50% - 12px); /* Màn hình máy tính bảng hiển thị 2 sản phẩm/dòng */
    }
    .header {
        padding: 15px 20px;
    }
}
@media (max-width: 480px) {
    .product {
        width: 100%; /* Màn hình điện thoại hiển thị 1 sản phẩm đứng một mình */
    }
}