/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f5f5f5;
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 75% 25%;
    gap: 10px;
}

/* ================= HEADER ================= */
header {
    grid-column: 1 / span 2;
    background-color: #ee4d2d; /* Shopee cam */
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

/* ================= NAV ================= */
.nav{
    grid-column: 1 / span 2;
    background-color: #ee4d2d;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 15px;
}

/* LEFT */
.nav-left{
    list-style: none;
    display: flex;
    gap: 10px;
}

.nav-left a{
    color: white;
    text-decoration: none;
    padding: 8px 10px;
    font-size: 14px;
}

.nav-left a:hover{
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* CENTER */
.nav-center{
    flex: 1;
    display: flex;
}

.nav-center input{
    width: 100%;
    padding: 8px;
    border: none;
    outline: none;
    border-radius: 2px 0 0 2px;
}

.nav-center button{
    padding: 8px 14px;
    border: none;
    background: #d73211;
    color: white;
    cursor: pointer;
}

/* RIGHT */
.nav-right{
    display: flex;
    gap: 10px;
}

.nav-btn{
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 2px;
}

.nav-btn.buy{
    background: white;
    color: #ee4d2d;
    font-weight: 600;
}

.nav-btn.cart{
    background: #333;
    color: white;
}
.nav-btn:hover{
    background: rgba(255,255,255,0.15);
    color: white;
    opacity: 0.9;
}
/* ================= HERO ================= */
.hero {
    grid-column: 1 / span 2;
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 4px;
}

.hero h2 {
    color: #ee4d2d;
    font-size: 30px;
}

.hero p {
    margin: 10px 0 20px;
    color: #555;
}
.hero-buttons {
    display: flex;
    justify-content: center;   /* căn giữa */
    gap: 15px;                 /* khoảng cách giữa 2 nút */
    margin-top: 20px;
}
.hero .button:last-child {
    background-color: white;
    color: #ee4d2d;
    border: 1px solid #ee4d2d;
}
.hero .button:last-child:hover {
    background-color: #f9f9f9;
}

/* ================= PRODUCT LIST ================= */
.product-list {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* CARD */
.product-card {
    background: white;
    border-radius: 4px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* IMAGE */
.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* TITLE */
.product-card h2 {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
}

/* DESC */
.product-card p {
    font-size: 12px;
    color: #777;
    margin: 5px 0;
}

/* PRICE */
.price {
    display: block;
    color: #ee4d2d;
    font-weight: 600;
    font-size: 16px;
    margin: 8px 0;
}

/* BUTTON */
.button {
    width: 100%;
    background-color: #ee4d2d;
    color: white;
    border: none;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
}

.button:hover {
    background-color: #d73211;
}

/* ================= SIDEBAR ================= */
.sidebar {
    background: white;
    padding: 15px;
    border-radius: 4px;
    height: fit-content;
}

.sidebar h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.social-icons a {
    display: block;
    text-decoration: none;
    color: #555;
    padding: 8px 0;
    font-size: 14px;
}

.social-icons a:hover {
    color: #ee4d2d;
}


/* Mobile */
@media (max-width:768px){
    .search-bar input{
        width: 75%;
    }
}

/* ================= FOOTER ================= */
.footer {
    grid-column: 1 / span 2;
    background: white;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #ddd;
}

.footer-item h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.footer-item p {
    font-size: 13px;
    color: #666;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
    }

    .product-list {
        grid-template-columns: repeat(2,1fr);
    }

    .footer {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .product-list {
        grid-template-columns: 1fr;
    }
}

/* ===== MEMBER ===== */
.header {
    grid-column: 1 / span 2;
    background-color: #ee4d2d;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 22px;
}

.header-left p {
    font-size: 12px;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
}

.member-btn:hover {
    background: rgba(255,255,255,0.15);
}

.member-btn.register {
    background: white;
    color: #ee4d2d;
}

.member-btn.logout {
    background: #333;
    border: none;
}

#welcome-text {
    font-size: 13px;
    margin-right: 10px;
}
/* ===== END MEMBER ===== */

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: white;
    padding: 25px;
    width: 300px;
    border-radius: 4px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #ee4d2d;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
}

.modal-content button {
    width: 100%;
    background: #ee4d2d;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.modal-content p {
    margin-top: 10px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
}

.cart-count{
    background: white;
    color: #ee4d2d;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
/* ===== END MODAL ===== */