﻿
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --primary-gradient: linear-gradient(135deg, #ff3b30, #ff6b6b);
    --primary: #ff3b30;
    --text-dark: #222;
    --text-muted: #666;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
}

header {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-text {
    letter-spacing: 2px;
    color: #ff3b30 !important; /* Thêm !important để ép màu đỏ, đè bẹp mọi màu xanh */
    font-weight: 900; /* Cho đậm lên nhìn cho đẹp */
    text-transform: uppercase;
    text-decoration: none !important;
}

.nav-link {
    position: relative;
    padding: 8px 15px !important;
    color: #333 !important;
    font-weight: 600;
}

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transition: width 0.3s;
    }

    .nav-link:hover::after {
        width: 100%;
    }

/*---------------------------------------------------MENU------------------------------------------------------------*/

.dropdown-menu {
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px;
}

.dropdown-item {
    padding: 8px 20px;
    color: #666;
    transition: all 0.3s;
}

    .dropdown-item:hover {
        background: var(--primary-color);
        color: white;
        border-radius: 5px;
    }

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

/*---------------------------------------------------SEARCH-----------------------------------------------------------------*/
.search-container {
    position: relative;
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

    .search-item:hover {
        background: #f8f9fa;
    }

/*---------------------------------------------------------------- TOAST --------------------------------------------------------------------*/
#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.custom-toast {
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease-out;
}

    .custom-toast.show {
        opacity: 1;
        transform: translateX(0);
    }

/*------------------------------------------------------------- ANIMATIONS -------------------------------------------------------------------*/

.hove {
    transition: transform 0.3s ease;
}

    .hove:hover {
        transform: scale(1.1);
    }

.image-border {
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

    .image-border:hover {
        transform: translateY(-10px);
    }

.banner-high {
    height: 70vh;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/*---------------------------------------------------------------------PRODUCT CARD-------------------------------------------------------------------*/

.product-item {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: center;
}

    .product-item:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    }

.product-img-container {
    position: relative;
    width: 100%;
    height: 180px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
}

.product-item:hover .product-img {
    transform: scale(1.08);
}

.product-discount-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-gradient);
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(255,59,48,0.5);
    z-index: 10;
    border: 3px solid white;
    transition: all 0.3s ease;
}

.product-item:hover .product-discount-tag {
    transform: scale(1.15);
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0.5rem 0 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    padding: 0 0.5rem;
}

.product-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #6c757d;
}

    .product-meta span {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
/*--------------------------------------------------------------------PRICE--------------------------------------------------------------------------*/
.price-section {
    margin: 1.5rem 0;
}
.price-container {
    margin-top: auto;
    padding: 0.5rem 0;
}

.price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    display: block;
}

.price-new {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0.3rem 0;
}
.price-highlight {
    color: #d70018; /* Màu đỏ cho giá tiền */
}
/*--------------------------------------------------------------------FOOTER---------------------------------------------------------------------------*/
footer {
    background: #2d3436;
    color: #dfe6e9;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-section h5 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links a {
    color: #dfe6e9;
    text-decoration: none;
    transition: color 0.3s;
}

    .footer-links a:hover {
        color: var(--primary-color);
    }
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
.social-links a {
    color: #fff;
    margin-right: 15px;
    font-size: 20px;
    transition: color 0.3s;
}

    .social-links a:hover {
        color: var(--primary-color);
    }

