/**
 * assets/css/quote-cart.css
 *
 * KHÂU 6 — CSS riêng cho khối Phụ kiện + CTA báo giá + trang Giỏ báo giá.
 * KHÔNG phải main.css tổng thể của theme (main.css thuộc phạm vi Khâu 5,
 * làm sau bằng Claude Design) — file này chỉ style các thành phần MỚI
 * thêm ở Khâu 6 để không bị hiển thị thô khi main.css chưa tồn tại.
 * Dùng biến CSS --b2b-primary để dễ đồng bộ màu thương hiệu về sau.
 */

:root {
    --b2b-primary: #C00000;
    --b2b-primary-soft: #fdeaea;
    --b2b-text: #222;
    --b2b-text-muted: #6b7280;
    --b2b-border: #e5e7eb;
    --b2b-bg-gray: #f7f7f8;
    --b2b-radius: 10px;
}

/* ---------- Phụ kiện tiêu chuẩn ---------- */
.b2b-section-acc-standard .b2b-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.b2b-acc-badge {
    font-size: 12px;
    font-weight: 600;
    color: #2f8f4e;
    background: #eaf7ee;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.b2b-acc-badge-optional {
    color: var(--b2b-primary);
    background: var(--b2b-primary-soft);
}
.b2b-acc-standard-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px 24px;
}
.b2b-acc-standard-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14.5px;
    color: var(--b2b-text);
    line-height: 1.5;
}
.b2b-acc-standard-list li::before {
    content: "\2713";
    color: #2f8f4e;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- Phụ kiện tùy chọn ---------- */
.b2b-acc-optional-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.b2b-acc-optional-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--b2b-border);
    border-radius: var(--b2b-radius);
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.b2b-acc-optional-item:hover {
    border-color: var(--b2b-primary);
    background: var(--b2b-primary-soft);
}
.b2b-acc-optional-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--b2b-primary);
    flex-shrink: 0;
}
.b2b-acc-optional-name {
    flex: 1;
    font-size: 14.5px;
    color: var(--b2b-text);
}

/* ---------- CTA báo giá (gộp, thay RFQ cũ) ---------- */
.b2b-quote-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 8px 4px;
}
.b2b-quote-cta-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--b2b-text);
}
.b2b-quote-cta-sub {
    margin: 0;
    font-size: 14px;
    color: var(--b2b-text-muted);
    max-width: 420px;
}
.b2b-quote-cta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.b2b-btn-quote-primary,
.b2b-btn-quote-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 12px 22px;
    border: none;
    cursor: pointer;
    transition: opacity .15s ease, transform .1s ease;
    white-space: nowrap;
}
.b2b-btn-quote-primary {
    background: var(--b2b-primary);
    color: #fff;
}
.b2b-btn-quote-primary:hover { opacity: .9; }
.b2b-btn-quote-secondary {
    background: #fff;
    color: var(--b2b-primary);
    border: 1.5px solid var(--b2b-primary);
}
.b2b-btn-quote-secondary:hover { background: var(--b2b-primary-soft); }
.b2b-btn-quote-primary:active,
.b2b-btn-quote-secondary:active { transform: scale(.97); }

.b2b-view-qc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--b2b-text-muted);
    text-decoration: none;
}
.b2b-view-qc-btn:hover { color: var(--b2b-primary); }
.b2b-qc-badge-inline {
    background: var(--b2b-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* ---------- Trang Giỏ báo giá ---------- */
.b2b-qc-page { padding: 32px 0 64px; }
.b2b-qc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.b2b-qc-count-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--b2b-text-muted);
}
.b2b-qc-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--b2b-border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--b2b-text-muted);
    cursor: pointer;
}
.b2b-qc-clear-btn:hover { border-color: var(--b2b-primary); color: var(--b2b-primary); }

.b2b-qc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 64px 20px;
    color: var(--b2b-text-muted);
}
.b2b-qc-empty i { font-size: 48px; opacity: .4; }

.b2b-qc-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 860px) {
    .b2b-qc-layout { grid-template-columns: 1fr; }
}

