/**
 * Onderdelen quick order — bouwt voort op .rhima-parts (product-display.css).
 * Alle kleuren via de theme --dmn-* variabelen; grijzen als neutrale fallback.
 */

.rhima-qo-title {
    font-family: var(--dmn-h2-font);
    font-size: var(--dmn-h2-size, 1.6rem);
    font-weight: var(--dmn-h2-weight, 700);
    color: var(--dmn-h2-color, var(--dmn-text, #1f2937));
    margin: 0 0 16px;
}

/* De lijst zelf: zie .rhima-parts-list--vol in product-display.css. Die staat daar
   omdat de categorielijst hem ook gebruikt; hier niets meer nodig. */

/* Regel-indeling: thumb · art.nr · naam+voorraad · prijs · aantal · knop */
.rhima-qo-item {
    grid-template-columns: 44px 104px minmax(0, 1fr) auto auto auto;
    grid-template-areas: "thumb sku name price qty add";
    gap: 14px;
    padding: 12px 16px;
}

.rhima-qo-item .rhima-parts-thumb { grid-area: thumb; }
.rhima-qo-item .rhima-parts-sku   { grid-area: sku; }
.rhima-qo-name  { grid-area: name; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rhima-qo-price { grid-area: price; }
.rhima-qo-qty   { grid-area: qty; }
.rhima-qo-add,
.rhima-qo-view  { grid-area: add; }

.rhima-qo-name a {
    color: var(--dmn-text, #1f2937);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}
.rhima-qo-name a:hover { color: var(--dmn-primary, #004AAD); }

.rhima-qo-stock { font-size: 12px; line-height: 1.2; }

.rhima-qo-price {
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Aantal-stepper */
.rhima-qo-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: var(--dmn-button-radius, 4px);
    overflow: hidden;
    background: #fff;
}
.rhima-qo-qty--empty { border: 0; background: transparent; }

.rhima-qo-step {
    width: 32px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--dmn-primary, #004AAD);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.rhima-qo-step:hover { background: #f3f4f6; }

.rhima-qo-input {
    width: 44px;
    height: 36px;
    border: 0;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 14px;
    color: var(--dmn-text, #1f2937);
    background: transparent;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}
.rhima-qo-input::-webkit-outer-spin-button,
.rhima-qo-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Knop — huisstijlkleur, radius uit de theme-var */
.rhima-qo-add.button,
.rhima-qo-view.button {
    white-space: nowrap;
    border-radius: var(--dmn-button-radius, 4px) !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}
.rhima-qo-add.button {
    background: var(--dmn-primary, #004AAD) !important;
    border: 1px solid var(--dmn-primary, #004AAD) !important;
    color: #fff !important;
    cursor: pointer;
}
.rhima-qo-add.button:hover { filter: brightness(0.94); }
.rhima-qo-add.button.is-added {
    background: var(--dmn-success, #1a9e5c) !important;
    border-color: var(--dmn-success, #1a9e5c) !important;
}

.rhima-qo-view.button {
    background: transparent !important;
    border: 1px solid var(--dmn-primary, #004AAD) !important;
    color: var(--dmn-primary, #004AAD) !important;
}

/* ── Sticky bestellijst-balk ──────────────────────────────────────── */
.rhima-qo-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--dmn-surface, #fff);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(12, 20, 27, 0.10);
}
.rhima-qo-bar[hidden] { display: none; }
.rhima-qo-bar-in {
    max-width: var(--dmn-site-width, 1180px);
    margin: 0 auto;
    padding: 12px var(--dmn-container-padding, 22px);
    display: flex;
    align-items: center;
    gap: 16px;
}
.rhima-qo-bar-sum { font-size: 14px; color: var(--dmn-text, #1f2937); }
.rhima-qo-bar-sum b { font-size: 16px; font-variant-numeric: tabular-nums; }
.rhima-qo-bar-clear {
    border: 0;
    background: transparent;
    color: var(--dmn-text, #5b6672);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.rhima-qo-bar-go.button {
    /* !important omdat de webshop-CSS `.button` een eigen marge geeft: op de quickorder
       stond de knop keurig rechts, op een categorielijst in de webshop plakte hij tegen de
       "Leegmaken"-link aan met 700px wit ernaast (gemeld door Lars, 29-09-2026). auto is
       hier wat hem naar rechts duwt, dus die mag niet overschreven worden. */
    margin-left: auto !important;
    background: var(--dmn-primary, #004AAD) !important;
    border: 1px solid var(--dmn-primary, #004AAD) !important;
    color: #fff !important;
    border-radius: var(--dmn-button-radius, 4px) !important;
    padding: 11px 22px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    cursor: pointer;
}
.rhima-qo-bar-go.button:hover { filter: brightness(0.94); }

@media (max-width: 720px) {
    .rhima-qo-bar-in { flex-wrap: wrap; gap: 10px; }
    /* Ook !important, anders wint de desktopregel hierboven en blijft de knop op een
       smal scherm halverwege hangen. */
    .rhima-qo-bar-go.button { margin-left: 0 !important; flex: 1 1 100%; text-align: center; }
}

/* ── Quick-order ín een categoriekaart (vaatwasmiddelen) ─────────── */
.rhima-cat-card-qo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 4px;
    text-align: left;
}
/* Reset de lijst-grid → compacte kaartregel */
.rhima-qo-item--card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    grid-template-columns: none;
    grid-template-areas: none;
    padding: 8px 0;
    border: 0;
    border-top: 1px solid #eef0f2;
}
.rhima-cat-card-qo .rhima-qo-item--card:first-child { border-top: 0; }
.rhima-qo-item--card .rhima-qo-name {
    flex: 1 1 100%;
    font-size: 14px;
    font-weight: 600;
}
.rhima-qo-item--card .rhima-qo-name a { color: var(--dmn-text, #1f2937); text-decoration: none; }
.rhima-qo-item--card .rhima-qo-name a:hover { color: var(--dmn-primary, #004AAD); }
.rhima-qo-item--card .rhima-qo-price {
    margin-right: auto;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.rhima-qo-item--card .rhima-qo-qty { flex: 0 0 auto; }
.rhima-qo-item--card .rhima-qo-add.button {
    flex: 0 0 auto;
    padding: 8px 14px !important;
    font-size: 12.5px !important;
}
.rhima-cat-card-more { margin-top: 6px; }

/* ── Mobiel: twee regels per artikel ─────────────────────────────── */
@media (max-width: 720px) {
    .rhima-qo-item {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb name  name"
            "thumb sku   price"
            "qty   qty   add";
        row-gap: 8px;
        column-gap: 12px;
    }
    .rhima-qo-price { text-align: left; }
    .rhima-qo-add.button,
    .rhima-qo-view.button { width: 100%; text-align: center; }
}
