/* ===== Trang chi tiết sản phẩm ===== */
.product-detail {
    background: #FFF;
    padding: 30px 0 70px;
    font-family: 'Montserrat', Arial, sans-serif;
    min-height: 60vh;
}

.product-detail .container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Style cho hộp phản hồi của Admin trên trang chi tiết sản phẩm */
.review-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.review-admin-reply {
    margin-top: 15px;
    margin-left: 20px;
    /* Thụt vào để phân biệt với bình luận khách */
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1e3c72;
    /* Màu chủ đạo của bạn */
    position: relative;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap; /* để tự xuống dòng nếu màn hình quá nhỏ */
    margin: 6px 0;
}

.article-author,
.article-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 14px;
    color: #666; /* tùy chỉnh theo màu bạn đang dùng */
}

.article-author i,
.article-date i {
    color: #999; /* màu icon, tùy chỉnh */
}


/* Tạo mũi tên nhỏ trỏ lên bình luận khách */
.review-admin-reply::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 20px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #f9f9f9 transparent;
}

.admin-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.admin-reply-header i {
    color: #1e3c72;
}

.admin-reply-header strong {
    color: #333;
    font-weight: 700;
}

.admin-reply-header .reply-date {
    color: #888;
    font-size: 14px;
    margin-left: auto;
}

.review-admin-reply .reply-content {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}



/* ---- Breadcrumb ---- */
.product-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b6b70;
    margin-bottom: 24px;
}

.product-breadcrumb a {
    color: #6b6b70;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: #1e3c72;
}

.product-breadcrumb .current {
    color: #111;
    font-weight: 600;
}

/* ---- New 2-Column Layout ---- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 58% 42%;
    gap: 30px;
    align-items: start;
    margin-bottom: 40px;
    font-weight: 500;
}

@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "gallery"
            "sidebar"
            "related"
            "desc";
    }
}

.product-gallery {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-gallery-main {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-gallery-main img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* z-index: 2;   */
    transition: all 0.2s;
}

.gallery-nav-btn:hover {
    color: #1e3c72;
}

.gallery-nav-prev {
    left: 10px;
}

.gallery-nav-next {
    right: 10px;
}

