:root {
    --blue-dark: #3a5b77;
    --blue-main: #005aab;
    --gold-price: #d4a017;
    --text-color: #333333;
    --border-color: #e5e5e5;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }
body { color: var(--text-color); font-size: 14px; background-color: #f8f9fa; display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.d-flex { display: flex; justify-content: space-between; align-items: center; }
.mt-20 { margin-top: 20px; }
.float-right { float: right; margin-top: 3px; font-size: 12px; }
.text-red { color: #d0021b !important; font-weight: bold; }

.top-bar { background-color: var(--blue-dark); color: white; padding: 8px 0; font-size: 13px; }
.main-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 15px; background-color: #fff; }
.main-header .logo img { height: 120px; width: auto; display: block; }
.main-nav ul { list-style: none; display: flex; gap: 25px; }
.main-nav a { font-weight: bold; font-size: 13px; color: #444; }
.header-icons { display: flex; gap: 15px; font-size: 20px; color: #666; align-items: center; }

.auth-links { font-size: 13px; font-weight: bold; color: #444; display: flex; gap: 5px; align-items: center; margin-right: 15px; border-right: 1px solid #ccc; padding-right: 15px; }
.auth-links a:hover { color: var(--blue-main); }
.auth-links i { font-size: 15px; color: var(--blue-main); margin-right: 3px; }

.cart-icon { position: relative; border: 1px solid #ccc; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.cart-count { position: absolute; top: -5px; right: -5px; background: #ff5722; color: white; font-size: 10px; padding: 2px 6px; border-radius: 50%; }

.breadcrumb-bg { background-color: #f1f5f8; padding: 10px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin-bottom: 30px; }
.breadcrumb a { color: var(--blue-main); }
.breadcrumb span { color: #888; }

.slider-container { position: relative; max-width: 1200px; margin: 0 auto 30px auto; overflow: hidden; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.slider-wrapper { display: flex; transition: transform 0.5s ease-in-out; width: 100%; }
.slide { min-width: 100%; }
.slide img { width: 100%; height: 400px; object-fit: cover; display: block; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.5); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; }
.slider-btn:hover { background-color: var(--blue-main); }
.prev-btn { left: 15px; }
.next-btn { right: 15px; }
.slider-dots { position: absolute; bottom: 15px; width: 100%; text-align: center; }
.dot { cursor: pointer; height: 12px; width: 12px; margin: 0 5px; background-color: rgba(255,255,255,0.5); border-radius: 50%; display: inline-block; transition: background-color 0.3s; }
.dot.active, .dot:hover { background-color: var(--blue-main); width: 25px; border-radius: 10px; }

.main-content { display: flex; gap: 30px; margin-bottom: 50px; }

.sidebar { width: 25%; }
.box-title { background-color: var(--blue-main); color: white; padding: 12px 15px; font-size: 16px; text-transform: uppercase; }
.category-list { list-style: none; background: #fff; border: 1px solid var(--border-color); border-top: none; }
.category-list li { border-bottom: 1px solid #f0f0f0; }
.category-list li a { display: block; padding: 12px 15px; color: #444; transition: 0.2s; }
.category-list li a:hover { background-color: #f9f9f9; color: var(--blue-main); }

.products-area { width: 75%; }
.area-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
.area-header h2 { font-size: 24px; color: #333; }

/* CSS MỚI CHO KHỐI 4 CỘT & SALE TAG */
.full-width-section { margin-bottom: 50px; }
.section-title { font-size: 20px; text-transform: uppercase; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; color: #333; }
.product-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card { background: #fff; border: 1px solid transparent; transition: 0.3s; position: relative; }
.product-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #eee; }
.product-card img { width: 100%; height: 250px; object-fit: cover; display: block; }
.product-info { padding: 15px; text-align: center; background-color: #fcfcfc; border: 1px solid #eee; border-top: none; }
.product-info h4 { font-size: 13px; color: #333; margin-bottom: 10px; line-height: 1.4; height: 36px; overflow: hidden; font-weight: bold; }
.product-price { color: var(--gold-price); font-weight: bold; font-size: 15px; }

/* CSS SALE VÀ GIÁ GỐC */
.sale-tag { position: absolute; top: 0; left: 0; background-color: var(--blue-main); color: #fff; padding: 6px 12px; font-size: 13px; font-weight: bold; z-index: 2; }
.old-price { color: #999; text-decoration: line-through; font-size: 13px; margin-left: 8px; font-weight: normal; }

.main-footer { background-image: url('img/footer-bg.jpg'); background-repeat: no-repeat; background-position: center center; background-size: cover; color: #fff; margin-top: auto; }
.footer-overlay { background-color: rgba(73, 90, 115, 0.85); }
.footer-content { display: flex; justify-content: space-between; padding: 50px 15px; gap: 40px; }
.footer-col { flex: 1; }
.office-col { flex: 2; }
.footer-col h3 { font-size: 16px; text-transform: uppercase; margin-bottom: 25px; position: relative; }
.footer-col h3::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 40px; height: 2px; background-color: #d0021b; }
.footer-col h4 { font-size: 14px; margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.policy-col ul li a:hover { color: #ffcccc; }
.biz-info { margin-top: 20px; font-size: 12px; line-height: 1.5; color: #ccc; }
.footer-bottom { background-color: #556c83; text-align: center; padding: 15px 0; font-size: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* ĐIỀU CHỈNH ĐIỆN THOẠI */
@media (max-width: 991px) {
    .main-content { flex-direction: column; }
    .sidebar { width: 100%; margin-bottom: 30px; }
    .products-area { width: 100%; }
    .slide img { height: 300px; }
    .product-grid-4 { grid-template-columns: repeat(2, 1fr); } /* Chuyển khối 4 cột thành 2 cột trên iPad */
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .main-header { flex-direction: column; gap: 15px; text-align: center; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .main-nav a { font-size: 11px; }
    .slide img { height: 180px; }
    .product-grid, .product-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; } /* Tất cả thành 2 cột trên điện thoại */
    .product-card img { height: 150px; }
    .product-info h4 { font-size: 11px; height: 30px; }
    .product-price, .old-price { font-size: 12px; }
    .footer-content { flex-direction: column; gap: 30px; padding: 30px 15px; }
}