/* Searchable equipment list */
.quote-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: 12px;
    margin: 24px 0;
}
.quote-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 80px;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d9dfe5;
    border-radius: 12px;
    background: #fff;
    color: #182431;
}
.quote-item[hidden], .quote-next [hidden] { display: none; }
.quote-item > img { width: 72px; height: 72px; object-fit: contain; }
.quote-item-info { grid-column: 2; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.quote-item:not(:has(> img)) .quote-item-info { grid-column: 1 / 3; }
.quote-item-info > a { font-weight: 700; color: #183244; overflow-wrap: anywhere; }
.quote-item-info small { color: #475569; font-size: 14px; line-height: 1.5; }
.quote-quantity { grid-column: 3; min-width: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.quote-controls input { max-width: 100%; padding: 10px; border: 1px solid #94a3b8; border-radius: 6px; color: #17212d; background: white; }
.quote-quantity input { width: 76px; font-size: 16px; }

.quote-small { font-size:13px; color:#475569 }
.quote-paper { background:#fff; color:#17212d; border:1px solid #d6dce2; padding:40px; margin:32px auto; max-width:900px }
.quote-brand { display:flex; justify-content:space-between; gap:20px; border-bottom:3px solid #bb623b; padding-bottom:24px; font-size:13px }
.quote-brand>div:first-child { display:grid; grid-template-columns:60px 1fr; column-gap:15px }
.quote-brand img { grid-row:1/3 }
.quote-brand strong { font-size:26px }
.quote-eyebrow { font-size:12px; letter-spacing:2px; color:#924322; margin-top:28px }
.quote-paper h2 { font-size:28px; color:#17212d; margin:12px 0 }
.quote-table-wrap { overflow-x:auto }
.quote-paper table { border-collapse:collapse; width:100%; font-size:14px; margin:24px 0 }
.quote-paper th { text-align:left; background:#eef1f4 }
.quote-paper td,.quote-paper th { padding:12px 8px; border-bottom:1px solid #d6dce2 }
.quote-paper td:not(:first-child),.quote-paper th:not(:first-child) { text-align:right; white-space:nowrap }
.quote-total { text-align:right; font-size:20px }
.quote-terms { font-size:12px; line-height:1.6; color:#475569; margin-top:28px }
.quote-sign { border-top:1px solid #d6dce2; margin-top:28px; padding-top:12px; font-size:12px }
.quote-actions { max-width:900px; margin:auto }
.quote-actions p { font-size:14px; margin-top:15px }
.quote-actions button { cursor:pointer }
.quote-actions button:disabled { opacity:.5; cursor:not-allowed }

.quote-next { margin:32px 0; padding:24px; border-radius:18px; background:#fff2e9; border:1px solid #dfb79e }
.quote-next h2 { margin-top:0 }
.quote-next .quote-actions { display:flex; flex-wrap:wrap; gap:12px }

@media (max-width: 600px) {
    .quote-paper { padding: 18px; overflow-wrap: anywhere; }
    .quote-brand { flex-direction: column; }
    .quote-paper table { font-size: 12px; }
    .quote-paper h2 { font-size: 23px; }
    .quote-next { padding: 20px 16px; }
    .quote-next .btn { width: 100%; text-align: center; }
}
@media (max-width: 420px) {
    .quote-item { grid-template-columns: 56px minmax(0, 1fr) 70px; padding: 12px; gap: 8px; }
    .quote-item > img { width: 56px; height: 56px; }
    .quote-quantity input { width: 64px; }
}

@media print {
    @page { size: A4; margin: 15mm; }
    body { background: white !important; overflow: visible; }
    body > .site-navbar, body > footer, .site-skip, .floating-wa, .quote-controls, .site-page-hero { display: none !important; }
    main, .site-section, .container { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    .quote-paper { border: 0; margin: 0; padding: 0; max-width: none; }
    .quote-brand { flex-direction: row; }
    .quote-paper table { font-size: 10pt; }
    .quote-paper th { background: #eee !important; print-color-adjust: exact; }
    .quote-paper thead { display: table-header-group; }
    .quote-paper tr, .quote-terms, .quote-total, .quote-sign { break-inside: avoid; }
    .quote-table-wrap { overflow: visible; }
    .quote-paper h2 { font-size: 22pt; }
}

.floating-wa { display: none !important; }
.cart-workspace { max-width: 900px; margin: 0 auto; }
.cart-heading, .cart-checkout { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.cart-heading h2 { margin: 0; font-size: clamp(1.3rem,2.6vw,1.85rem); line-height: 1.24; }
.cart-heading a { color: #863d21; font-weight: 700; text-underline-offset: .18em; }
.cart-workspace > p:empty { display: none; }
.cart-workspace > details, .cart-workspace > label { display: block; margin-top: 20px; }
.cart-workspace summary { font-weight: 700; cursor: pointer; }
#quote-selection-warning, #quote-feedback { font-size: .94rem; color: #475569; }
#cart-empty { background: #f2f5f7; border-radius: 12px; padding: 20px; }
.cart-lines { list-style: none; margin: 12px 0; padding: 0; }
.cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(92px, auto) auto;
    grid-template-areas: "model step amount remove" "unit step amount remove";
    align-items: center;
    gap: 3px 20px;
    padding: 16px 0;
    border-bottom: 1px solid #d4dce2;
}
.cart-model { grid-area: model; color: #193449; font-weight: 700; overflow-wrap: anywhere; }
.cart-unit-price { grid-area: unit; color: #526374; }
.cart-amount { grid-area: amount; white-space: nowrap; text-align: right; }
.cart-stepper { grid-area: step; display: inline-flex; align-items: center; justify-self: start; }
.cart-stepper .cart-step, .cart-stepper .cart-qty {
    min-width: 42px; width: 42px; height: 44px; min-height: 44px; margin: 0; padding: 0;
    background: #fff; color: #183244; border: 1px solid #a6b5c0; border-radius: 0; text-align: center;
}
.cart-stepper .cart-step { font: inherit; font-weight: 700; font-size: 1.22rem; cursor: pointer; }
.cart-stepper .cart-step:first-child { border-radius: 8px 0 0 8px; }
.cart-stepper .cart-step:last-child { border-radius: 0 8px 8px 0; }
.cart-stepper .cart-step:disabled { color: #7b8891; background: #f4f5f6; cursor: default; }
.cart-stepper .cart-qty { font: inherit; font-size: 16px; width: 48px; appearance: textfield; border-left: 0; border-right: 0; }
.cart-qty::-webkit-inner-spin-button, .cart-qty::-webkit-outer-spin-button { appearance: none; }
.cart-stepper .cart-qty[aria-invalid] { outline: 2px solid #a52b1b; outline-offset: -2px; }
.cart-remove { grid-area: remove; justify-self: end; background: none; border: 0; color: #8a3e24; font: inherit; text-decoration: underline; text-underline-offset: .18em; min-height: 44px; cursor: pointer; }
.cart-checkout { padding: 16px 20px; border-radius: 12px; background: #edf3f6; color: #183244; }
.cart-checkout[hidden], #quote-paper[hidden], .quote-next[hidden], #quote-document-actions[hidden] { display: none; }
.cart-checkout > div { display: grid; gap: 2px; }
.cart-checkout > div span { font-size: .875rem; }
#cart-total { font-size: 1.38rem; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-checkout .btn { cursor: pointer; }
.cart-checkout .btn:disabled { opacity: .6; cursor: default; }

@media screen and (max-width: 700px) {
    .cart-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "model remove" "unit unit" "step amount"; gap: 5px 10px; }
    .cart-remove { align-self: start; }
    .cart-stepper, .cart-amount { margin-top: 6px; }
    body:has(#cart-checkout:not([hidden])) { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
    /* The cart already provides a WhatsApp action for the selected models. */
    .site-page-hero.quote-controls { padding-top: 80px; padding-bottom: 12px; }
    .site-page-hero.quote-controls .site-breadcrumbs { margin: 0 0 6px; }
    .site-page-hero.quote-controls h1 { font-size: clamp(1.5rem, 7vw, 1.9rem); margin: 0; }
    .site-page-hero.quote-controls .site-lead { display: none; }
    .site-page-hero.quote-controls + .site-section { padding-top: 16px; }
    .cart-heading h2 { font-size: 1.1rem; line-height: 1.3; }
    .cart-heading { gap: 4px 14px; }
    .cart-lines { margin-top: 4px; }
    .cart-checkout {
        position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; flex-wrap: nowrap;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-radius: 0; border-top: 1px solid #cad4db;
        box-shadow: 0 -3px 18px #18243116; background: #fff;
    }
    #cart-total { font-size: clamp(1rem, 4.6vw, 1.3rem); }
    .cart-checkout .btn { min-height: 44px; padding: 9px 12px; white-space: normal; text-align: center; line-height: 1.24; }
}

#personal-budget {
    border: 1px solid #c6d3da; border-radius: 12px; padding: 0 16px;
    background: #f7f9fa; color: #183244;
}
#personal-budget[hidden], #budget-reset[hidden] { display: none; }
#personal-budget summary { padding: 14px 0; line-height: 1.5; }
#budget-preview { display: block; font-size: .94rem; font-weight: 500; }
#budget-preview:empty { display: none; }
#personal-budget[open] #budget-preview { display: none; }
#budget-help, #budget-result { margin: 4px 0 14px; }
#budget-result { font-weight: 700; }
.budget-line {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(8rem,12rem);
    align-items: center; column-gap: 22px; padding: 12px 0; border-top: 1px solid #d4dce2;
}
.budget-line > span { display: grid; gap: 4px; overflow-wrap: anywhere; }
.budget-line small { color: #475569; font-size: .875rem; }
.budget-line input { width: 100%; box-sizing: border-box; font: inherit; font-variant-numeric: tabular-nums; }
.budget-line input[aria-invalid="true"] { border-color: #a52b1b; }
#budget-reset { margin-bottom: 6px; }
@media (max-width: 520px) {
    .budget-line { grid-template-columns: minmax(0,1fr); gap: 8px; }
}

/* Keep the catalog return, editable lines and download in the same compact workspace. */
@media screen {
    .cart-hero { background: #192a34; padding-bottom: clamp(1.5rem, 3.5vw, 3rem); }
    .cart-hero + .site-section { background: #faf8f4; padding: clamp(1.25rem, 3.5vw, 3.25rem) 0; }
    .cart-workspace { padding: clamp(1rem, 3vw, 2rem); border-radius: 16px; background: #fff; border: 1px solid #d6dcda; }
    .cart-heading { margin-bottom: .85rem; padding-bottom: .85rem; border-bottom: 1px solid #d6dcda; }
    .cart-heading:has(#cart-empty:not([hidden])) { padding-bottom: 0; border: 0; }
    .cart-workspace summary::marker { color: #9c4125; }
    #cart-checkout:not([hidden]) ~ p:has(#quote-help) { display: none; }
    .cart-heading a.btn { min-height: 44px; padding: .65rem 1rem; color: #fff; }
    .cart-heading:has(#cart-empty[hidden]) a { color: #843b20; background: transparent; border-color: #ceb3a2; }
    .cart-heading:has(#cart-empty[hidden]) a:hover { background: #fff1e7; }
    .cart-heading:has(#cart-empty:not([hidden])) { display: grid; justify-items: start; gap: .65rem; margin: 0; }
    .cart-heading:has(#cart-empty:not([hidden])) h2 { display: none; }
    #cart-empty { font-size: 1.1rem; font-weight: 650; background: none; margin: 0; padding: 0; color: #213842; }
    #cart-empty[hidden], #quote-recipient-fields[hidden] { display: none; }
    .cart-lines:empty { margin: 0; }
    .cart-line { grid-template-columns: 58px minmax(0,1fr) auto minmax(85px,auto) auto; grid-template-areas: "photo model step amount remove" "photo unit step amount remove"; gap: 3px 12px; }
    .cart-model-photo { grid-area: photo; width: 58px; height: 58px; object-fit: contain; }
    .cart-workspace details { border-radius: 10px; }
    .cart-workspace > details:not(#personal-budget) { background: #faf9f6; border: 1px solid #d7ddda; padding: 0 1rem; }
    .cart-workspace > details:not(#personal-budget) > summary { padding: .8rem 0; }
    .cart-workspace details > label { display: grid; gap: .35rem; }
    #quote-recipient-fields input, #quote-search { width: min(100%, 35rem); font-size: 1rem; }
    #quote-recipient-fields p { margin: .5rem 0 .85rem; }
    .cart-checkout { margin-top: 1.25rem; padding: clamp(1rem,2.5vw,1.45rem); background: #20363d; color: #fff; }
    #cart-total { font-size: clamp(1.4rem,2.5vw,1.85rem); }
    #cart-unit-count { color: #d0dedf; }
    .cart-workspace a:focus-visible, .cart-workspace button:focus-visible, .cart-workspace summary:focus-visible { outline: 3px solid #147365; outline-offset: 2px; }
    .quote-next { margin: 1.25rem auto; max-width: 900px; }
}
@media screen and (max-width: 700px) {
    .cart-heading { align-items: baseline; }
    .cart-heading:has(#cart-empty[hidden]) a { padding: .5rem .6rem; font-size: .88rem; }
    .cart-line { grid-template-columns: minmax(52px,max-content) minmax(0,1fr) auto; grid-template-areas: "photo model model" "remove unit unit" "step step amount"; gap: .25rem .6rem; }
    .cart-model-photo { width: 44px; height: 44px; justify-self: center; }
    .cart-line .cart-remove { justify-self: start; align-self: center; font-size: .85rem; }
    .cart-checkout > div { flex: 1 1 auto; }
    .cart-checkout .btn { flex: 0 1 auto; width: auto; max-width: 50%; }
    .cart-workspace > details { margin-top: .7rem; }
    .cart-checkout { margin: 0; padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom)); background: #fff; color: #183244; }
    #cart-total { font-size: clamp(1rem,4.6vw,1.3rem); }
    #cart-unit-count { color: #52646e; }
    html:has(.cart-checkout:not([hidden])) { scroll-padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
}
