/* ==========================================================
   1. KHUNG CHỨA TỔNG & TIÊU ĐỀ (Phòng vệ & Chống tràn vỡ)
   ========================================================== */
.product-detail-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 0 80px 0 !important;
    overflow-x: hidden !important; /* Cắt bỏ hoàn toàn các phần thừa đẩy ngang website */
}

/* TIÊU ĐỀ H1 SẢN PHẨM */
.product-detail-container .product-title-custom,
h1.product-title-custom {
    font-size: 18px !important;
    text-align: center !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    font-family: Arial, sans-serif !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.4 !important;
}

/* TIÊU ĐỀ PHÂN VÙNG */
.product-detail-container .section-title-bar {
    background-color: #f8fafc !important;
    border-left: 4px solid #15803d !important;
    padding: 8px 10px !important;
    margin-bottom: 12px !important;
    border-radius: 0 6px 6px 0 !important;
}

.product-detail-container .section-title-bar span {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
}

.product-detail-container .section-sub-title {
    font-weight: 700 !important;
    text-align: left !important;
    font-size: 15px !important;
    color: #15803d !important;
    padding: 8px 10px !important;
    background-color: #f0fdf4 !important;
    border-left: 4px solid #15803d !important;
    border-radius: 4px !important;
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    /*scroll-margin-top: 80px !important;*/
    font-family: Arial, sans-serif !important;
}

/* KHUNG PHÒNG THỦ CHỐNG TRÀN CHO BẢNG GIÁ */
.product-detail-container .table-responsive-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important; /* Nếu màn hình cực nhỏ, chỉ bảng này cuộn ngang, không vỡ cả website */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px !important;
}


/* ==========================================================
   2. BẢNG THÔNG SỐ SẢN PHẨM PHÍA TRÊN (.info_list_sp_custom)
   ========================================================== */
table.info_list_sp_custom,
.product-detail-container table.info_list_sp_custom {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin: 10px 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-family: Arial, sans-serif !important;
}

/* Cột nhãn bên trái */
table.info_list_sp_custom .info-label-td {
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    border-bottom: 1px dashed #f1f5f9 !important;
    background-color: #fafafa !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* Cột giá trị bên phải */
table.info_list_sp_custom .info-value-td {
    padding: 10px 12px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    border-bottom: 1px dashed #f1f5f9 !important;
    vertical-align: middle !important;
}

table.info_list_sp_custom tr:last-child .info-label-td,
table.info_list_sp_custom tr:last-child .info-value-td {
    border-bottom: none !important;
}

/* Giá khuyến mãi */
.info_list_sp_custom .price-sale-custom {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #15803d !important;
}

/* Giá cũ gạch ngang */
.info_list_sp_custom .price-old-custom {
    font-size: 13px !important;
    color: #94a3b8 !important;
    margin-left: 6px !important;
}

/* Badge phần trăm giảm giá */
.info_list_sp_custom .badge-sale-custom {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    font-weight: 700 !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    border: 1px solid #fecaca !important;
    display: inline-block !important;
}

/* Ghi chú giá tham khảo */
.info_list_sp_custom .price-note-custom {
    font-size: 12px !important;
    color: #64748b !important;
    font-style: italic !important;
    margin-top: 3px !important;
    display: block !important;
}

/* Nút Xem bảng giá các cỡ */
.info_list_sp_custom .pricelist-cta-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

.info_list_sp_custom .btn-view-pricelist-custom {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 10px !important;
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.info_list_sp_custom .review-link-custom {
    color: #0284c7 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.info_list_sp_custom .text-dark-custom {
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}


/* ==========================================================
   3. BẢNG GIÁ KHỐI MODERN (.pricelist_sp)
   ========================================================== */
.product-detail-container table.pricelist_sp {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important; /* Ép bảng tuân thủ đúng tỷ lệ % cột, không tự phình rộng */
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    font-family: Arial, sans-serif !important;
}

/* Tiêu đề bảng giá */
.product-detail-container table.pricelist_sp thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 8px 2px !important;
    border: none !important;
    border-bottom: 2px solid #cbd5e1 !important;
    border-right: 1px solid #e2e8f0 !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.product-detail-container table.pricelist_sp thead th:last-child {
    border-right: none !important;
}

/* Ô dữ liệu trong bảng giá */
.product-detail-container table.pricelist_sp tbody td {
    padding: 8px 4px !important;/* Khoảng cách trên-dưới (8px) và trái-phải (4px) */
    font-size: 14px !important;/* <--- ĐÂY LÀ CỠ CHỮ CỦA CỘT KÍCH THƯỚC (Anh đổi 12px thành 13px hoặc 14px nếu muốn to hơn) */
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-right: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    vertical-align: middle !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
}

.product-detail-container table.pricelist_sp tbody td:last-child {
    border-right: none !important;
}

/* Cột 1: Tên sản phẩm */
.product-detail-container table.pricelist_sp .product-name-td {
    font-size: 12px !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    word-break: break-word !important;
}

/* Phân màu khối sản phẩm (Block rows) */
.product-detail-container table.pricelist_sp tbody tr.block-row-1,
.product-detail-container table.pricelist_sp tbody tr.block-row-1 td {
    background-color: #f8fafc !important;
}

.product-detail-container table.pricelist_sp tbody tr.block-row-2,
.product-detail-container table.pricelist_sp tbody tr.block-row-2 td {
    background-color: #ffffff !important;
}

/* Đường phân cách giữa các khung */
.product-detail-container table.pricelist_sp tbody tr.block-start td {
    border-top: 2px solid #cbd5e1 !important;
}

/* Cột giá bán */
.product-detail-container table.pricelist_sp .price-sale-table {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #15803d !important;
    display: block !important;
    line-height: 1 !important;    /* <--- Giảm chiều cao dòng xuống 1.1 để chữ sát hơn */
    margin-top: 0px !important;     /* <--- Đẩy sát lên giá cũ */
}

.product-detail-container table.pricelist_sp .price-normal-table {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #0f172a !important;
    display: block !important;
    line-height: 1 !important;
}

.product-detail-container table.pricelist_sp del {
    color: #94a3b8 !important;
    font-size: 13px !important;
    display: block !important;
    line-height: 1 !important;    /* <--- Giảm chiều cao dòng */
    margin-bottom: 0px !important;  /* <--- Bỏ khoảng trống phía dưới giá cũ */
}

/* Nút MUA chuẩn Flexbox - Căn chính giữa tuyệt đối */
.product-detail-container table.pricelist_sp .myButton {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 48px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    vertical-align: middle !important;
}
/* ==========================================================
   TỐI ƯU GIAO DIỆN MỤC TÍNH GIÁ HÀNG ĐẶT (Ô & CHỮ TO ĐẸP, CỐ ĐỊNH)
   ========================================================== */
.dat-theo-yeu-cau-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 5px !important;            /* Ép sát vào phía trên */
    padding-top: 0 !important;
    font-family: Arial, sans-serif !important;
}