.b2b-qc-list-header {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr 32px;
    gap: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--b2b-text-muted);
    border-bottom: 1px solid var(--b2b-border);
}
.b2b-qc-item {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr 32px;
    gap: 8px;
    align-items: center;
    padding: 14px 12px;
    border-bottom: 1px solid var(--b2b-border);
    font-size: 14px;
}
.b2b-qc-item-name a { color: var(--b2b-text); text-decoration: none; font-weight: 600; }
.b2b-qc-item-accessories {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 12.5px;
    color: var(--b2b-text-muted);
}
.b2b-qc-item-accessories li { padding: 1px 0; }
.b2b-qc-item-qty { display: flex; align-items: center; gap: 4px; }
.b2b-qc-qty-btn {
    width: 24px; height: 24px;
    border: 1px solid var(--b2b-border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}
.b2b-qc-qty-input {
    width: 40px; text-align: center;
    border: 1px solid var(--b2b-border);
    border-radius: 6px;
    padding: 4px 0;
}
.b2b-qc-item-total { font-weight: 700; color: var(--b2b-primary); }
.b2b-qc-remove {
    background: none; border: none; cursor: pointer;
    color: var(--b2b-text-muted); font-size: 16px;
}
.b2b-qc-remove:hover { color: var(--b2b-primary); }

.b2b-qc-summary {
    margin-top: 16px;
    background: var(--b2b-bg-gray);
    border-radius: var(--b2b-radius);
    padding: 16px;
}
.b2b-qc-summary-row {
    display: flex; justify-content: space-between;
    font-size: 14px; padding: 4px 0;
}
.b2b-qc-summary-total strong { color: var(--b2b-primary); font-size: 18px; }
.b2b-qc-summary-note {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--b2b-text-muted); margin: 8px 0 0;
}
.b2b-qc-continue {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 16px; font-size: 14px; color: var(--b2b-text-muted);
    text-decoration: none;
}
.b2b-qc-continue:hover { color: var(--b2b-primary); }

