﻿/* ===== RESET ===== */
body {
    margin: 0;
    font-family: Arial;
    background: #f5f6fa;
}

/* ===== CONTAINER ===== */
.container {
    width: 1200px;
    margin: auto;
}

/* ===== HEADER ===== */
.topbar {
    background: #0a2f6b;
    color: #cde1ff;
    padding: 6px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.main-header {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #0a3d91, #1e90ff);
    padding: 12px 20px;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.menu {
    display: flex;
    gap: 20px;
    margin: auto;
}

    .menu a {
        color: white;
        text-decoration: none;
        padding: 6px 12px;
        border-radius: 8px;
    }

        .menu a:hover {
            background: rgba(255,255,255,0.2);
        }

/* ===== BANNER ===== */
.banner {
    width: 100%;
    height: 240px;
    margin-top: 15px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

    .banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.banner-text {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
}

/* ===== CATEGORY ===== */
.categories {
    display: flex; /* 🔥 QUAN TRỌNG */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    margin-top: 15px;
}

/* ITEM */
.cate-item {
    flex: 1; /* 🔥 CHIA ĐỀU */
    text-align: center;
    cursor: pointer;
}

    /* ẢNH */
    .cate-item img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    /* TEXT */
    .cate-item span {
        display: block;
        margin-top: 5px;
        font-size: 13px;
    }
.categories {
    display: flex !important;
}

/* ===== TITLE ===== */
.section-title {
    margin-top: 25px;
    font-size: 18px;
    font-weight: bold;
}

/* ===== GRID SẢN PHẨM ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* ===== CARD ===== */
.card {
    background: white;
    border-radius: 15px;
    padding: 12px;
    text-align: center;
    border: 1px solid #eee;
    transition: 0.3s;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

/* ===== ẢNH ===== */
.img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fafafa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .img-box img {
        width: 75%;
        object-fit: contain;
    }

/* ===== TEXT ===== */
.card h3 {
    font-size: 14px;
    margin-top: 8px;
}

.price {
    color: red;
    font-weight: bold;
}

/* ===== BUTTON ===== */
.actions {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-detail {
    background: #0a3d91;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-cart {
    background: #ff6a00;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-detail:hover {
    background: white;
    color: #0a3d91;
    border: 1px solid #0a3d91;
}

.btn-cart:hover {
    background: white;
    color: #ff6a00;
    border: 1px solid #ff6a00;
}

/* ===== EXPLORE ===== */
.explore-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.explore-card {
    flex: 1;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

    .explore-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ===== PRODUCT DETAIL ===== */
.product-detail {
    display: flex;
    gap: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.detail-left {
    width: 40%;
}

.main-img-box {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 10px;
}

    .main-img-box img {
        width: 80%;
    }

.sub-img {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

    .sub-img img {
        width: 55px;
        height: 55px;
        border: 1px solid #eee;
        border-radius: 6px;
        cursor: pointer;
    }

.detail-right {
    width: 60%;
}
/* ===== CART LAYOUT ===== */
.cart-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* LEFT */
.cart-left {
    flex: 2;
}

/* RIGHT */
.cart-right {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ===== ITEM ===== */
.cart-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    gap: 15px;
    border: 1px solid #eee;
    transition: 0.3s;
}

    .cart-item:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }

/* ===== ẢNH ===== */
.cart-img {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cart-img img {
        width: 80%;
        object-fit: contain;
    }

/* ===== INFO ===== */
.cart-info {
    flex: 2;
}

.cart-name {
    font-weight: bold;
    font-size: 14px;
}

.cart-price {
    color: red;
    margin-top: 5px;
}

/* ===== QTY ===== */
.cart-qty {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

    .cart-qty a {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
        text-decoration: none;
        color: black;
        font-weight: bold;
        border-right: 1px solid #ddd;
    }

        .cart-qty a:last-child {
            border-right: none;
        }

    .cart-qty span {
        width: 40px;
        text-align: center;
        font-weight: bold;
    }

/* ===== TỔNG TIỀN ===== */
.cart-total {
    width: 120px;
    text-align: right;
    font-weight: bold;
    color: red;
}

/* ===== XÓA ===== */
.cart-remove a {
    color: red;
    font-size: 18px;
    text-decoration: none;
}

    .cart-remove a:hover {
        transform: scale(1.2);
    }

/* ===== BOX THANH TOÁN ===== */
.cart-right h3 {
    margin-bottom: 15px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.total-final {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-top: 10px;
}

    .total-final b {
        color: red;
    }

/* ===== NÚT THANH TOÁN ===== */
.btn-pay {
    width: 100%;
    margin-top: 15px;
    background: #ff3b3b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-pay:hover {
        background: #d92c2c;
        transform: translateY(-2px);
    }
/* ===== SEARCH BOX ===== */
.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px; /* 🔥 bo tròn */
    overflow: hidden;
    margin-left: auto;
    margin-right: 15px;
    width: 250px;
}

    .search-box input {
        border: none;
        outline: none;
        padding: 8px 12px;
        flex: 1;
        font-size: 13px;
    }

    .search-box button {
        background: #0a3d91;
        color: white;
        border: none;
        padding: 8px 12px;
        cursor: pointer;
    }

        .search-box button:hover {
            background: #072b6b;
        }

/* ===== CART ICON ===== */
.cart-icon {
    position: relative;
}

    .cart-icon a {
        font-size: 22px;
        text-decoration: none;
        color: white;
        position: relative;
    }

/* 🔥 BADGE SỐ LƯỢNG */
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: red;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* 🔥 HIỆU ỨNG NỔI */
.cart-icon a:hover {
    transform: scale(1.2);
}

/* HEADER CÂN LẠI */
.main-header {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* MENU */
.menu {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}

    .menu a {
        color: white;
        text-decoration: none;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 13px;
        transition: 0.3s;
    }

        /* hover */
        .menu a:hover {
            background: rgba(255,255,255,0.2);
        }

        /* 🔥 ACTIVE (đang chọn) */
        .menu a.active {
            background: white;
            color: #0a3d91;
            font-weight: bold;
        }



    




