:root {
    --bg: #f3f5f9;
    --card: #ffffff;
    --text: #172033;
    --muted: #647086;
    --line: #dce3ef;
    --primary: #b6151a;
    --primary-dark: #8f1115;
    --navy: #1f3559;
    --navy-soft: #eef3fb;
    --soft: #fff5f5;
    --shadow: 0 18px 40px rgba(30, 41, 59, 0.08);
    --radius: 20px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #ffffff 0%, #f7f8fc 42%, #eef2f8 100%);
}
.page-shell { padding: 30px 16px 72px; }
.container { max-width: 1120px; margin: 0 auto; }
.container.wide { max-width: 1320px; }
.container.small { max-width: 760px; }
.portal-hero {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
}
.hero-copy,.hero-side {
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(220,227,239,.92);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px 26px;
}
.hero-copy h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.sub { margin: 0; color: var(--muted); font-size: 18px; }
.hero-side p { margin: 14px 0 0; color: var(--muted); line-height: 1.6; font-size: 18px; }
.status-pill { display: inline-flex; align-items: center; padding: 9px 12px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-size: 15.6px; font-weight: 700; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 18px; }
.accent-card { background: linear-gradient(135deg, #fff 0%, #fcfdff 72%, #f2f6fd 100%); border-color: #d7e2f2; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.compact-head { margin-bottom: 14px; }
.section-kicker { margin: 0 0 6px; font-size: 12px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.card h2, .card h3 { margin: 0; }
.card h2 { font-size: 24px; }
.section-note, .package-summary { color: var(--muted); font-size: 16.8px; line-height: 1.5; }
.package-summary { background: var(--navy-soft); color: var(--navy); padding: 11px 14px; border-radius: 14px; font-weight: 700; min-width: 240px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: block; }
label > span { display: block; font-weight: 700; margin-bottom: 8px; font-size: 16.8px; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], textarea, select {
    width: 100%; border: 1px solid #cfd8e7; border-radius: 14px; padding: 13px 14px; font-size: 18px; background: #fff; color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #98acd1; box-shadow: 0 0 0 4px rgba(48, 84, 150, 0.12); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.order-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.order-table th, .order-table td { border-bottom: 1px solid var(--line); padding: 14px 16px; text-align: left; vertical-align: middle; }
.order-table thead th { background: #f7f9fc; font-size: 15.6px; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.order-table tbody tr:last-child td { border-bottom: none; }
.order-table td input[type="number"] { min-width: 120px; padding: 10px 12px; }
.single-qty-table { min-width: 540px; }
.fee-summary {
    margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.fee-summary > div { background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.fee-summary span { display: block; font-size: 14.4px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.fee-summary strong { font-size: 26px; }
.preview-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; }
.pdf-source { min-height: 120px; }
.preview-sheet { border: 1px solid var(--line); border-radius: 18px; background: #fbfcfe; padding: 22px; }
.preview-sheet h3 { margin-top: 0; }
.preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; }
.preview-list { margin: 14px 0 0; padding-left: 18px; color: var(--text); }
.preview-list li { margin-bottom: 6px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 30; }
button {
    border: none; border-radius: 14px; background: var(--primary); color: #fff; font-size: 18px; font-weight: 700; padding: 14px 20px; cursor: pointer;
    box-shadow: 0 16px 28px rgba(182, 21, 26, 0.18);
}
button:hover { background: var(--primary-dark); }
button.secondary { background: #666666; box-shadow: none; }
button.secondary:hover { background: #525252; }
.success-card { text-align: center; padding: 38px 30px; }
.success-card p { color: var(--muted); line-height: 1.6; font-size: 18px; }
.success-card .code { display: inline-block; padding: 10px 14px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.actions-inline { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
a.button-link { display: inline-flex; align-items: center; justify-content: center; padding: 13px 18px; border-radius: 14px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
a.button-link.secondary { background: #666666; }
@media (max-width: 980px) {
    .portal-hero, .grid.three, .grid.two, .preview-grid, .fee-summary { grid-template-columns: 1fr; }
    .section-head, .preview-header { flex-direction: column; }
    .sticky-actions { position: static; }
}


.book-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.book-item-card { border:1px solid var(--line); border-radius:18px; padding:18px; background:#fbfcfe; box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.book-item-name { font-weight:700; font-size:18px; margin-bottom:14px; line-height:1.35; color:var(--navy); min-height:48px; }
.book-item-inputs { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.book-item-inputs.one-col { grid-template-columns: 1fr; max-width: 220px; }
.mini-field > span { font-size: 14px; margin-bottom:6px; color: var(--muted); }
.other-item-card .book-item-name { min-height: auto; }
.order-summary-grid strong { font-size: 28px; }
.preview-sheet, .preview-list, .preview-grid { font-size: 18px; }
.preview-sheet h3 { font-size: 24px; }
.preview-sheet h4 { font-size: 20px; }
@media (max-width: 980px) { .book-grid, .book-item-inputs { grid-template-columns: 1fr; } .book-item-name { min-height:auto; } }


.pdf-preview-sheet {
    background:#fff;
    border:1px solid #bbb;
    padding:22px 20px 24px;
    border-radius:8px;
    color:#111;
    font-size:13px;
    box-shadow:0 8px 20px rgba(0,0,0,.06);
}
.pdf-brand { text-align:center; font-weight:700; font-size:24px; letter-spacing:.04em; color:#6f2b8c; margin-bottom:4px; }
.pdf-brand span { font-size:16px; }
.pdf-subbrand { text-align:center; font-size:11px; line-height:1.45; margin-bottom:10px; }
.pdf-title { text-align:center; font-weight:700; font-size:24px; margin:8px 0 16px; font-family:Georgia, 'Times New Roman', serif; }
.pdf-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.pdf-table td, .pdf-table th { border:1px solid #444; padding:6px 6px; vertical-align:middle; }
.pdf-table th { text-align:center; background:#f7f7f7; font-weight:700; }
.top-info { margin-bottom:16px; }
.top-info td.label, .dispatch-table td.label, .remark-label { font-weight:700; background:#fafafa; }
.order-matrix { margin-bottom:16px; font-size:11px; }
.order-matrix .item-label { font-size:10.5px; }
.order-matrix .qty-cell { text-align:center; font-weight:700; }
.order-matrix col, .order-matrix th:nth-child(1), .order-matrix td:nth-child(1), .order-matrix th:nth-child(4), .order-matrix td:nth-child(4), .order-matrix th:nth-child(7), .order-matrix td:nth-child(7) {}
.other-table { margin-bottom:16px; }
.other-label { width:42%; font-weight:700; }
.other-qty { width:10%; text-align:center; font-weight:700; }
.remark-label { width:16%; }
.remark-value { width:32%; }
.pdf-bottom-grid { display:grid; grid-template-columns: 1.05fr 1fr; gap:18px; align-items:start; }
.dispatch-table td { padding:8px 10px; }
.dispatch-table td.small { width:30%; }
.sign-area { padding-top:8px; font-size:14px; }
.sign-area > div { margin-bottom:22px; }
.sign-line { display:inline-block; width:220px; border-bottom:1px solid #222; vertical-align:middle; margin-left:12px; }
.preview-meta { margin-top:14px; font-size:13px; color:#444; text-align:right; }
@media (max-width: 980px) {
  .pdf-bottom-grid { grid-template-columns:1fr; }
  .sign-line { width:160px; }
}

.pdf-header-image { display:block; width:100%; height:auto; margin:0 0 10px; }
.pdf-title { text-align:center; font-weight:700; font-size:22px; margin:6px 0 14px; font-family:Georgia, 'Times New Roman', serif; }
.top-info, .order-matrix, .other-table, .dispatch-wrap { width:100%; margin-left:0; margin-right:0; }
.order-matrix { margin-bottom:16px; font-size:10.5px; }
.order-matrix td.group, .order-matrix td.sub { font-weight:700; }
.order-matrix td.sub { font-weight:400; }
.order-matrix .qty-cell { text-align:center; font-weight:700; }
.order-matrix th { font-size:10px; }
.dispatch-wrap { display:grid; grid-template-columns: 260px 1fr; gap:18px; align-items:start; }


input[readonly] {
    background: #f7f9fc;
    color: #334155;
    cursor: default;
}
#pickupDateWrap { margin: 0; }
.remark-field textarea { min-height: 120px; }


.filter-card { border-color:#d8e2f0; background:linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.filter-layout { display:grid; gap:18px; }
.filter-block { display:grid; gap:10px; }
.filter-label { font-size:14px; font-weight:700; color:var(--navy); text-transform:uppercase; letter-spacing:.05em; }
.pill-group { display:flex; flex-wrap:wrap; gap:10px; }
.filter-pill { position:relative; display:inline-flex; align-items:center; }
.filter-checkbox { position:absolute; opacity:0; pointer-events:none; }
.filter-pill span { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border-radius:999px; border:1px solid #cfd8e7; background:#fff; color:var(--navy); font-size:16px; font-weight:700; cursor:pointer; transition:all .18s ease; }
.filter-pill input:checked + span { background:var(--navy); color:#fff; border-color:var(--navy); box-shadow:0 10px 18px rgba(31,53,89,.16); }
.filter-pill input:focus + span { outline:none; box-shadow:0 0 0 4px rgba(48,84,150,0.12); }
.filter-actions-row { display:grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr); gap:18px; align-items:end; }
.toggle-group { display:flex; flex-wrap:wrap; gap:10px; }
.toggle-chip { background:#fff; color:var(--navy); border:1px solid #cfd8e7; box-shadow:none; min-height:44px; padding:10px 18px; }
.toggle-chip:hover { background:#f4f7fc; }
.toggle-chip.is-active { background:var(--primary); color:#fff; border-color:var(--primary); box-shadow:0 10px 18px rgba(182,21,26,.16); }
.filter-action-buttons { display:flex; flex-wrap:wrap; gap:10px; }
.filter-reset-btn { min-height:44px; }
.filter-help { margin:14px 0 0; color:var(--muted); font-size:15px; }
.filter-status { max-width:520px; }
.book-section.is-hidden, .book-row.is-hidden { display:none; }
.book-col.is-hidden-cell { display:none; }
.table-wrap.filter-book1 .book-col-2, .table-wrap.filter-book2 .book-col-1 { display:none; }
.table-wrap.filter-book1 .order-table thead th.book-col-2, .table-wrap.filter-book2 .order-table thead th.book-col-1 { display:none; }
@media (max-width:980px) { .filter-actions-row { grid-template-columns:1fr; } .filter-status { max-width:none; } }


.label-short { display:none; }

@media (max-width: 768px) {
    .page-shell { padding: 16px 10px 36px; }
    .card, .hero-copy, .hero-side { padding: 16px; border-radius: 16px; }
    .hero-copy h1 { font-size: 28px; }
    .sub, .hero-side p { font-size: 15px; }
    .card h2 { font-size: 21px; }
    .section-note, .package-summary, label > span { font-size: 14px; }
    .table-wrap { overflow-x: visible; }
    .order-table { min-width: 100%; table-layout: fixed; }
    .order-table th, .order-table td { padding: 10px 8px; font-size: 14px; }
    .order-table thead th { font-size: 12px; }
    .order-table td input[type="number"] { min-width: 68px; width: 68px; padding: 12px 6px; font-size: 18px; text-align: center; margin: 0 auto; }
    .book-label-cell { line-height: 1.25; word-break: break-word; }
    .label-full { display:none; }
    .label-short { display:inline; }
    .filter-pill span { min-height: 40px; padding: 9px 12px; font-size: 14px; }
    .toggle-chip, .filter-reset-btn, button, a.button-link { min-height: 42px; padding: 11px 14px; font-size: 16px; }
    .filter-help { font-size: 13px; }
    .package-summary, .filter-status { min-width: 0; width: 100%; }
    .single-qty-table { min-width: 100%; }
}


.portal-hero-simple { grid-template-columns: 1fr; }
.portal-hero-simple .hero-copy { max-width: 100%; }


/* Mobile Friendly Layout Improvements */
.container,
.container.wide,
.container.small {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.card,
.hero-copy,
.hero-side {
    width: 100%;
    border-radius: 18px;
}

@media (max-width: 768px) {
    .page-shell {
        padding: 12px 10px 40px;
    }

    .portal-hero,
    .section-head,
    .form-grid,
    .summary-grid,
    .filter-row {
        display: block !important;
    }

    .card {
        padding: 16px;
        margin-bottom: 14px;
    }

    .hero-copy,
    .hero-side {
        padding: 16px;
    }

    .hero-copy h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .sub,
    .hero-side p {
        font-size: 15px;
    }

    input,
    select,
    textarea,
    button {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    table {
        display: block;
        overflow-x: auto;
        width: 100%;
    }

    .filter-btn,
    .subject-btn,
    .level-btn {
        margin-bottom: 8px;
        width: 100%;
    }
}


/* Standardized mobile frames and filter defaults fix */
.container,
.container.wide,
.container.small {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}
.portal-hero,
.card,
.hero-copy,
.hero-side {
    width: 100%;
}
.filter-layout {
    width: 100%;
}
@media (max-width: 768px) {
    .page-shell { padding-left: 10px; padding-right: 10px; }
    .container,
    .container.wide,
    .container.small { max-width: 100%; }
    .portal-hero { display: block; margin-bottom: 14px; }
    .hero-copy,
    .hero-side,
    .card {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 16px;
    }
    .section-head,
    .compact-head {
        display: block;
        width: 100%;
    }
    .package-summary,
    .filter-status {
        width: 100%;
        min-width: 0;
        margin-top: 10px;
    }
    .filter-layout,
    .filter-block,
    .pill-group,
    .filter-action-buttons {
        width: 100%;
    }
    .filter-pill { flex: 1 1 calc(50% - 8px); }
    .filter-pill span { width: 100%; min-height: 46px; }
    .filter-actions-block .filter-pill,
    .filter-reset-btn { width: 100%; }
}


.unified-section{
width:100%!important;
max-width:100%!important;
box-sizing:border-box;
margin-left:auto;
margin-right:auto;
}

@media (max-width:768px){
.section-card,.unified-section{
width:100%!important;
max-width:100%!important;
padding:14px!important;
border-radius:14px!important;
}
.filters-grid,.form-grid{
grid-template-columns:1fr!important;
}
}



/* Alternating book rows for easier mobile reading */
.book-table tbody tr:nth-child(odd),
.book-list tr:nth-child(odd),
table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.book-table tbody tr:nth-child(even),
.book-list tr:nth-child(even),
table tbody tr:nth-child(even) {
    background: #f2f2f2;
}

/* Mobile friendly spacing */
@media (max-width: 768px) {
    .card,
    .section-card,
    .portal-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px !important;
    }

    table td,
    table th {
        padding: 10px 8px !important;
        font-size: 14px;
    }
}



/* ===== PDF PREVIEW STANDARD FONT ===== */
.pdf-preview-sheet,
.pdf-preview-sheet * {
    font-size: 12px !important;
    line-height: 1.35 !important;
    font-family: Arial, sans-serif !important;
}

/* ===== PORTRAIT PDF LAYOUT ===== */
.pdf-preview-sheet {
    width: 794px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background: #fff;
    padding: 18px !important;
    box-sizing: border-box;
}

.pdf-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

.pdf-table td,
.pdf-table th {
    word-wrap: break-word !important;
    padding: 4px !important;
    vertical-align: middle !important;
}

/* Better mobile portrait viewing */
@media (max-width: 768px) {
    .pdf-preview-sheet {
        width: 100% !important;
        padding: 10px !important;
        overflow-x: auto !important;
    }

    .pdf-preview-sheet,
    .pdf-preview-sheet * {
        font-size: 11px !important;
    }

    .pdf-table td,
    .pdf-table th {
        padding: 3px !important;
    }
}



/* ===== KEEP SUBMIT BUTTON VISIBLE ===== */
#submitBtn,
.submit-btn,
button[type="submit"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 52px !important;
    margin-top: 20px !important;
    border-radius: 12px !important;
}

/* Prevent preview area from covering submit button */
.pdf-preview-sheet {
    overflow: visible !important;
}



/* ===== FINAL SUBMIT BUTTON FIX ===== */
.submit-order-wrap{
    width:100% !important;
    display:flex !important;
    margin-top:20px !important;
}

#submitBtn,
.submit-btn,
button[type="submit"]{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative !important;
    z-index:9999 !important;
    width:100% !important;
    min-height:56px !important;
    justify-content:center !important;
    align-items:center !important;
}


/* ===== PDF CLEAN WHITE TABLE ===== */
.pdf-preview-sheet table tr,
.pdf-preview-sheet table td,
.pdf-preview-sheet table th{
    background:#ffffff !important;
}


/* Remove top right grey bars */
.section-tools,
.section-actions,
.catalog-toolbar,
.filter-toolbar,
.top-right-tools,
.toolbar-right,
.filter-right {
    display:none !important;
}

/* Remove grey title bars */
.section-title,
.table-title {
    background:none !important;
    box-shadow:none !important;
}


/* Remove section 2 top right grey box/text */
.section-tools,
.section-actions,
.catalog-toolbar,
.filter-toolbar,
.toolbar-right,
.top-right-tools,
.filter-right,
.info-box,
.info-note {
    display:none !important;
}


.section-tools,
.section-actions,
.catalog-toolbar,
.filter-toolbar,
.top-right-tools,
.toolbar-right,
.info-box,
.info-note{
display:none !important;
}


#filterStatus,
.filter-status,
.status-box,
.catalog-status,
.top-right-status{
display:none !important;
visibility:hidden !important;
height:0 !important;
overflow:hidden !important;
}


/* RIGHT BORDER + COLOR FIX */
.table-wrap,
.book-table,
.books-table,
table{
    border-right:1px solid #d9dee8 !important;
    border-collapse:collapse !important;
}

table td:last-child,
table th:last-child{
    border-right:1px solid #d9dee8 !important;
}

table tr:nth-child(even) td{
    background:#f5f5f5 !important;
}

table tr:nth-child(odd) td{
    background:#ffffff !important;
}


/* ===== REMOVE PHANTOM RIGHT COLUMN ===== */
.table-wrap,
.books-table-wrap,
.book-table-wrap{
    overflow-x:hidden !important;
}

table{
    width:100% !important;
    table-layout:fixed !important;
    border-collapse:collapse !important;
}

table th,
table td{
    border-right:1px solid #d9dee8 !important;
    box-sizing:border-box !important;
}

table th:last-child,
table td:last-child{
    border-right:1px solid #d9dee8 !important;
}

/* Remove extra spacing creating blank column */
table tr > *{
    margin:0 !important;
    padding-right:12px !important;
}

/* Mobile clean layout */
@media (max-width:768px){
    table{
        width:100% !important;
    }

    table th,
    table td{
        font-size:14px !important;
        padding:10px 8px !important;
    }
}



/* ===== MOBILE TABLE MATCH REFERENCE IMAGE ===== */
.book-section .table-wrap,
.book-section .books-table-wrap,
.book-section .book-table-wrap {
    width: 100% !important;
    overflow: hidden !important;
    border: 1px solid #d9dee8 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
}

.book-section table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border-right: 1px solid #d9dee8 !important;
}

.book-section thead th {
    background: #f5f7fb !important;
    color: #09214a !important;
    font-weight: 800 !important;
    letter-spacing: .05em !important;
    text-align: left !important;
    border-bottom: 1px solid #d9dee8 !important;
    border-right: 0 !important;
    white-space: nowrap !important;
}

.book-section tbody tr:nth-child(odd) td {
    background: #ffffff !important;
}

.book-section tbody tr:nth-child(even) td {
    background: #f3f3f3 !important;
}

.book-section td {
    border-bottom: 1px solid #d9dee8 !important;
    border-right: 0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

.book-section tbody tr:last-child td {
    border-bottom: 0 !important;
}

.book-section th:first-child,
.book-section td:first-child {
    width: 46% !important;
}

.book-section th:nth-child(2),
.book-section th:nth-child(3),
.book-section td:nth-child(2),
.book-section td:nth-child(3) {
    width: 27% !important;
    text-align: center !important;
}

.book-section input[type="number"],
.book-section input[data-order-input] {
    width: 100% !important;
    max-width: 96px !important;
    height: 58px !important;
    margin: 0 auto !important;
    display: block !important;
    border: 1px solid #d0d9e8 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

/* Art & Craft: products + quantity should only use 2 columns */
.book-section[data-category="art_craft"] th:first-child,
.book-section[data-category="others"] th:first-child,
.book-section.art-craft th:first-child,
.book-section.others th:first-child {
    width: 58% !important;
}
.book-section[data-category="art_craft"] th:nth-child(2),
.book-section[data-category="others"] th:nth-child(2),
.book-section.art-craft th:nth-child(2),
.book-section.others th:nth-child(2) {
    width: 42% !important;
}
.book-section[data-category="art_craft"] td:first-child,
.book-section[data-category="others"] td:first-child,
.book-section.art-craft td:first-child,
.book-section.others td:first-child {
    width: 58% !important;
}
.book-section[data-category="art_craft"] td:nth-child(2),
.book-section[data-category="others"] td:nth-child(2),
.book-section.art-craft td:nth-child(2),
.book-section.others td:nth-child(2) {
    width: 42% !important;
    text-align: center !important;
}

/* Remove any phantom/extra right column caused by old CSS */
.book-section table colgroup col.extra,
.book-section table colgroup col:nth-child(n+4),
.book-section table th:nth-child(n+4),
.book-section table td:nth-child(n+4) {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

@media (max-width: 768px) {
    .book-section .table-wrap,
    .book-section .books-table-wrap,
    .book-section .book-table-wrap {
        border-radius: 14px !important;
    }

    .book-section thead th {
        font-size: 13px !important;
        padding: 12px 12px !important;
    }

    .book-section td {
        font-size: 15px !important;
        padding: 14px 10px !important;
        height: 86px !important;
    }

    .book-section td:first-child {
        padding-left: 14px !important;
    }

    .book-section input[type="number"],
    .book-section input[data-order-input] {
        width: 70px !important;
        max-width: 70px !important;
        height: 56px !important;
        border-radius: 15px !important;
    }

    .book-section th:first-child,
    .book-section td:first-child {
        width: 44% !important;
    }

    .book-section th:nth-child(2),
    .book-section th:nth-child(3),
    .book-section td:nth-child(2),
    .book-section td:nth-child(3) {
        width: 28% !important;
    }
}



/* REMOVE SECTION 3 TOP RIGHT GREY BOX */
.summary-box,
.preview-summary,
.quantity-summary,
.order-summary-mini,
.section-summary,
.top-summary-box,
.section-3-summary,
.summary-pill{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    overflow:hidden !important;
    opacity:0 !important;
}



/* ===== FINAL: REMOVE ALL TOP-RIGHT GREY STATUS / EMPTY PILL BOXES ===== */
#filterStatus,
#orderCountHint,
.filter-status,
.filterStatus,
.order-count-hint,
.orderCountHint,
.summary-pill,
.status-pill,
.info-pill,
.info-box,
.info-note,
.status-box,
.catalog-status,
.top-right-status,
.top-summary-box,
.section-summary,
.quantity-summary,
.preview-summary,
.section-tools,
.section-actions,
.toolbar-right,
.top-right-tools,
.filter-right,
.catalog-toolbar,
.filter-toolbar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Remove any empty pale pill on the top-right inside section cards */
.section-card > div:empty,
.card > div:empty,
.portal-section > div:empty {
    display: none !important;
}

/* If header uses right aligned layout, keep only the left title content */
.section-card .section-header > :last-child:not(:first-child),
.card .section-header > :last-child:not(:first-child),
.portal-section .section-header > :last-child:not(:first-child) {
    display: none !important;
}