.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.product-gallery-thumbs .thumb {
    width: 60px;
    height: 60px;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-gallery-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-gallery-thumbs .thumb.active,
.product-gallery-thumbs .thumb:hover {
    border-color: #1e3c72;
}
/* Zoom ảnh sản phẩm */
.product-gallery-main {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.product-gallery-main img#mainProductImage {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Khung xem trước phóng to (hiển thị bên cạnh, dùng cho desktop) */
.zoom-preview {
    position: absolute;
    top: 0;
    left: calc(100% + 16px);
    width: 420px;
    height: 420px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-repeat: no-repeat;
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: none;
    z-index: 50;
    pointer-events: none;
}

.product-gallery-main.zooming .zoom-preview {
    display: block;
}

/* Ẩn khung preview trên màn hình nhỏ, chỉ phóng trực tiếp trên ảnh */
@media (max-width: 991px) {
    .zoom-preview {
        display: none !important;
    }
}

/* Bài viết đánh giá */
.product-detail-desc {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-detail-desc h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px;
    color: #111;
}

.product-detail-desc-content {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.product-detail-desc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

/* ---- Right Column ---- */
.product-detail-right {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.product-header-right {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-detail-name {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    /* margin: 0 0 20px; */
    line-height: 1.3;
}

.product-rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.product-rating-row .stars {
    color: #fbbf24;
    display: flex;
    gap: 2px;
    font-size: 14px;
}

.product-rating-row .rating-count {
    color: #6b7280;
    text-decoration: none;
}

.product-rating-row .rating-sep {
    color: #d1d5db;
}

.product-rating-row .qa-count {
    color: #6b7280;
    font-weight: 500;
}

.product-rating-row .compare-btn {
    margin-left: auto;
    color: #2563eb;
    cursor: pointer;
    font-weight: 600;
}

/* Header top row (brand badge + wishlist/share) */
.product-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}


.product-header-top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-wishlist,
.btn-share-product {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-wishlist:hover,
.btn-share-product:hover {
    color: #1e3c72;
}

.btn-wishlist.active {
    color: #1e3c72;
}

/* Info table (thông số nhanh dạng bảng) */
.product-info-table {
    background: #fff;
    border-radius: 12px;
    padding: 8px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-info-table ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-info-table li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f2;
    font-size: 14px;
}

.product-info-table li:last-child {
    border-bottom: none;
}

.product-info-table .info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.product-info-table .info-label i {
    width: 16px;
    text-align: center;
    color: #9ca3af;
}

.product-info-table .info-value {
    color: #111;
    font-weight: 500;
    text-align: right;
}

/* 1. Đổi justify-content của cha thành flex-start để không bị đẩy ra 2 đầu nữa */
li {
    justify-content: flex-start !important;
}

/* 2. Cho info-value chiếm hết phần còn lại và căn giữa chữ */
span.info-value {
    flex-grow: 1;
    /* Chiếm hết chỗ trống */
    text-align: center;
    /* Căn chữ ra giữa */
}

/* Price block */
.product-price-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-price-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-price {
    font-size: 32px;
    font-weight: 800;
    color: #1e3c72;
}

.product-price-old {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-price-vat {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.product-discount-badge {
    background: #ffd700;
    color: #1e3c72;
    font-size: 14px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Stock badge */
.stock-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.stock-badge div {
    display: flex;
    flex-direction: column;
}

.stock-badge strong {
    font-size: 16px;
    font-weight: 600;
}

.stock-badge.stock-in {
    background: #ecfdf5;
    color: #047857;
    /* Darker green (Contrast ~5.1:1) */
}

.stock-badge.stock-in i {
    color: #10b981;
    font-size: 18px;
}

.stock-badge.stock-out {
    background: #fef2f2;
    color: #1e3c72;
}

.stock-badge.stock-out i {
    color: #1e3c72;
    font-size: 18px;
}

.stock-badge span {
    color: #6b7280;
    font-weight: 500;

}

/* Promo Box */
.promo-box {
    border: 1px solid #cddcf2;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.promo-header {
    background: #eaf1fb;
    color: #1e3c72;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #cddcf2;
}

.promo-body {
    padding: 16px;
}

.promo-note {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 10px;
}

.promo-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-body li {
    font-size: 15px;
    color: #374151;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.promo-body li i {
    color: #10b981;
    margin-top: 3px;
}

/* Actions Vertical */
.product-detail-actions-vertical {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    gap: 10px;
}

.btn-buy-now {
    /* width: 100%; */
    background: #1e3c72;
    color: #ffd700;
    border: none;
    border-radius: 15px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.35);
}

.btn-buy-now:hover {
    background: #2a5298;
}

.btn-buy-now strong {
    font-size: 16px;
    /* text-transform: none; */
}

.btn-buy-now span {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 2px;
}

.btn-buy-now.btn-contact {
    flex-direction: row;
    gap: 10px;
    padding: 16px;
}

.btn-buy-now.btn-contact strong {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-buy-now.btn-contact i {
    font-size: 18px;
}

/* Contact row: Gọi ngay / Chat Zalo / Gửi yêu cầu */
.product-contact-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: #111;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-item:hover {
    border-color: #9dbfe8;
    background: #eaf1fb;
}

.contact-item i {
    font-size: 20px;
    color: #1e3c72;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.contact-item img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-item div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-item strong {
    font-size: 14px;
    font-weight: 600;
}

.contact-item span {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-row {
    display: flex;
    gap: 10px;
}

.btn-add-cart-outline,
.btn-installment {
    flex: 1;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}

.btn-add-cart-outline {
    border: 1px solid #2563eb;
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
    flex-direction: row;
    gap: 8px;
}

.btn-add-cart-outline:hover {
    background: #eff6ff;
}

.btn-installment {
    border: 1px solid #3b82f6;
    background: #3b82f6;
    color: #fff;
}

/* Qty selector */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.qty-label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.qty-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: #f9fafb;
    color: #374151;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-control button:hover {
    background: #f3f4f6;
}

.qty-input {
    width: 48px;
    height: 36px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-stock {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.btn-add-cart {
    background: #1e3c72;
    color: #ffd700;
    border: none;
    border-radius: 15px;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    transition: background 0.2s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.35);
}

.btn-add-cart:hover {
    background: #2a5298;
}

.btn-add-cart:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-installment:hover {
    background: #2563eb;
}

.btn-installment strong {
    font-size: 14px;
    text-transform: uppercase;
}

.btn-installment span {
    font-size: 14px;
    opacity: 0.9;
}

/* Policies grid (2 cột x 3 hàng) */
.product-policies-grid {
    list-style: none;
    margin: 0;
    padding: 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.product-policies-grid li {
    display: flex;
    align-items: flex-start;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.product-policies-grid li i {
    color: #1e3c72;
    font-size: 17px;
    width: 18px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.product-policies-grid li div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-policies-grid li strong {
    font-size: 16px;
    color: #111;
    font-weight: 600;
}

.product-policies-grid li span {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    padding: 2px;
}


/* Quick info box (Thông tin nhanh) */
.product-quickinfo-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-quickinfo-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
}

.quickinfo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quickinfo-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quickinfo-item i {
    font-size: 20px;
    color: #1e3c72;
    width: 26px;
    text-align: center;
    flex-shrink: 0;
}

.quickinfo-item div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.quickinfo-item span {
    font-size: 14.5px;
    color: #6b7280;
}

.quickinfo-item strong {
    font-size: 14px;
    color: #111;
    font-weight: 700;
}

@media (max-width: 480px) {
    .quickinfo-grid {
        grid-template-columns: 1fr;
    }
}

/* Specs Box (Right Column) */
.product-detail-specs-right {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-detail-specs-right h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
}

.specs-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 15px !important;
}

/* Hàng tiêu đề nhóm (th colspan) - nền vàng nhạt */
.specs-content tr:has(> th[colspan]) {
    display: table-row !important;
    background: #fdf6d8 !important;
}

.specs-content tr:has(> th[colspan]) th {
    padding: 10px 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #333 !important;
    border-bottom: 1px solid #e8dfa0 !important;
    border-top: 1px solid #e8dfa0 !important;
    text-align: left !important;
    background: #fdf6d8 !important;
}

/* Hàng dữ liệu xen kẽ */
.specs-content tr:nth-child(even):not(:has(> th[colspan])) {
    background: #f9fafb !important;
}

.specs-content tr:nth-child(odd):not(:has(> th[colspan])) {
    background: #fff !important;
}

.specs-content td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    color: #333 !important;
    font-size: 15px !important;
    vertical-align: middle !important;
}

.specs-content td:first-child {
    width: 38% !important;
    color: #555 !important;
    font-weight: 400 !important;
    background: transparent !important;
}

/* ---- Product Description (Thông tin sản phẩm) ---- */
.product-detail-desc-wrapper {
    margin-top: 32px;
}

.desc-tab-header {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.desc-tab-active {
    display: inline-block;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 700;
    color: #1e3c72;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #fff;
    margin-bottom: -1px;
}

.product-detail-desc-box {
    border: 1px solid #e5e7eb;
    border-top: none;
    background: #fff;
    padding: 24px;
    border-radius: 0 0 8px 8px;
}

.product-detail-desc-content {
    font-size: 17px;
    line-height: 1.4;
    color: #333;
    overflow: hidden;
    max-height: 800px;
}

.product-detail-desc-content.expanded {
    max-height: none !important;
}

.product-detail-desc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 16px auto;
}

.desc-fade-bg {
    display: block;
    width: 100%;
    height: 80px;
    margin-top: -80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    position: relative;
}

.desc-btn-wrapper {
    text-align: center;
    padding: 12px 0 0;
}

.btn-read-more {
    background: #fff;
    border: 1px solid #1e3c72;
    color: #1e3c72;
    padding: 10px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-read-more:hover {
    background: #eaf1fb;
}

.btn-view-more-specs {
    width: 100%;
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view-more-specs:hover {
    background: #f9fafb;
}

/* Specs Collapsed */
.specs-content-collapsed {
    max-height: 250px;
    overflow: hidden;
    position: relative;
}

.specs-content-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}

/* Specs Modal */
.specs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.specs-modal.show {
    display: flex;
}

.specs-modal-dialog {
    background: #fff;
    width: 95%;
    max-width: 860px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.specs-modal-header {
    background: #1e3c72;
    color: #ffd700;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.specs-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.specs-modal-body {
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.specs-modal-body::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Compare Modal */
.compare-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.compare-modal.show {
    display: flex;
}

.compare-modal-dialog {
    background: #fff;
    width: 95%;
    max-width: 900px;
    min-height: min(460px, 80vh);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.compare-modal-header {
    background: #1e3c72;
    color: #ffd700;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compare-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.compare-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.compare-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #9ca3af;
    text-align: center;
    min-height: 260px;
}

.compare-placeholder i {
    font-size: 36px;
    color: #d1d5db;
}

.compare-placeholder p {
    margin: 0;
    font-size: 15px;
}

.compare-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.compare-search-box i {
    color: #9ca3af;
}

.compare-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
}

.compare-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 10;
}

.compare-search-results.show {
    display: block;
}

.compare-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.compare-result-item:hover {
    background: #f9fafb;
}

.compare-result-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    background: #f4f4f6;
}

.compare-result-info {
    display: flex;
    flex-direction: column;
}

.compare-result-name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.compare-result-price {
    font-size: 14px;
    color: #1e3c72;
    font-weight: 600;
}

.compare-no-result {
    padding: 14px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.compare-result-heading {
    padding: 10px 14px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    vertical-align: top;
    font-size: 15px;
}

.compare-table th {
    background: #f9fafb;
    width: 140px;
    text-align: left;
    font-weight: 600;
    color: #374151;
}

.compare-row-image img {
    width: 100%;
    max-width: 160px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
}

.compare-product-name {
    text-align: center;
    font-weight: 700;
    color: #111;
    font-size: 14px;
}

.compare-row-image a {
    color: inherit;
    text-decoration: none;
}

.compare-row-specs td {
    max-height: 220px;
    overflow-y: auto;
    word-break: break-word;
}

/* ---- Inline Related Products (Sản phẩm nên mua cùng) ---- */
.product-related-inline {
    background: #fff;
    border-radius: 16px;
    padding: 24px 28px 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    grid-template-columns: repeat(2, 1fr);

}

.related-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f2;
}

.product-related-inline h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: #111;
}

.product-related-inline h2 i {
    color: #1e3c72;
    font-size: 16px;
}

.related-inline-count {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #f4f4f6;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.product-grid-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.product-card-small {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eceef1;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    background: #fff;
}

.product-card-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(17, 17, 17, 0.1);
    border-color: #cddcf2;
}

.product-card-small .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    color: #ffd700;
    font-size: 14px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

.product-card-small .product-media {
    height: 150px;
    padding: 16px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-small .product-media img {
    /* width: 100%;
    height: 100%; */
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-small:hover .product-media img {
    transform: scale(1.06);
}

.product-card-small .product-body {
    padding: 14px 14px 6px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.product-card-small .product-brand {
    display: inline-block;
    width: fit-content;
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    background: #eaf1fb;
    padding: 2px 9px;
    border-radius: 999px;
}

.product-card-small .product-name {
    font-size: 15.5px;
    font-weight: 600;
    color: #111;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-card-small .product-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.product-card-small .product-price {
    font-size: 16px;
    font-weight: 800;
    color: #1e3c72;
}

.product-card-small .product-price-old {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-card-small-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    padding: 10px 14px 14px;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
}

.product-card-small:hover .product-card-small-cta {
    opacity: 1;
    transform: translateX(0);
    color: #1e3c72;
}

/* ---- Related products ---- */
.product-related .product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;

}

/* ---- Related articles ---- */
.product-related-articles {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.product-related-articles h2 {
    position: relative;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px;
    padding-bottom: 8px;
    width: max-content;
}

.product-related-articles h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #1e3c72;
}

.product-related-articles .article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
}

.article-item {
    display: flex;
    gap: 16px;
    text-decoration: none;
    font-weight: 500;
    color: inherit;
}

.article-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f1f3;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.article-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item:hover .article-title {
    color: #2563eb;
}

.article-author,
.article-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.article-author {
    color: #2563eb;
}

.article-date {
    color: #6b7280;
}

/* ---- Reviews & Comments (Đánh giá & bình luận) ---- */
.product-reviews-section {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f2;
}

.reviews-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: #111;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviews-avg {
    font-size: 22px;
    font-weight: 800;
    color: #1e3c72;
}

.reviews-avg-stars {
    color: #fbbf24;
    display: flex;
    gap: 2px;
    font-size: 15px;
}

.reviews-count {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #f4f4f6;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.review-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.review-alert-success {
    background: #ecfdf5;
    color: #047857;
}

.review-alert-error {
    background: #fef2f2;
    color: #b91c1c;
}

.review-form {
    background: #f9fafb;
    border: 1px solid #eceef1;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
}

.review-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.star-input input {
    display: none;
}

.star-input label {
    cursor: pointer;
    color: #d1d5db;
    font-size: 22px;
    transition: color 0.15s;
}

.star-input input:checked~label,
.star-input label:hover,
.star-input label:hover~label {
    color: #fbbf24;
}

.review-form-textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: #111;
    margin-bottom: 12px;
}

.review-form-textarea:focus {
    outline: none;
    border-color: #1e3c72;
}

.btn-submit-review {
    background: #1e3c72;
    color: #ffd700;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-review:hover {
    background: #2a5298;
}

.review-login-prompt {
    background: #f9fafb;
    border: 1px solid #eceef1;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
}

.review-login-prompt a {
    color: #1e3c72;
    font-weight: 700;
    text-decoration: none;
}

.review-login-prompt a:hover {
    text-decoration: underline;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-empty {
    text-align: center;
    color: #333;
    font-size: 16px;
    padding: 20px 0;
}

.review-item {
    border-bottom: 1px solid #f0f0f2;
    padding-bottom: 16px;
}

.review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.review-item-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.review-author i {
    color: #9ca3af;
}

.review-stars {
    color: #fbbf24;
    display: flex;
    gap: 2px;
    font-size: 14px;
}

.review-date {
    font-size: 14px;
    color: #9ca3af;
    margin-left: auto;
}

.review-content {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* ---- Empty state (reuse) ---- */
.product-detail .product-empty {
    background: #fff;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    color: #6b6b70;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.product-detail .product-empty i {
    font-size: 40px;
    color: #d1d5db;
    margin-bottom: 14px;
    display: block;
}

.btn-back {
    display: inline-block;
    margin-top: 16px;
    color: #1e3c72;
    font-weight: 600;
    text-decoration: none;
}

.btn-back:hover {
    text-decoration: underline;
}


/* ---- Responsive ---- */

@media (max-width: 480px) {
    .product-policies-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .product-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-inline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* ---- Responsive ---- */
@media (max-width: 860px) {
    .product-detail-main {
        grid-template-columns: 1fr;
    }

    .product-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-gallery-main {
        height: 280px;
    }
}

@media (max-width: 992px) {
    .product-related .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }


}

@media (max-width: 576px) {
    .product-related .product-grid {
        grid-template-columns: 1fr;
    }

    .product-related-articles .article-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
    }

    .article-item {
        flex-direction: column;
        gap: 8px;
    }

    .article-thumb {
        width: 100%;
        height: 90px;
    }

    .product-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-contact-row {
        display: grid;
        grid-template-columns: repeat(1fr);
        gap: 10px;
    }

    .contact-item span {
        white-space: normal;
    }
}
