* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Màu chính của toàn bộ trang web
       Nếu muốn thay đổi chỉ cần thay 
       đổi ở đây
    */
    --main-color: linear-gradient(
        to right,
        #2b1404,
        #976017
    ); /*Màu chính của trang web*/
    --text-color: #eef5ea; /*Màu chữ*/
    --title-color: #976017;
    --button-color: #e9d3b4;
    --border-color: #d8b98a;
}

/* Phủ màu toàn màn hình */
body {
    /* background: var(--main-color); */
}

/* =====HEADER===== */
header {
    padding-bottom: 20px;
    background: var(--main-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3); /*Tạo 1 đường viền ở phía dưới*/
}

/* =====LOGO===== */

.logo {
    padding-left: 10px;
}

.logo .logo-link {
    text-decoration: none; /*Bỏ dấu gạch dưới*/
    color: var(--text-color);
}

/*=====DANH SÁCH=====*/
.list {
    z-index: 1;
}

/* =====TRANG LIÊN KẾT===== */
.pages .pages-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: 0.2s;
}

.pages-link.active {
    color: var(--title-color); /* Màu nổi bật */
    font-weight: 700;
    font-weight: 600;
}

/* =====GIỎ HÀNG==== */

.cart {
    position: relative;
}

.cart-information {
    position: absolute;
    background-color: #f5e6d3;
    border-radius: 5px;
    padding: 10px;
    white-space: nowrap; /*Không xuống hàng*/
    top: 100%;
    left: 50%;
    transform: translateX(-100%);
    display: none;
    z-index: 1;
}

.cart-item {
    display: flex;

    align-items: center;

    margin-bottom: 8px;
}

.cart-item img {
    width: 45px;

    height: 45px;

    object-fit: cover;

    margin-right: 10px;

    border-radius: 5px;
}

.cart:hover .cart-information {
    display: block;
}

.cart .cart-link {
    color: var(--text-color);
    font-size: 20px;
}

/* =====LOGIN===== */
.auth .auth-login .auth-login-link {
    text-decoration: none;
    color: var(--text-color);
    padding-right: 10px;
    font-weight: 700;
    font-size: 20px;
}

.logo .logo-link .logo-img {
    width: 100px;
    height: 100px;
}

/* =====THANH TÌM KIẾM===== */
.search-box {
    position: relative;
    width: 250px;
}

.find-input {
    width: 100%;
    /* padding-right: 35px; */
    height: 30px;
    padding-left: 10px;
    border-radius: 5px;
    border: none;
    outline: none;
}

.find-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    border: none;
    background: transparent;
}

/*=====SIDEBAR TRÊN MÀN HÌNH LỚN===== */
#menuCanvas {
    background: var(--main-color);
}

/* Các liên kết trên sideBar */
.pages-link-sideBar {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: 0.2;
}

.pages-link-sideBar.active {
    color: var(--title-color);
    font-weight: 700;
}

/* .offcanvas-header {
  color: var(--text-color);
} */

/* Logo trên side bar */
.logo-link-sideBar .logo-img {
    width: 100px;
    height: 100px;
}

/* =====breadcrumb===== */

.breadcrumb-item a {
    color: var(--text-color) !important;
    margin-left: 70px;
}

.breadcrumb-item.active {
    color: var(--title-color) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-color) !important;
}

@media (max-width: 768px) {
    /* Sidebar trên điện thoại */
    #menuCanvas {
        width: 50%;
        background: var(--main-color);
    }

    /* Phần liên kết các trang trên điện thoại */
    .pages-link-sideBar {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 700;
    }
}

/* Hiển thị mật khẩu */

.password-wrapper {
    position: relative !important;
    width: 100%;
}

.password-wrapper .form-control {
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute !important;

    top: 50% !important;
    right: 12px !important;

    transform: translateY(-50%) !important;

    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    color: #6c757d;

    z-index: 10;
}

.password-toggle i {
    font-size: 18px;
    line-height: 1;
}

.password-toggle:hover {
    color: #212529;
}

/* Chỉ hiện viền xanh, không hiện icon tick */
.form-control.is-valid {
    background-image: none !important;
    border-color: #198754 !important;
}

.form-control.is-valid:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Chỉ hiện viền đỏ, không hiện icon lỗi */
.form-control.is-invalid {
    background-image: none !important;
    border-color: #dc3545 !important;
}

.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* =========================================
   WEBLIST PAGE TRANSITION
========================================= */

#page-transition {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.12);

    z-index: 99999;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.2s ease;
}

#page-transition.active {
    opacity: 1;
    visibility: visible;
}

/* Thanh loading */

#page-transition-box {
    width: 140px;
    height: 20px;

    background: rgba(233, 211, 180, 0.25);

    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 0 0 1px rgba(216, 185, 138, 0.25),
        0 4px 20px rgba(43, 20, 4, 0.25);
}

/* Phần fill */

#page-transition-fill {
    width: 0%;
    height: 100%;

    background: linear-gradient(90deg, #2b1404, #976017, #e9d3b4);

    border-radius: inherit;

    transition: width 700ms cubic-bezier(0.65, 0, 0.35, 1);

    box-shadow: 0 0 8px rgba(151, 96, 23, 0.7);
}

/* =========================================
   NÚT SẢN PHẨM ĐÃ MUA
========================================= */

.btn-purchased {
    background: var(--main-color);
    color: var(--button-color);

    border: 1px solid var(--border-color);

    padding: 10px 18px;

    border-radius: 8px;

    transition: all 0.3s ease;
}

/* Hover */

.btn-purchased:hover {
    color: var(--text-color);

    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(43, 20, 4, 0.3);
}

/* Hiệu ứng nút download */
.btn-download {
    position: relative;
    overflow: hidden;
    background: var(--main-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Thanh fill */
.btn-download::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--button-color);
    transition: width 1.2s ease;
    z-index: 0;
}

/* Toàn bộ nội dung nằm trên thanh fill */
.download-content {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Bắt đầu fill */
.btn-download.downloading::before {
    width: 100%;
}

/* Màu chữ khi thanh fill chạy */
.btn-download.downloading .download-content {
    color: #2b1404;
}

.product-description-content {
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre-line;
    line-height: 1.7;
    padding-right: 8px;
}
