/* Scoped product-details dialog; retain the active child-theme typography. */
.awpd-action[hidden], .awpd-error[hidden] { display: none !important; }
.single-product .awpd-action { margin: 0 0 .75rem; }
.single-product button.awpd-open {
    background: #f7f4eb; border: 1px solid #254d3c; color: #183c2e;
    border-radius: 999px; padding: .8rem 1.35rem; min-height: 48px;
    font: inherit; font-weight: 600; cursor: pointer;
}
.awpd-dialog {
    border: 1px solid #b7a269; border-radius: 20px; padding: 0;
    width: min(920px, calc(100% - 32px)); max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    background: #fcfaf4; color: #23382d; margin: auto;
    box-shadow: 0 24px 80px #10281d55; overflow: hidden;
}
.awpd-dialog:not([open]) { display: none; }
.awpd-dialog[open] { display: flex; flex-direction: column; }
.awpd-dialog::backdrop { background: rgb(13 35 25 / 65%); }
html.awpd-open { overflow: hidden; scrollbar-gutter: stable; }
.awpd-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid #d9cfb7; flex: 0 0 auto;
}
.awpd-eyebrow { margin: 0 0 .3rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #526343; }
.awpd-header h2 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.85rem); line-height: 1.2; overflow-wrap: anywhere; }
.awpd-dialog button { font-family: inherit; cursor: pointer; }
.awpd-dialog .awpd-close { flex: 0 0 auto; min-height: 44px; padding: .5rem .8rem; background: #f0ecdf; color: #183c2e; border: 1px solid #a89564; border-radius: 12px; }
.awpd-content { padding: 1.4rem 1.5rem; overflow: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; overflow-wrap: anywhere; line-height: 1.7; }
.awpd-content > :first-child { margin-top: 0; }
.awpd-content h2 { font-size: 1.4rem; line-height: 1.3; margin-top: 1.6rem; }
.awpd-content h3 { font-size: 1.15rem; line-height: 1.4; }
.awpd-content a { color: #1c513b; text-decoration: underline; text-underline-offset: .2em; }
.awpd-content img, .awpd-content video { max-width: 100%; height: auto; }
.awpd-content table { width: 100%; max-width: 100%; table-layout: auto; }
.awpd-table-scroll { max-width: 100%; overflow-x: auto; }
.awpd-content th, .awpd-content td { white-space: normal; overflow-wrap: anywhere; }
.awpd-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1rem; background: #f2eedf; border-top: 1px solid #d9cfb7; padding: 1rem 1.5rem; flex: 0 0 auto; }
.awpd-footer p { margin: 0; font-size: .9rem; }
.awpd-dialog .awpd-quote { background: #1e4a36; color: #fffdf5; border: 1px solid #1e4a36; border-radius: 999px; padding: .8rem 1.4rem; min-height: 48px; font-weight: 600; }
.awpd-dialog .awpd-error { flex-basis: 100%; }
.awpd-open:focus-visible, .awpd-dialog :focus-visible { outline: 3px solid #936d22; outline-offset: 3px; }
.awpd-open:hover, .awpd-dialog .awpd-close:hover { background: #e7e2d2; }
.awpd-dialog .awpd-quote:hover { background: #153c2a; }
@media (max-width: 600px) {
    .awpd-dialog { width: calc(100% - 16px); max-width: calc(100% - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
    .awpd-header, .awpd-footer { padding: 1rem; }
    .awpd-content { padding: 1rem; }
    .awpd-footer .awpd-quote { width: 100%; }
    .awpd-footer p { font-size: .8rem; }
    .single-product button.awpd-open { width: 100%; }
}

/* Category archive actions share the dialog, not the product-specific RFQ context. */
.awpd-category-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.awpd-category-actions .awpd-action { margin: 0; }
.awpd-category-actions .awpd-open {
    background: #f7f4eb; border: 1px solid #254d3c; color: #183c2e;
    border-radius: 999px; padding: .8rem 1.35rem; min-height: 48px;
    font: inherit; font-weight: 600; cursor: pointer;
}
.awpd-category-actions .awpd-open:hover { background: #e7e2d2; }
.awpd-dialog a.awpd-quote { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
@media (max-width: 600px) {
    .awpd-category-actions { flex-direction: column; align-items: stretch; }
    .awpd-category-actions .awpd-open, .awpd-category-actions > a { width: 100%; text-align: center; box-sizing: border-box; }
}
