:root {
    /* === Màu sắc chủ đạo (Theme) === */
    --primary-color: #2AC46B;       /* Màu chính #ED1C25*/
    --secondary-color: #FFF;    /* Màu phụ */
    --background-color: #F2F2F2;   /* Nền */
    --background-color2: #fff;
    --text-color: #333;            /* Chữ chính */
    --text-light: #2AC46B;            /* Chữ phụ */
    --text-light-2: #fff;
    --text-breadcrumb: #333;
    --color-border: #F0F0F0;
    --text-hight-light: #2AC46B;

    /* === Font chữ === */
    --font-family: 'Roboto', sans-serif;
    --font-size: 16px;
    --font-size-md: 14px;
    --font-size-sm: 12px;
    --line-height: 1.4;

    /* === Khoảng cách (Spacing) === */
    --spacing-small: 8px;
    --spacing-medium: 16px;
    --spacing-large: 24px;

    /* === Border & Shadow === */
    --border-radius: 5px;
    --border-radius-md: 10px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    /* === Chiều ngang nội dung === */
    --container-max-width-pc: 1140px;
    --container-max-width-desktop: 960px;
    --container-max-width-lg-tablet: 720px;
    --container-max-widtg-tablet: 540px;
}

/* Dark Theme */
[data-theme="dark"] {   
    --background-color: #22272E;         /* Nền tối */
    --primary-color: #202124;   /* Màu chính sáng hơn */
    --secondary-color: #fff;
    --text-color: #000;       /* Chữ chính sáng */
    --text-light: #666;          /* Chữ phụ sáng */
    /* --text-breadcrumb: #e8eaed; */
    --text-breadcrumb: #adbac7;
    --background-color2: #22272E;
    --color-border: #adbac7;
    --text-hight-light: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
  
body {
    font-family: var(--font-family, 'Roboto', sans-serif);
    font-size: var(--font-size, 16px);
    line-height: var(--line-height, 1.4);
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Đảm bảo footer luôn nằm ở cuối trang ngay cả khi nội dung bên trong ngắn hơn chiều cao màn hìnhhình */
}

.container {
    width: 100%;
    max-width: var(--container-max-width-pc, 1200px);
    margin: 0 auto;
}

/* Over lay */
.overlay {
    display: none;
    position: fixed; 
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background-color: rgba(0,0,0,.3);
    width: 100%;
    height: 100%;
    z-index: 100;
}

.overlay:hover {
    cursor: pointer;
}

/* Popup */
.container-popup {
    display: none;
    align-items: center;
    justify-content: center;
}

.box-popup {
    display: block;
    position:fixed;
    background-color: var(--secondary-color, #fff);
    border-radius: var(--border-radius-md, 10px);
    box-shadow: 0 0 10px #999;
    z-index: 1000;
    top: 50%;
    transform: translateY(-50%);
}

/* Main */
#main {
    flex: 1;
}

/* Style chung cho mỗi item sản phẩm */
.product-item {
    background-color: var(--secondary-color, #fff);
    border-radius: var(--border-radius, 5px);
    padding: var(--spacing-small, 8px);
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-small, 8px);
}

.product-item img {
    height: 190px;
    max-width: 265px;
    object-fit: contain;
}

.product-item h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Số dòng hiển thị */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 20px;
}

.product-item h3 a{
    font-size: var(--font-size, 16px);
    color: var(--text-color, #333);
    text-decoration: none;
    font-weight: normal;
}

.box-price{
    display: flex;
}

.box-price .new-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light, #ED1C25);
    vertical-align: middle;
}

.box-price .discount {
    color: var(--text-light-2, #fff);
    display: inline-block;
    background-color: var(--primary-color, #ED1C25);
    border-radius: var(--border-radius, 5px);
    margin-left: var(--spacing-small, 8px);
    padding: 2px 4px;
}

.product-item .old-price {
    display: block;
    font-size: 15px;
    color: #888;
    text-decoration: line-through;
}

.product-item .sold {
    font-size: 13px;
    color: #888;
}

.product-item:hover {
    box-shadow: rgb(0 0 0 / 20%) 0px 0px 10px;
}

/* Breadcrumb */
.breadcrumb {
    margin-top: var(--spacing-small, 8px);
    margin-bottom: var(--spacing-small, 8px);
}

.breadcrumb i {
    padding: 0 5px;
    font-size: var(--font-size-sm, 12px);
    color: #B4B6B8;
}

.breadcrumb a {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-breadcrumb, #333);
    text-decoration: none;
}

/* Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: var(--container-max-width-desktop, 960px);
    }
}

/* Tablet lớn */
@media (max-width: 992px) {
    .breadcrumb {
        margin: var(--spacing-small, 8px) var(--spacing-medium, 16px);
    }
}

/* Tablet */
@media (max-width: 768px) {
  
}

/* mobile */
@media (max-width: 576px) {
    .product-item img {
        height: 170px;
        max-width: 100%;
    }
    .breadcrumb {
        margin: var(--spacing-small, 8px);
    }
}