/* DAGMAR B2B: components stay independent of Porto/WVT/Flycart selectors. */
.db2b-options,
.db2b-summary-card,
.db2b-purchase-form,
.db2b-options *,
.db2b-summary-card *,
.db2b-purchase-form * { box-sizing: border-box; }

.db2b-options {
    --db2b-burgundy: #54212b;
    --db2b-gold: #b5975d;
    margin: 14px 0 20px;
    border: 1px solid #d9c8b1;
    border-radius: 8px;
    background: #fff;
    color: #35292a;
    overflow: hidden;
    scroll-margin-top: 110px;
    transition: box-shadow .2s, border-color .2s;
    container: db2b-offer / inline-size;
}
.db2b-options:focus { outline: none; }
.db2b-options--highlight,
.db2b-options:focus-visible { border-color: #a9894b; box-shadow: 0 0 0 3px #b5975d38; }
.db2b-options-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 9px; padding: 10px 14px; border-bottom: 1px solid #e8ddd0; background: #f8f3ec; }
.db2b-options .db2b-options-heading h2 { margin: 0; color: #54212b; font-size: 15px; font-weight: 750; line-height: 1.35; letter-spacing: 0; }
.db2b-heading-subtitle { color: #76644e; font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: .01em; }
.db2b-eyebrow { display: block; margin-bottom: 4px; color: #8d6b37; font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.db2b-options-heading > .db2b-eyebrow { display: none; }
.db2b-options-heading > .db2b-availability { flex-basis: 100%; margin-top: 2px; }
.db2b-options .db2b-availability,
.db2b-summary-card .db2b-availability { margin: 0; color: #756965; font-size: 11px; line-height: 1.4; letter-spacing: 0; }

.db2b-option { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(110px, auto) minmax(262px, auto); align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid #eee5dc; }
.db2b-option:first-of-type { border-top: 0; }
.db2b-option-description { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.db2b-option-title { display: block; margin: 0; color: #493333; font-size: 13px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.db2b-minimum { display: block; color: #756660; font-size: 11px; line-height: 1.4; }
.db2b-minimum strong { color: #493333; font-weight: 700; }
.db2b-step-note { display: block; color: #8a7b74; font-size: 11px; line-height: 1.35; }
.db2b-option-cost,
.db2b-summary-cost { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 3px; min-width: 0; color: #54212b; line-height: 1.2; }
.db2b-unit-value { color: inherit; font-size: 20px; font-weight: 750; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.db2b-unit-value > .woocommerce-Price-amount { color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.db2b-unit-value .woocommerce-Price-currencySymbol { display: inline-block; color: inherit; font-size: .7em; font-weight: 600; letter-spacing: 0; }
.db2b-unit-label { color: #796d67; font-size: 11px; font-weight: 400; line-height: 1.25; white-space: nowrap; letter-spacing: 0; }
.db2b-tax-note { display: block; flex-basis: 100%; margin: 1px 0 0; color: #6f6057; font-size: 11px; font-weight: 400; line-height: 1.2; letter-spacing: 0; }
.db2b-from { align-self: baseline; color: #786354; font-size: 11px; line-height: 1.3; letter-spacing: 0; }
.db2b-option-action { min-width: 0; }
.db2b-purchase-form { margin: 0; padding: 0; }
.db2b-form-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; }
.db2b-quantity-group { flex: 0 0 auto; }
.db2b-quantity-group > label { display: block; margin: 0 0 3px; color: #86766d; font-size: 11px; font-weight: 600; line-height: 1.15; letter-spacing: 0; }
.db2b-quantity-control { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid #d8cdbf; border-radius: 4px; overflow: hidden; background: #fff; }
.db2b-quantity-control .db2b-quantity-button { display: inline-flex; align-items: center; justify-content: center; width: 25px; min-width: 25px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 0; background: #f7f2eb; color: #684d45; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1; cursor: pointer; }
.db2b-quantity-control .db2b-quantity-button:hover { background: #eee1ce; color: #54212b; }
.db2b-quantity-control .db2b-quantity-input { display: block; width: 42px; min-width: 42px; max-width: 58px; height: 34px; min-height: 34px; margin: 0; padding: 0 2px; border: 0; border-radius: 0; box-shadow: none; background: #fff; color: #54212b; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 34px; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.db2b-quantity-input::-webkit-inner-spin-button,
.db2b-quantity-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.db2b-purchase-form .db2b-add { display: inline-flex; flex: 0 1 150px; align-items: center; justify-content: center; gap: 9px; min-width: 122px; min-height: 36px; margin: 0; padding: 8px 12px; border: 1px solid #54212b; border-radius: 4px; background: #54212b; color: #fff; font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1.35; letter-spacing: 0; text-align: center; text-transform: none; white-space: normal; cursor: pointer; transition: background-color .15s, border-color .15s; }
.db2b-option .db2b-purchase-form .db2b-add { gap: var(--db2b-native-icon-gap, .5rem); height: var(--db2b-native-button-height, auto); min-height: var(--db2b-native-button-height, 36px); padding-top: 0; padding-bottom: 0; font-family: var(--db2b-native-font-family, inherit); font-size: var(--db2b-native-font-size, 14px); font-weight: var(--db2b-native-font-weight, 700); font-style: var(--db2b-native-font-style, normal); line-height: var(--db2b-native-line-height, 1.35); letter-spacing: var(--db2b-native-letter-spacing, -.015em); text-transform: var(--db2b-native-text-transform, uppercase); border-radius: var(--db2b-native-border-radius, 0); }
.db2b-add-icon { display: var(--db2b-native-icon-display, inline-block); flex: 0 0 auto; font-style: normal; }
.db2b-add-icon::before { display: inline-block; content: var(--db2b-native-icon-content, '\e8ba'); font-family: var(--db2b-native-icon-font-family, 'Porto'); font-size: var(--db2b-native-icon-font-size, 1.2857em); font-weight: var(--db2b-native-icon-font-weight, 400); line-height: var(--db2b-native-icon-line-height, 1); }
.db2b-purchase-form .db2b-add:hover { border-color: #71333e; background: #71333e; color: #fff; }
.db2b-purchase-form .db2b-add:disabled { opacity: .7; cursor: wait; }
.db2b-add--loading { animation: db2b-pulse 1s ease-in-out infinite; }
.db2b-purchase-form .db2b-form-message { margin: 4px 0 0; color: #42653e; font-size: 11px; line-height: 1.4; letter-spacing: 0; }
.db2b-purchase-form .db2b-form-message:empty { display: none; }
.db2b-purchase-form .db2b-form-message--error { color: #a32b2b; }
.db2b-options .db2b-unavailable { margin: 0; padding: 8px 10px; border-radius: 4px; background: #f5f1eb; color: #786453; font-size: 11px; line-height: 1.4; }
.db2b-option--unavailable .db2b-unit-value { color: #8c7770; }

.db2b-service { display: flex; flex-direction: column; gap: 1px; margin: 0; color: #6f6057; font-size: 11px; font-weight: 400; line-height: 1.2; letter-spacing: 0; }
.db2b-service > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.db2b-service svg { display: block; flex: 0 0 13px; width: 13px; height: 13px; color: #ad8a4e; }
.db2b-service-label { display: block; margin: 0 0 3px; color: #6f6057; font-size: 11px; line-height: 1.2; letter-spacing: 0; }
.db2b-options-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px 14px; padding: 9px 14px; border-top: 1px solid #eee5dc; background: #fcfaf7; color: #8a7a6e; font-size: 11px; line-height: 1.3; letter-spacing: 0; }
.db2b-options-footer .db2b-service { flex-direction: row; flex-wrap: wrap; gap: 5px 13px; font-size: 11px; }
.db2b-options-footer .db2b-service svg { flex-basis: 12px; width: 12px; height: 12px; }
.db2b-footer-availability { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.db2b-footer-availability > .db2b-service-label { margin: 0; }
.db2b-useful-links { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.db2b-options .db2b-useful-links a { color: #7b5a43; font-size: 11px; font-weight: 600; line-height: 1.3; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.db2b-options .db2b-useful-links a:hover { color: #54212b; }

/* Rendered in its final position by PHP: no delayed DOM moves or wide class. */
.db2b-summary-shell { width: 100%; container: db2b-summary / inline-size; }
.db2b-summary-zone { display: flex; flex-direction: column; width: 100%; margin: 0 0 12px; }
.db2b-summary-main { display: contents; min-width: 0; }
.db2b-summary-main > * { order: 60; }
.db2b-summary-main > .product_title { order: 10; }
.db2b-summary-main > .woocommerce-product-rating { order: 20; }
.db2b-summary-main > .price { order: 30; }
.db2b-summary-main > .dagmar-breadcrumb-meta { order: 50; }
.db2b-summary-main > .price,
.db2b-summary-main > .woocommerce-product-rating { max-width: 100%; }
.db2b-summary-card { order: 40; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'title cost' 'minimum service' 'cta cta' 'links links'; column-gap: 12px; row-gap: 6px; width: 100%; margin: 12px 0; padding: 11px 12px; border: 1px solid #d9c5a5; border-top: 3px solid #b5975d; border-radius: 6px; background: linear-gradient(115deg, #fffdfa, #f8f1e7); color: #54212b; text-align: left; letter-spacing: 0; }
.db2b-summary-card .db2b-summary-kicker { display: none; }
.db2b-summary-heading { grid-area: title; align-self: center; min-width: 0; }
.db2b-summary-card h2 { margin: 0; color: #54212b; font-size: 14px; font-weight: 750; line-height: 1.2; letter-spacing: 0; }
.db2b-summary-card .db2b-summary-audience { display: block; margin: 2px 0 0; color: #7a5b35; font-size: 11px; font-weight: 650; line-height: 1.2; letter-spacing: 0; }
.db2b-summary-card .db2b-summary-cost { grid-area: cost; align-self: center; justify-content: flex-end; text-align: right; }
.db2b-summary-card .db2b-unit-value { font-size: 21px; }
.db2b-summary-card .db2b-tax-note { margin-top: 1px; font-size: 11px; }
.db2b-summary-card .db2b-summary-minimum { grid-area: minimum; align-self: center; margin: 0; color: #806c5b; font-size: 11px; font-weight: 400; line-height: 1.25; letter-spacing: 0; }
.db2b-summary-card .db2b-summary-minimum strong { color: #5b3e33; font-weight: 700; }
.db2b-summary-availability { grid-area: service; align-self: center; min-width: 0; }
.db2b-summary-card .db2b-service { font-size: 11px; }
.db2b-summary-card .db2b-availability { grid-area: service; font-size: 11px; line-height: 1.25; }
.db2b-summary-card .db2b-summary-status { grid-column: 1 / -1; margin: 0; color: #825c36; font-size: 11px; line-height: 1.35; letter-spacing: 0; }
.db2b-summary-card .db2b-summary-cta { grid-area: cta; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px; margin: 3px 0 0; padding: 7px 10px; border: 1px solid #54212b; border-radius: 4px; background: #54212b; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.3; text-decoration: none; letter-spacing: 0; transition: background-color .15s; }
.db2b-summary-card .db2b-summary-cta:hover { border-color: #71333e; background: #71333e; color: #fff; }
.db2b-summary-links { grid-area: links; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 13px; margin-top: 1px; }
.db2b-summary-card .db2b-summary-links a { color: #8f7358; font-size: 11px; font-weight: 600; line-height: 1.2; text-decoration: underline; text-underline-offset: 2px; letter-spacing: 0; white-space: nowrap; }
@media (min-width: 992px) {
    @container db2b-summary (min-width: 600px) {
        .db2b-summary-zone { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
        .db2b-summary-main { display: block; order: 0; grid-column: 1; }
        .db2b-summary-zone > .db2b-summary-card { display: block; grid-column: 2; width: 240px; margin: -6px 0 0; padding: 9px 12px 8px; }
        .db2b-summary-zone > .db2b-summary-card h2 { font-size: 14px; line-height: 1.2; }
        .db2b-summary-zone .db2b-summary-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; margin-bottom: 5px; }
        .db2b-summary-zone > .db2b-summary-card .db2b-summary-audience { margin: 0; }
        .db2b-summary-zone > .db2b-summary-card .db2b-summary-cost { justify-content: flex-start; text-align: left; }
        .db2b-summary-zone > .db2b-summary-card .db2b-summary-minimum { margin: 3px 0 4px; }
        .db2b-summary-zone .db2b-summary-availability { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: start; }
        .db2b-summary-zone .db2b-summary-availability > .db2b-service-label { margin: 0; white-space: nowrap; }
        .db2b-summary-zone > .db2b-summary-card .db2b-service { margin-bottom: 5px; }
        .db2b-summary-zone > .db2b-summary-card .db2b-summary-cta { margin-top: 0; }
        .db2b-summary-zone > .db2b-summary-card .db2b-summary-links { margin-top: 6px; }
        .db2b-summary-zone > .db2b-summary-card .db2b-summary-status { margin-bottom: 6px; }
    }
}

/* Overlay only: do not add padding, height or margins to product/image hosts. */
.db2b-loop-host { position: relative; }
.db2b-loop-badge { display: block; position: absolute; top: 7px; left: 50%; z-index: 4; transform: translateX(-50%); width: max-content; max-width: calc(100% - 16px); margin: 0; padding: 4px 9px; border: 1px solid #dfd3b9; border-radius: 5px; background: #f5efe1; color: #48553d; font-size: 10px; font-weight: 500; line-height: 1.3; letter-spacing: 0; text-align: center; white-space: nowrap; pointer-events: none; }
.db2b-loop-badge strong { color: #293b35; font-size: inherit; font-weight: 750; }
.db2b-loop-badge .woocommerce-Price-amount { color: inherit; font-size: inherit; font-weight: inherit; }
.db2b-catalog-price .db2b-unit-value { font-size: 21px; }
.db2b-cart-label { display: block; width: fit-content; margin: 5px 0 2px; padding: 3px 7px; border: 1px solid #d8ceb6; border-radius: 4px; background: #f5efe1; color: #48553d; font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.db2b-options a:focus-visible,
.db2b-summary-card a:focus-visible,
.db2b-purchase-form button:focus-visible,
.db2b-purchase-form input:focus-visible { outline: 2px solid #a4854a; outline-offset: 3px; }

/* Exact desktop columns come from this product's real WVT bottle row. */
@media (min-width: 992px) {
    .db2b-option--native-aligned { grid-template-columns: minmax(60px, 1fr) 100px var(--db2b-native-action-width); padding-top: 22px; padding-bottom: 15px; padding-right: var(--db2b-native-padding-right); }
    .db2b-option--native-aligned .db2b-form-controls { display: grid; grid-template-columns: var(--db2b-native-quantity-width) var(--db2b-native-button-width); align-items: center; gap: var(--db2b-native-control-gap); }
    .db2b-option--native-aligned .db2b-quantity-group { position: relative; min-width: 0; }
    .db2b-option--native-aligned .db2b-quantity-group > label { position: absolute; bottom: 100%; left: 0; margin-bottom: 4px; white-space: nowrap; font-size: 10px; }
    .db2b-option--native-aligned .db2b-quantity-control { display: flex; width: 100%; height: var(--db2b-native-quantity-height); }
    .db2b-option--native-aligned .db2b-quantity-control .db2b-quantity-button { flex: 1 1 25px; width: auto; min-width: 20px; height: calc(var(--db2b-native-quantity-height) - 2px); }
    .db2b-option--native-aligned .db2b-quantity-control .db2b-quantity-input { flex: 1.4 1 38px; width: 38px; min-width: 30px; max-width: none; height: calc(var(--db2b-native-quantity-height) - 2px); min-height: 0; line-height: normal; }
    .db2b-option--native-aligned .db2b-add { flex: none; width: var(--db2b-native-button-width); min-width: 0; max-width: none; height: var(--db2b-native-button-height); min-height: 0; padding: 0 8px; border: 0; white-space: nowrap; }
}

@media (max-width: 991px) {
    .db2b-summary-card { margin: 10px 0 13px; }
    .db2b-option { --db2b-mobile-control-height: 40px; }
    .db2b-option .db2b-form-controls { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: end; gap: 8px; }
    .db2b-quantity-group { min-width: 0; }
    .db2b-quantity-group > label { font-size: 11px; white-space: nowrap; }
    .db2b-quantity-control { display: flex; width: 104px; height: var(--db2b-mobile-control-height); }
    .db2b-quantity-control .db2b-quantity-button { flex: 0 0 31px; width: 31px; min-width: 31px; height: calc(var(--db2b-mobile-control-height) - 2px); }
    .db2b-quantity-control .db2b-quantity-input { flex: 1 1 40px; width: 40px; min-width: 0; max-width: none; height: calc(var(--db2b-mobile-control-height) - 2px); min-height: 0; font-size: 16px; line-height: normal; }
    /* These explicit values also clear stale native desktop variables on resize. */
    .db2b-option .db2b-purchase-form .db2b-add { flex: none; width: 100%; min-width: 0; max-width: none; height: var(--db2b-mobile-control-height); min-height: var(--db2b-mobile-control-height); margin: 0; padding: 0 7px; gap: 0; border-width: 1px; font-size: 11.5px; line-height: 1.15; text-align: center; white-space: nowrap; }
    .db2b-option .db2b-add-icon { display: none; }
}
@media (max-width: 600px) {
    .db2b-options { margin: 12px 0 18px; scroll-margin-top: 85px; }
    .db2b-options .db2b-options-heading h2 { font-size: 14px; }
    .db2b-heading-subtitle { font-size: 11px; }
    .db2b-option { padding: 12px; }
    .db2b-options-footer { padding: 8px 12px; }
    .db2b-options-footer .db2b-service { gap: 4px 11px; }
    .db2b-summary-card .db2b-unit-value { font-size: 20px; }
    .db2b-loop-badge { max-width: calc(100% - 10px); padding: 4px 6px; font-size: 9px; }
}
@media (max-width: 350px) {
    .db2b-summary-card { column-gap: 8px; padding-inline: 10px; }
    .db2b-summary-card h2 { font-size: 13px; }
    .db2b-summary-card .db2b-unit-value { font-size: 19px; }
    .db2b-summary-card .db2b-unit-label { font-size: 11px; }
    .db2b-summary-card .db2b-service svg { flex-basis: 12px; width: 12px; height: 12px; }
    .db2b-option .db2b-form-controls { grid-template-columns: 100px minmax(0, 1fr); gap: 7px; }
    .db2b-quantity-control { width: 100px; }
    .db2b-quantity-control .db2b-quantity-button { flex-basis: 30px; width: 30px; min-width: 30px; }
    .db2b-option .db2b-purchase-form .db2b-add { padding-inline: 5px; font-size: 11px; }
}
/* Component width matters when WVT is placed in a narrow desktop summary. */
@container db2b-offer (max-width: 529px) {
    .db2b-option { grid-template-columns: minmax(0, 1fr) minmax(110px, auto); gap: 9px 12px; }
    .db2b-option-action { grid-column: 1 / -1; }
    .db2b-option-cost { justify-content: flex-end; text-align: right; }
}
/* Narrow desktop columns use the same compact control row as mobile. */
@media (min-width: 992px) {
    @container db2b-offer (max-width: 529px) {
        .db2b-option { --db2b-mobile-control-height: 40px; }
        .db2b-option .db2b-form-controls { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: end; gap: 8px; }
        .db2b-option .db2b-quantity-control { display: flex; width: 100px; height: var(--db2b-mobile-control-height); }
        .db2b-option .db2b-quantity-control .db2b-quantity-button { flex: 0 0 30px; width: 30px; min-width: 30px; height: calc(var(--db2b-mobile-control-height) - 2px); }
        .db2b-option .db2b-quantity-control .db2b-quantity-input { flex: 1 1 38px; width: 38px; min-width: 0; height: calc(var(--db2b-mobile-control-height) - 2px); min-height: 0; line-height: normal; }
        .db2b-option .db2b-purchase-form .db2b-add { width: 100%; min-width: 0; max-width: none; height: var(--db2b-mobile-control-height); min-height: var(--db2b-mobile-control-height); padding: 0 7px; font-size: 11.5px; line-height: 1.15; white-space: nowrap; }
        .db2b-option .db2b-add-icon { display: none; }
    }
}
@keyframes db2b-pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) {
    .db2b-options,
    .db2b-add,
    .db2b-summary-cta { transition: none; }
    .db2b-add--loading { animation: none; }
}