/* Tiêu đề thanh ngang xanh lá */
.dat-theo-yeu-cau-box .dtyc-title {
    font-weight: 700 !important;
    text-align: left !important;
    font-size: 15px !important;
    color: #15803d !important;
    padding: 10px 12px !important;
    background-color: #f0fdf4 !important;
    border-left: 4px solid #15803d !important;
    border-radius: 4px !important;
    margin-top: 0 !important;               /* Xóa margin thừa */
    margin-bottom: 12px !important;
    scroll-margin-top: 80px !important;
}

/* Khung viền ngoài */
.dat-theo-yeu-cau-box .dtyc-wrapper {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 14px !important;
    box-sizing: border-box !important;
}

/* --- KHỐI HIỂN THỊ KẾT QUẢ TÍNH GIÁ --- */
.dat-theo-yeu-cau-box .dtyc-result-box {
    background-color: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 6px !important;
    padding: 12px !important;
    text-align: center !important;
    margin-bottom: 14px !important;
}

.dat-theo-yeu-cau-box .dtyc-result-label {
    display: block !important;
    font-size: 14px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
}

.dat-theo-yeu-cau-box .dtyc-result-price {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #dc2626 !important;
    display: block !important;
}

/* Select chọn loại sản phẩm */
.dat-theo-yeu-cau-box select[name="masanpham_hangdat"] {
    width: 100% !important;
    height: 44px !important;
    padding: 0 12px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    outline: none !important;
    box-sizing: border-box !important;
}

/* Hàng chứa 2 ô input */
.dat-theo-yeu-cau-box .dtyc-inputs-row {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Khóa cứng kích thước 2 ô input khi click/gõ chữ */
.dat-theo-yeu-cau-box .dtyc-inputs-row input.adword-textbox-demdat {
    width: calc(50% - 5px) !important;
    min-width: calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
    flex: 0 0 calc(50% - 5px) !important;   /* Khóa cứng độ rộng 50%, không bị kéo dài */
    height: 44px !important;
    padding: 0 12px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    outline: none !important;
    box-sizing: border-box !important;
}

/* Giữ nguyên kích thước khi Focus/Active */
.dat-theo-yeu-cau-box input.adword-textbox-demdat:focus {
    border-color: #15803d !important;
    width: calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
}

/* Nút Submit */
.dat-theo-yeu-cau-box input.SForm {
    width: 100% !important;
    height: 46px !important;
    background-color: #15803d !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s !important;
}

.dat-theo-yeu-cau-box input.SForm:active {
    background-color: #166534 !important;
}