/* Phú Quý Price Sync — Frontend styles */

.pq-ps-table {
    width: 100%;
    border-collapse: collapse;
}

.pq-ps-table th,
.pq-ps-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.pq-ps-table thead tr {
    background: #f5f5f5;
}

.pq-ps-col-name {
    text-align: left;
}

.pq-ps-col-price {
    text-align: right;
}

.pq-ps-unit {
    display: block;
    color: #888;
}

.pq-ps-buy {
    color: #C42028;
}

.pq-ps-sell {
    color: #028166;
}

.pq-ps-up {
    color: #028166;
}

.pq-ps-down {
    color: #C42028;
}

.pq-ps-flat {
    color: #666;
}

.pq-ps-last-update {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

.pq-ps-empty {
    color: #888;
}

/* --- Bảng lịch sử giá trong ngày --- */
/* Cấu trúc: 1 bảng riêng cho header (không cuộn) + 1 bảng riêng cho phần dữ liệu
   (nằm trong khung cuộn), dùng chung <colgroup> để 2 bảng luôn thẳng hàng cột. */

.pq-ps-lich-su-header,
.pq-ps-lich-su-body {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed;
}

.pq-ps-lich-su-header th,
.pq-ps-lich-su-body td {
    padding: 8px;
    border: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pq-ps-lich-su-wrap .pq-ps-time-col {
    text-align: left;
    padding-left: 12px;
}

.pq-ps-lich-su-scroll {
    max-height: 600px;
    overflow-y: auto;
}

/* --- Khối giá trên trang sản phẩm WooCommerce --- */

.pq-ps-product-price-box {
    margin: 10px 0;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 6px;
}

.pq-ps-product-price-box .pq-ps-row {
    margin: 0 0 4px;
}

.pq-ps-product-price-box .pq-ps-note {
    margin: 6px 0 0;
    font-size: 12px;
    color: #888;
}

/* --- Khối giá 1 sản phẩm đơn (shortcode pq_gia_san_pham) --- */

.pq-ps-gia-san-pham {
    display: inline-block;
}
.button, button, fieldset, input, select, textarea {
    margin-bottom: 0;
        margin-right: 0;
}
.pq-ps-date-range-form button{
    padding: 0px 18px;
    min-height: 0.5em;
}
input[type=date]{
        height: 2.8em;
}
.pq-ps-gia-san-pham .pq-ps-current-buy{
   color:#c42028; 
   font-weight: bold;
}
.pq-ps-gia-san-pham .pq-ps-current-sell{
  color:#028166;  
  font-weight: bold;
}
/* --- Khối giá 1 sản phẩm đơn (shortcode pq_gia_san_pham) --- */

.pq-ps-gia-san-pham {
    display: inline-block;
}

/* --- Khối thông tin dưới nút "Thêm vào giỏ" (Mã SP, Hàm lượng, Zalo, chính sách) --- */

.pq-ps-info-box {
    margin: 20px 0;
}

.pq-ps-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 20px;
}

.pq-ps-info-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pq-ps-info-line {
    font-size: 14px;
    text-transform: uppercase;
    color: #1a2745;
}

.pq-ps-zalo-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 50px;
    margin-bottom: 20px;
    background: rgba(224, 224, 224, 0.25);
    border-radius: 5px;
    text-decoration: none;
}

.pq-ps-zalo-btn:hover {
    background: rgba(224, 224, 224, 0.45);
}

.pq-ps-zalo-text {
    flex: 1;
    color: #0068FE;
    font-size: 14px;
    text-align: center;
}

.pq-ps-policy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.pq-ps-policy-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
}

.pq-ps-policy-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .pq-ps-policy-grid {
        grid-template-columns: 1fr;
    }
}