.b2b-qc-form-wrap {
    border: 1px solid var(--b2b-border);
    border-radius: var(--b2b-radius);
    padding: 20px;
}
.b2b-cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .b2b-cf-row { grid-template-columns: 1fr; } }
.b2b-cf-group { margin-bottom: 12px; }
.b2b-cf-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.b2b-cf-req { color: var(--b2b-primary); }
.b2b-cf-group input[type="text"],
.b2b-cf-group input[type="tel"],
.b2b-cf-group input[type="email"],
.b2b-cf-group textarea {
    width: 100%;
    border: 1px solid var(--b2b-border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    box-sizing: border-box;
}
.b2b-cf-error { display: block; color: var(--b2b-primary); font-size: 12px; margin-top: 3px; }
.b2b-contact-submit {
    width: 100%;
    background: var(--b2b-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.b2b-contact-submit:disabled { opacity: .6; cursor: not-allowed; }
.b2b-contact-note {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 12px; color: var(--b2b-text-muted); margin-top: 10px;
}
.b2b-contact-success, .b2b-contact-error {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px;
}
.b2b-contact-success { background: #eaf7ee; color: #2f8f4e; }
.b2b-contact-error { background: var(--b2b-primary-soft); color: var(--b2b-primary); }

/* ============================================================
   KHÂU 5 — SINGLE-PRODUCT.PHP (hướng B + E đã duyệt với Tan)
   File này chỉ load ở trang sản phẩm + trang Giỏ báo giá (xem
   functions.php), nên mọi CSS riêng của single-product.php đặt ở đây
   thay vì main.css (main.css dành cho trang chủ M1–M10).
   ============================================================ */

.b2b-mobile-cta-bar { display: none; }

/* Đã chuyển .b2b-breadcrumb sang assets/css/main.css — dùng chung cho mọi
   trang (sản phẩm, News, danh mục...), không riêng trang sản phẩm nữa. */

.b2b-container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---------- HERO: 2 cột, phải sticky (hướng B) ---------- */
.b2b-product-hero { padding: 8px 0 32px; }
.b2b-product-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: start;
}
.b2b-product-main-img {
    aspect-ratio: 4/3;
    background: #fff;
    border: 1px solid var(--b2b-border);
    border-radius: var(--b2b-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.b2b-product-main-img img { width: 100%; height: 100%; object-fit: contain; }
.b2b-product-img-placeholder {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: #bbb; font-size: 40px;
}
.b2b-product-img-placeholder span { font-size: 13px; color: var(--b2b-text-muted); }

.b2b-product-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}
.b2b-thumb-btn {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid var(--b2b-border);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
}
.b2b-thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.b2b-thumb-btn.b2b-thumb-active { border: 2px solid var(--b2b-primary); }
.b2b-thumb-btn:hover { border-color: var(--b2b-primary); }

/* Chuyển sang assets/css/main.css — cần dùng chung cho cả trang sản
   phẩm lẫn trang News (single.php), mà quote-cart.css chỉ load ở trang
   sản phẩm/giỏ báo giá. Xem main.css mục “CHIA SẼ MẠNG XÃ HỘI”. */

.b2b-sticky-col { position: sticky; top: 88px; }

.b2b-prod-title-wrap { margin-bottom: 12px; }
.b2b-prod-tag {
    display: inline-block; font-size: 12px; font-weight: 700; color: var(--b2b-primary);
    background: var(--b2b-primary-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.b2b-prod-title { font-size: 24px; font-weight: 700; line-height: 1.3; margin: 0; color: var(--b2b-text); }

.b2b-prod-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.b2b-meta-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; padding: 4px 0; border-bottom: 1px solid var(--b2b-border); }
.b2b-meta-label { display: flex; align-items: center; gap: 6px; color: var(--b2b-text-muted); }
.b2b-meta-value { font-weight: 600; color: var(--b2b-text); }
.b2b-prod-price { color: var(--b2b-primary); font-size: 15px; }

.b2b-prod-short-desc { font-size: 14px; color: var(--b2b-text-muted); line-height: 1.6; margin-bottom: 14px; }
.b2b-prod-short-desc p { margin: 0 0 8px; }

.b2b-brand-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: var(--b2b-primary);
    background: var(--b2b-primary-soft); padding: 6px 12px; border-radius: 8px;
    margin-bottom: 14px;
}

.b2b-spec-preview-card {
    border: 1px solid var(--b2b-border); border-radius: var(--b2b-radius);
    padding: 14px; margin-bottom: 14px;
}
.b2b-spec-preview-title { font-size: 13px; font-weight: 700; margin: 0 0 8px; color: var(--b2b-text); }
.b2b-spec-preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.b2b-spec-preview-table td { padding: 5px 0; border-bottom: 1px solid var(--b2b-border); }
.b2b-spec-preview-table td:first-child { color: var(--b2b-text-muted); }
.b2b-spec-preview-table td:last-child { text-align: right; font-weight: 600; color: var(--b2b-text); }
.b2b-spec-preview-table tr:last-child td { border-bottom: none; }
.b2b-spec-preview-link {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 12.5px; color: var(--b2b-primary); margin-top: 10px; text-decoration: none;
}
.b2b-spec-preview-link:hover { text-decoration: underline; }

.b2b-quote-cta-card {
    border: 2px solid var(--b2b-primary); border-radius: var(--b2b-radius);
    padding: 16px; margin-bottom: 12px;
}
.b2b-quote-cta-card-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--b2b-text); }
.b2b-cta-btn-block { width: 100%; justify-content: center; margin-bottom: 8px; }
.b2b-hotline-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--b2b-text-muted); margin-top: 10px; text-decoration: none;
}
.b2b-hotline-row:hover { color: var(--b2b-primary); }

.b2b-btn-datasheet {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--b2b-text-muted);
    border: 1px solid var(--b2b-border); border-radius: 999px; padding: 10px; text-decoration: none;
}
.b2b-btn-datasheet:hover { border-color: var(--b2b-primary); color: var(--b2b-primary); }