.brand-name {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/*---------------------------------------------------------------------BUTTONS--------------------------------------------------------------------------------*/

.action-buttons {
    margin: 2rem 0;
}

.btn-add-to-cart {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

    .btn-add-to-cart:hover {
        background-color: #2a2a2a;
        transform: translateY(-2px);
    }

.btn-buy-now {
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

    .btn-buy-now:hover {
        background-color: #ff5252;
        transform: translateY(-2px);
    }

.product-details-tabs {
    margin-top: 3rem;
}
.back-button {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

    .back-button:hover {
        color: var(--accent-color);
    }

.btn-warning {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

    .btn-warning:hover {
        background: #ff5252;
        border-color: #ff5252;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(255,107,107,0.2);
    }
.btn-continue {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #337ab7;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}
.btn-apply {
    background-color: #ff6f00; /* Màu cam */
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap; /* Không cho chữ xuống dòng */
}
/* Nút thanh toán to đẹp */


.checkout-btn {
    display: block;
    margin-top: 28px;
    background: #ff6b6b;
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    border: none;
    /* Mẹo: Thêm dòng này để khi bấm vào nó không hiện cái khung xanh/đen xấu xí */
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}
    .checkout-btn:hover {
        background-color: #ff5252;

    }
.remove-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #ff5722;
    cursor: pointer;
    display: flex;
    justify-content: center;
}
/*---------------------------------------------------------------------------------------------------------------------------------------*/
.nav-tabs .nav-link {
    color: #6c757d;
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
}

    .nav-tabs .nav-link.active {
        color: var(--primary-color);
        border-bottom: 3px solid var(--accent-color);
        background: transparent;
    }
/*------------------------------------------------------------REVIEW-----------------------------------------------------------------------*/
.review-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

    .review-item:last-child {
        border-bottom: none;
    }

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-author {
    font-weight: 600;
    margin: 0;
}

.review-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.rating-stars {
    color: #ffc107;
}

.rating-summary {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.average-rating {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.rating-count {
    color: #6c757d;
    font-size: 0.9rem;
}


/*--------------------------------------------------SIZE OPTIONS-----------------------------------------------------------------*/

.size-selector {
    margin: 1.5rem 0;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.size-option {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .size-option:hover, .size-option.active {
        border-color: var(--accent-color);
        background-color: rgba(255, 107, 107, 0.1);
    }

/*---------------------------------------------QUANTITY----------------------------------------------------------------*/
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.quantity-btn {
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
}

/*---------------------------------------------------------FILTER-------------------------------------------------------------------*/
.section-title {
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    color: var(--text-dark);
}

.filter-bar {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border: 1px solid #eee;
}

    .filter-bar .form-label {
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--text-muted);
        margin-bottom: 0.5rem;
    }

    .filter-bar .form-select,
    .filter-bar .btn {
        border-radius: 30px;
        font-size: 0.95rem;
        padding: 0.6rem 1.2rem;
    }

    .filter-bar .btn-danger {
        background: var(--primary-gradient);
        border: none;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(255,59,48,0.3);
    }

        .filter-bar .btn-danger:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(255,59,48,0.4);
        }

/*Index Gio Hang*/
.cart-header .cart-icon {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 28px;
    color: #ff5722;
}

.cart-header .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff5722;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dropdown giỏ hàng hover */
.cart-dropdown {
    position: absolute;
    top: 60px;
    right: 40px;
    width: 320px;
    background: #111;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    padding: 10px;
    z-index: 1000;
}

    .cart-dropdown .cart-item {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .cart-dropdown img {
        width: 50px;
        height: 50px;
        border-radius: 6px;
        object-fit: cover;
    }

    .cart-dropdown .item-info {
        flex: 1;
        font-size: 14px;
    }

    .cart-dropdown .item-price {
        font-weight: 700;
        color: #ff5722;
    }

.cart-container {
    max-width: 1200px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}


.cart-item {
    display: grid;
    grid-template-columns: 40px 90px 1fr 130px 110px 50px;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

    .cart-item img {
        width: 90px;
        height: 90px;
        object-fit: cover;
        border-radius: 10px;
        cursor: pointer;
        transition: transform 0.25s ease;
    }

        .cart-item img:hover {
            transform: scale(1.05);
        }

.item-name {
    font-weight: 600;
    font-size: 16px;
}

.item-code {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.price, .subtotal {
    font-weight: 700;
    font-size: 16px;
    color: #111;
    text-align: right;
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .qty-box button {
        width: 32px;
        height: 32px;
        background: #111;
        border: none;
        color: white;
        font-weight: 700;
        font-size: 18px;
        border-radius: 6px;
        cursor: pointer;
    }

        .qty-box button:disabled {
            background: #888;
            cursor: not-allowed;
        }

    .qty-box input {
        width: 50px;
        height: 32px;
        border: 1px solid #ddd;
        border-radius: 6px;
        text-align: center;
        font-size: 16px;
    }

.cart-right h2 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 16px;
}

.summary-total {
    font-size: 20px;
    color: #111;
    font-weight: 700;
}

.voucher-box input {
    width: 70%;
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 6px 0 0 6px;
}

.voucher-box button {
    width: 30%;
    padding: 8px 12px;
    background: #ff5722;
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}



.flying-img {
    position: fixed;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    color: #111;
    background: none;
    border: none;
}

.modal-img {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    object-fit: contain;
}

.modal-title {
    font-weight: 700;
    font-size: 22px;
    margin-top: 20px;
}

.modal-price {
    color: #111;
    font-weight: 700;
    font-size: 20px;
    margin-top: 12px;
}

.modal-desc {
    margin-top: 16px;
    color: #444;
    line-height: 1.5;
}

/* -------------------------------------------------------------------- Bố cục chung CHO CART ------------------------------------------------ */
.cart-container {
    display: flex;
    flex-wrap: wrap; /* Tự xuống dòng trên mobile */
    gap: 30px; /* Khoảng cách giữa 2 cột */
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    align-items: flex-start; /* Căn hàng đầu */
}

/* Cột trái: chiếm 70% chiều rộng */
.cart-items-section {
    flex: 2;
    min-width: 300px;
}

/* Cột phải (Tính tiền): chiếm 30% chiều rộng */
.cart-summary-section {
    flex: 1;
    min-width: 280px;
}

/* --- Phần Giỏ hàng trống (Cột trái) --- */
.empty-cart-msg {
    text-align: center;
    padding: 40px;
}

    .empty-cart-msg img {
        max-width: 200px; /* Giới hạn kích thước ảnh để không bị vỡ */
        margin-bottom: 20px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }



/* ----------------------------------------------------------- Phần Tính tổng tiền (Cột phải) ------------------------------------------------------------------ */
.summary-card {
    background-color: #f8f9fa; /* Nền xám nhẹ */
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Đổ bóng nhẹ cho đẹp */
}

/* Hàng nhập mã giảm giá */
.coupon-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.coupon-input {
    flex: 1; /* Input tự co giãn */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}



/* Các dòng thông tin tiền */
.summary-row {
    display: flex;
    justify-content: space-between; /* Đẩy chữ sang 2 bên lề */
    margin-bottom: 15px;
    font-size: 14px;
}

    .summary-row.total {
        border-top: 1px dashed #ccc;
        padding-top: 15px;
        font-weight: bold;
        font-size: 18px;
    }