/* ---------- SECTION full-width chung (Mô tả / Thông số / FAQ / Video) ----------
   KHÂU 5 (cập nhật theo Tan): khoảng cách giữa các section giảm 1/2 so với
   ban đầu (28px → 14px). ---------- */
.b2b-lower-section { padding: 14px 0; }
.b2b-container-card {
    max-width: 1280px; margin: 0 auto; padding: 24px 20px;
}
.b2b-bg-gray { background: var(--b2b-bg-gray); border-radius: var(--b2b-radius); }
.b2b-bg-white { background: #fff; }

.b2b-desc-content { font-size: 15px; line-height: 1.75; color: var(--b2b-text); }
.b2b-desc-content p { margin: 0 0 14px; }
.b2b-desc-content img { max-width: 100%; border-radius: 8px; margin: 14px 0; }

.b2b-spec-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.b2b-spec-content td, .b2b-spec-content th { padding: 10px 12px; border-bottom: 1px solid var(--b2b-border); text-align: left; }
.b2b-spec-content td:first-child { color: var(--b2b-text-muted); width: 45%; }
.b2b-spec-content td:last-child { font-weight: 600; color: var(--b2b-text); }
.b2b-spec-content tr:nth-child(even) { background: var(--b2b-bg-gray); }

/* ---------- Khối "Cấu hình báo giá" (gộp phụ kiện + CTA) ---------- */
.b2b-quote-config-card {
    border: 2px solid var(--b2b-primary); border-radius: 12px;
    padding: 24px; background: #fff;
}
.b2b-quote-config-title { margin: 0 0 4px; }
.b2b-quote-config-sub { font-size: 13.5px; color: var(--b2b-text-muted); margin: 0 0 20px; }
.b2b-quote-config-subheading { font-size: 15px; font-weight: 700; margin: 0; color: var(--b2b-text); }
.b2b-section-acc-standard, .b2b-section-acc-optional { margin-bottom: 20px; }
.b2b-quote-config-actions {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    border-top: 1px solid var(--b2b-border); padding-top: 18px; margin-top: 4px;
}

/* ---------- FAQ đã chuyển sang assets/css/main.css — dùng chung cho
   cả trang sản phẩm lẫn Forum (single-forum.php không load file này). ---------- */

/* ---------- Video và hình ảnh thực tế ("Galaxy") ---------- */
.b2b-galaxy-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.b2b-galaxy-yt-wrap { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.b2b-galaxy-yt-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b2b-galaxy-img-wrap { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--b2b-bg-gray); }
.b2b-galaxy-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.b2b-galaxy-placeholder {
    aspect-ratio: 16/9; border-radius: 8px; background: var(--b2b-bg-gray);
    display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 32px;
}
.b2b-galaxy-placeholder-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.b2b-galaxy-placeholder-inner span { font-size: 12px; color: var(--b2b-text-muted); }

/* ---------- Sản phẩm cùng danh mục — tái dùng .b2b-product-card từ main.css ---------- */
.b2b-related-section { padding: 14px 0 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .b2b-product-hero-grid { grid-template-columns: 1fr; }
    .b2b-sticky-col { position: static; }
    .b2b-galaxy-grid { grid-template-columns: 1fr; }

    /* KHÂU 5 — thanh CTA dính đáy màn hình thay cho sidebar sticky đã tắt ở trên */
    .b2b-mobile-cta-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        background: #fff;
        border-top: 1px solid var(--b2b-border);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    }
    .b2b-mobile-cta-price {
        flex-shrink: 0;
        font-size: 14px;
        font-weight: 700;
        color: var(--b2b-primary);
        white-space: nowrap;
    }
    .b2b-mobile-cta-btn { flex: 1; justify-content: center; margin: 0; }
    body.b2b-product-detail { padding-bottom: 68px; }
}
@media (max-width: 600px) {
    .b2b-container-card { padding: 18px 16px; }
    .b2b-quote-config-card { padding: 18px; }
    .b2b-quote-config-actions { flex-direction: column; align-items: stretch; }
}
