
/* =========================================================
   TECHNOCRETE TRADING — PRODUCTS DIRECTORY
   File: public/css/products-directory.css
   ========================================================= */

.products-directory {
    padding: 76px 0 90px;
    background: #f7f8fa;
}

.products-directory [hidden] {
    display: none !important;
}

/* PAGE INTRO */

.products-heading {
    max-width: 780px;
    margin: 0 auto 42px;
    text-align: center;
}

.products-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #e50909;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.products-heading h1 {
    margin: 0 0 17px;
    color: #171717;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.1px;
}

.products-intro {
    max-width: 720px;
    margin: 0 auto;
    color: #707070;
    font-size: 15px;
    line-height: 1.9;
}

/* SEARCH */

.products-search-wrap {
    max-width: 760px;
    margin: 0 auto 34px;
}

.products-search-label {
    display: block;
    margin-bottom: 10px;
    color: #303030;
    font-size: 13px;
    font-weight: 700;
}

.products-search {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 17px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgb(0 0 0 / 3%);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.products-search:focus-within {
    border-color: #e50909;
    box-shadow: 0 0 0 3px rgb(229 9 9 / 8%);
}

.products-search-icon {
    display: flex;
    flex: 0 0 22px;
    color: #888;
}

.products-search-icon svg {
    width: 22px;
    height: 22px;
}

.products-search input {
    width: 100%;
    min-width: 0;
    padding: 16px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #222;
    font: inherit;
    font-size: 14px;
}

.products-search input::placeholder {
    color: #a0a0a0;
}

.products-search-clear {
    flex-shrink: 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 5px;
    background: #f4f4f4;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.products-search-clear:hover {
    background: #eee;
}

.products-search-count {
    margin: 11px 0 0;
    color: #888;
    font-size: 12px;
}

/* COMPANY GRID */

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 28px;
}

.product-brand-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 24px rgb(0 0 0 / 3%);
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.product-brand-card:hover {
    transform: translateY(-3px);
    border-color: #dedede;
    box-shadow: 0 15px 36px rgb(0 0 0 / 7%);
}

/* COMPANY HEADER */

.product-brand-header {
    position: relative;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 27px 25px 25px;
    border-bottom: 1px solid #eee;
}

.brand-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 86px;
    padding: 10px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fff;
}

.brand-logo-area img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-wordmark {
    color: #222;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.brand-tagline {
    margin-top: 5px;
    color: #888;
    font-size: 10px;
    line-height: 1.4;
    text-align: center;
}

.brand-company-info {
    min-width: 0;
}

.brand-company-info h2 {
    margin: 0 0 8px;
    color: #1b1b1b;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.brand-company-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #777;
    font-size: 13px;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.brand-brochure-count {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 6px;
    width: fit-content;
    margin-top: -5px;
    padding: 6px 10px;
    border-radius: 5px;
    background: #fff1f1;
    color: #c80808;
}

.brand-count-number {
    font-size: 13px;
    font-weight: 800;
}

.brand-count-label {
    font-size: 11px;
    font-weight: 600;
}

/* BROCHURE SECTION */

.brand-brochures-section {
    padding: 23px 25px 25px;
}

.brand-brochures-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.brand-brochures-heading h3 {
    margin: 0;
    color: #252525;
    font-size: 14px;
    font-weight: 800;
}

.brand-pdf-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-pdf-label svg {
    width: 15px;
    height: 15px;
}

.brand-brochure-list {
    display: grid;
    gap: 9px;
}

.brochure-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #ededed;
    border-radius: 8px;
    background: #fff;
    transition:
        border-color .2s ease,
        background .2s ease;
}

.brochure-item:hover {
    border-color: #f2bcbc;
    background: #fffafa;
}

.brochure-file-icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 44px;
    border-radius: 6px;
    background: #fff0f0;
    color: #d71920;
}

.brochure-file-icon svg {
    width: 23px;
    height: 23px;
}

.brochure-file-info {
    flex: 1;
    min-width: 0;
}

.brochure-file-info h4 {
    margin: 0 0 5px;
    color: #292929;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.brochure-file-info span {
    color: #999;
    font-size: 10px;
}

.brochure-view-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 35px;
    padding: 0 10px;
    border: 1px solid #e50909;
    border-radius: 5px;
    background: #fff;
    color: #d20a0a;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease;
}

.brochure-view-button svg {
    width: 16px;
    height: 16px;
}

.brochure-view-button:hover,
.brochure-view-button:focus-visible {
    border-color: #c80808;
    background: #e50909;
    color: #fff;
}

.brochure-view-button:focus-visible,
.brochure-download-button:focus-visible,
.brochure-modal-close:focus-visible {
    outline: 3px solid rgb(229 9 9 / 25%);
    outline-offset: 3px;
}

/* EMPTY STATES */

.brochure-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 13px;
    border: 1px dashed #ddd;
    border-radius: 7px;
    color: #888;
    font-size: 12px;
    line-height: 1.6;
}

.brochure-empty svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: #aaa;
}

.products-no-results {
    padding: 65px 20px;
    border: 1px dashed #ddd;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.products-no-results-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #fff1f1;
    color: #d71920;
}

.products-no-results-icon svg {
    width: 26px;
    height: 26px;
}

.products-no-results h3 {
    margin: 0 0 10px;
    color: #222;
    font-size: 19px;
    font-weight: 800;
}

.products-no-results p {
    margin: 0 0 20px;
    color: #777;
    font-size: 13px;
}

.products-no-results button {
    padding: 11px 18px;
    border: 0;
    border-radius: 5px;
    background: #e50909;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================
   PDF PREVIEW MODAL
   ========================================================= */

body.brochure-modal-open {
    overflow: hidden;
}

.brochure-modal {
    position: fixed;
    z-index: 1090;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.brochure-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.brochure-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(10 10 10 / 78%);
    cursor: pointer;
}

.brochure-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1120px, 100%);
    height: min(850px, 92vh);
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 25px 90px rgb(0 0 0 / 35%);
    transform: translateY(12px) scale(.99);
    transition: transform .2s ease;
}

.brochure-modal.is-open .brochure-modal-dialog {
    transform: translateY(0) scale(1);
}

.brochure-modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 86px;
    padding: 16px 22px;
    border-bottom: 1px solid #e9e9e9;
    background: #fff;
}

.brochure-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.brochure-modal-pdf-icon {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 48px;
    border-radius: 7px;
    background: #fff0f0;
    color: #d71920;
}

.brochure-modal-pdf-icon svg {
    width: 25px;
    height: 25px;
}

.brochure-modal-title-wrap > div:last-child {
    min-width: 0;
}

.brochure-modal-title-wrap h2 {
    margin: 0 0 5px;
    color: #222;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.brochure-modal-title-wrap p {
    margin: 0;
    color: #888;
    font-size: 11px;
}

.brochure-modal-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
}

.brochure-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid #e50909;
    border-radius: 6px;
    background: #e50909;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease;
}

.brochure-download-button:hover {
    border-color: #c80808;
    background: #c80808;
    color: #fff;
}

.brochure-download-button svg {
    width: 18px;
    height: 18px;
}

.brochure-modal-close {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.brochure-modal-close:hover {
    background: #f5f5f5;
    color: #d71920;
}

.brochure-modal-close svg {
    width: 19px;
    height: 19px;
}

.brochure-modal-body {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #525659;
}

.brochure-modal-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #525659;
}

.brochure-modal-fallback {
    position: absolute;
    z-index: 2;
    right: 15px;
    bottom: 15px;
    left: 15px;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 20px rgb(0 0 0 / 15%);
    text-align: center;
}

.brochure-modal-fallback p {
    margin: 0 0 8px;
    color: #555;
    font-size: 12px;
}

.brochure-modal-fallback a {
    color: #d71920;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {
    .products-directory {
        padding: 60px 0 70px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .brochure-modal {
        padding: 15px;
    }

    .brochure-modal-dialog {
        height: 92vh;
    }
}

@media (max-width: 575px) {
    .products-directory {
        padding: 42px 0 55px;
    }

    .products-heading {
        margin-bottom: 30px;
    }

    .products-heading h1 {
        letter-spacing: -.5px;
    }

    .products-intro {
        font-size: 13px;
        line-height: 1.8;
    }

    .products-search-wrap {
        margin-bottom: 24px;
    }

    .products-search {
        min-height: 52px;
        gap: 9px;
        padding: 0 12px;
    }

    .products-search input {
        font-size: 12px;
    }

    .product-brand-header {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 13px;
        padding: 20px 16px;
    }

    .brand-logo-area {
        width: 76px;
        height: 72px;
        padding: 7px;
    }

    .brand-company-info h2 {
        font-size: 17px;
    }

    .brand-company-info p {
        font-size: 12px;
        -webkit-line-clamp: 4;
    }

    .brand-brochures-section {
        padding: 19px 15px;
    }

    .brand-brochures-heading {
        align-items: flex-start;
    }

    .brochure-item {
        gap: 9px;
        padding: 10px 8px;
    }

    .brochure-file-icon {
        flex-basis: 34px;
        width: 34px;
        height: 38px;
    }

    .brochure-file-icon svg {
        width: 20px;
        height: 20px;
    }

    .brochure-file-info h4 {
        font-size: 11px;
    }

    .brochure-view-button {
        gap: 4px;
        min-height: 33px;
        padding: 0 7px;
        font-size: 10px;
    }

    .brochure-view-button svg {
        width: 14px;
        height: 14px;
    }

    .brochure-modal {
        padding: 0;
    }

    .brochure-modal-dialog {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .brochure-modal-header {
        align-items: flex-start;
        gap: 8px;
        padding: 13px 12px;
    }

    .brochure-modal-title-wrap {
        gap: 8px;
    }

    .brochure-modal-pdf-icon {
        flex-basis: 34px;
        width: 34px;
        height: 38px;
    }

    .brochure-modal-pdf-icon svg {
        width: 20px;
        height: 20px;
    }

    .brochure-modal-title-wrap h2 {
        font-size: 12px;
    }

    .brochure-modal-title-wrap p {
        font-size: 10px;
    }

    .brochure-modal-actions {
        gap: 6px;
    }

    .brochure-download-button {
        gap: 5px;
        min-height: 36px;
        padding: 0 8px;
        font-size: 10px;
    }

    .brochure-download-button svg {
        width: 15px;
        height: 15px;
    }

    .brochure-modal-close {
        flex-basis: 34px;
        width: 34px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-brand-card,
    .brochure-item,
    .brochure-view-button,
    .brochure-modal,
    .brochure-modal-dialog {
        transition: none;
    }
}

/* =========================================================
   EXPANDABLE COMPANY CATALOG
   ========================================================= */

.products-company-list {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
}

.products-company-list > .product-brand-card[hidden] {
    display: none !important;
}

.products-company-list > .product-brand-card {
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 20px rgb(0 0 0 / 3%);
}

.products-company-list > .product-brand-card.is-expanded {
    border-color: #e8b3b3;
    box-shadow: 0 10px 30px rgb(0 0 0 / 5%);
}

.product-brand-header {
    grid-template-columns: 94px minmax(0, 1fr) auto;
    gap: 20px;
    padding: 24px;
    border-bottom: 0;
}

.brand-logo-area {
    width: 94px;
    height: 82px;
}

.brand-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
}

.brand-brochure-count {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 5px;
    background: #fff0f0;
    color: #c80808;
    font-size: 11px;
    white-space: nowrap;
}

.brand-brochure-count strong {
    font-size: 13px;
    font-weight: 800;
}

.company-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #e50909;
    border-radius: 6px;
    background: #e50909;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.company-toggle:hover {
    border-color: #c80808;
    background: #c80808;
}

.company-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform .2s ease;
}

.company-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.company-toggle:focus-visible,
.catalog-pagination button:focus-visible {
    outline: 3px solid rgb(229 9 9 / 25%);
    outline-offset: 3px;
}

/* EXPANDABLE AREA */

.company-catalog {
    padding: 25px;
    border-top: 1px solid #eee;
    background: #fcfcfc;
}

.company-catalog[hidden] {
    display: none !important;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.catalog-toolbar h3 {
    margin: 0 0 6px;
    color: #222;
    font-size: 17px;
    font-weight: 800;
}

.catalog-toolbar p {
    margin: 0;
    color: #888;
    font-size: 12px;
    line-height: 1.6;
}

.catalog-search {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(340px, 100%);
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    background: #fff;
}

.catalog-search:focus-within {
    border-color: #e50909;
    box-shadow: 0 0 0 3px rgb(229 9 9 / 7%);
}

.catalog-search-icon {
    display: flex;
    flex-shrink: 0;
    color: #888;
}

.catalog-search-icon svg {
    width: 19px;
    height: 19px;
}

.catalog-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #222;
    font: inherit;
    font-size: 12px;
}

.catalog-search input::placeholder {
    color: #999;
}

/* BROCHURE ROWS */

.catalog-brochure-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

.catalog-brochure-list > .brochure-item[hidden] {
    display: none !important;
}

.catalog-brochure-list .brochure-item {
    min-width: 0;
    padding: 11px;
}

.catalog-brochure-list .brochure-file-info h4 {
    overflow-wrap: anywhere;
}

.catalog-empty {
    padding: 24px 15px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.catalog-empty p {
    margin: 0;
    color: #777;
    font-size: 13px;
    line-height: 1.7;
}

/* PAGINATION */

.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eaeaea;
}

.catalog-pagination[hidden] {
    display: none !important;
}

.catalog-page-summary {
    color: #777;
    font-size: 11px;
}

.catalog-page-buttons {
    display: flex;
    align-items: center;
    gap: 9px;
}

.catalog-page-buttons button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.catalog-page-buttons button:hover:not(:disabled) {
    border-color: #e50909;
    color: #d71920;
}

.catalog-page-buttons button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.catalog-page-buttons [data-page-number] {
    color: #666;
    font-size: 11px;
    white-space: nowrap;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .product-brand-header {
        grid-template-columns: 82px minmax(0, 1fr) auto;
        gap: 15px;
        padding: 20px;
    }

    .brand-logo-area {
        width: 82px;
        height: 76px;
    }

    .catalog-brochure-list {
        grid-template-columns: 1fr;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
    }

    .catalog-search {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .product-brand-header {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 13px;
        padding: 17px;
    }

    .brand-logo-area {
        width: 68px;
        height: 66px;
        padding: 6px;
    }

    .brand-company-info h2 {
        font-size: 16px;
    }

    .brand-company-info p {
        font-size: 12px;
    }

    .brand-card-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 2px;
    }

    .company-toggle {
        min-height: 38px;
        padding: 0 11px;
        font-size: 11px;
    }

    .company-catalog {
        padding: 18px 13px;
    }

    .catalog-toolbar h3 {
        font-size: 15px;
    }

    .catalog-pagination {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .catalog-page-buttons {
        justify-content: space-between;
        width: 100%;
    }

    .catalog-page-buttons button {
        min-height: 36px;
    }
}

/* Request a Quote button */
.brochure-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #c80808;
    border-radius: 5px;
    background: #c80808;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.brochure-quote-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.brochure-quote-button:hover {
    background: #a70707;
    transform: translateY(-1px);
}

/* Quote modal */
.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quote-modal.is-open {
    display: flex;
}

.quote-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
}

.quote-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .25);
}

.quote-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 28px;
    border-bottom: 1px solid #eee;
}

.quote-eyebrow {
    color: #c80808;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.quote-modal-header h2 {
    margin: 7px 0;
    color: #171717;
    font-size: 25px;
}

.quote-modal-header p {
    margin: 0;
    color: #707070;
    font-size: 14px;
}

.quote-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #222;
    font-size: 26px;
    cursor: pointer;
    flex-shrink: 0;
}

.quote-form-body {
    padding: 26px 28px;
}

.quote-selected-product {
    display: grid;
    gap: 6px;
    margin-bottom: 24px;
    padding: 15px;
    border-left: 4px solid #c80808;
    background: #f8f8f8;
}

.quote-selected-product span {
    color: #777;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.quote-selected-product strong {
    overflow-wrap: anywhere;
    color: #222;
    font-size: 15px;
}

.quote-selected-product small {
    color: #707070;
}

.quote-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.quote-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.quote-field-full {
    grid-column: 1 / -1;
}

.quote-field label {
    color: #292929;
    font-size: 13px;
    font-weight: 700;
}

.quote-field input,
.quote-field textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.quote-field input:focus,
.quote-field textarea:focus {
    outline: 2px solid rgba(200, 8, 8, .15);
    border-color: #c80808;
}

.quote-field textarea {
    resize: vertical;
}

.quote-submit-button {
    width: 100%;
    margin-top: 22px;
    padding: 14px 20px;
    border: 0;
    border-radius: 5px;
    background: #c80808;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.quote-submit-button:hover {
    background: #a70707;
}

.quote-privacy-note {
    margin: 12px 0 0;
    color: #777;
    font-size: 12px;
    text-align: center;
}

body.quote-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .brochure-quote-button {
        width: 100%;
    }

    .quote-modal {
        padding: 10px;
    }

    .quote-modal-header,
    .quote-form-body {
        padding: 20px;
    }

    .quote-form-grid {
        grid-template-columns: 1fr;
    }

    .quote-field-full {
        grid-column: auto;
    }

    .quote-modal-header h2 {
        font-size: 21px;
    }
}
.quote-alert {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 5px;
    font-size: 14px;
}

.quote-alert-success {
    background: #edf8f0;
    border: 1px solid #b9e2c3;
    color: #205b31;
}

.quote-alert-error {
    background: #fff0f0;
    border: 1px solid #efc2c2;
    color: #9e0909;
}

.quote-alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

/* =========================================================
   RESPONSIVE OVERRIDES
   Brochures, inquiry form, and PDF preview
   Append to the bottom of products-directory.css
   ========================================================= */

/* Prevent padding and borders from increasing element widths */
.products-directory *,
.brochure-modal *,
.quote-modal * {
    box-sizing: border-box;
}

.products-directory img,
.products-directory svg,
.brochure-modal svg,
.quote-modal svg {
    max-width: 100%;
}

/* Keep long company and brochure names inside their containers */
.product-brand-card,
.product-brand-header,
.brand-company-info,
.brand-card-actions,
.company-catalog,
.catalog-toolbar,
.catalog-brochure-list,
.brochure-item,
.brochure-file-info {
    min-width: 0;
}

.brand-company-info h2,
.brand-company-info p,
.brochure-file-info h4,
.catalog-toolbar h3,
.quote-selected-product strong {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Company header and actions */
.product-brand-header {
    grid-template-columns: 94px minmax(0, 1fr) auto;
}

.brand-card-actions {
    min-width: 0;
    max-width: 100%;
}

.company-toggle {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.company-toggle svg {
    flex-shrink: 0;
}

/* Brochure list: allow content to shrink without horizontal overflow */
.catalog-brochure-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-brochure-list .brochure-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
}

.catalog-brochure-list .brochure-file-icon {
    flex-shrink: 0;
}

.catalog-brochure-list .brochure-file-info {
    flex: 1 1 120px;
    min-width: 0;
}

.catalog-brochure-list .brochure-view-button,
.catalog-brochure-list .brochure-quote-button {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.brochure-view-button,
.brochure-quote-button,
.company-toggle,
.catalog-page-buttons button,
.products-no-results button,
.quote-submit-button {
    min-height: 42px;
    touch-action: manipulation;
}

/* Search controls should never force horizontal scrolling */
.products-search,
.catalog-search {
    min-width: 0;
}

.products-search input,
.catalog-search input {
    min-width: 0;
    max-width: 100%;
}

/* =========================================================
   RESPONSIVE PDF PREVIEW
   ========================================================= */

.brochure-modal {
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
}

.brochure-modal-dialog {
    width: min(1120px, 100%);
    height: min(850px, 92vh);
    height: min(850px, 92dvh);
    max-height: 100%;
    min-height: 0;
}

.brochure-modal-header {
    min-width: 0;
}

.brochure-modal-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.brochure-modal-actions {
    min-width: 0;
}

.brochure-modal-body {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.brochure-modal-body iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
}

/* =========================================================
   RESPONSIVE PRODUCT INQUIRY FORM
   ========================================================= */

.quote-modal {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
}

.quote-modal-dialog {
    width: min(680px, 100%);
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.quote-modal-header {
    min-width: 0;
}

.quote-modal-header > div {
    min-width: 0;
}

.quote-modal-header h2 {
    overflow-wrap: anywhere;
}

.quote-form-body {
    min-width: 0;
}

.quote-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote-field {
    min-width: 0;
}

.quote-field input,
.quote-field textarea {
    display: block;
    max-width: 100%;
    min-height: 44px;
}

.quote-field textarea {
    min-height: 110px;
}

.quote-submit-button {
    display: block;
    min-height: 48px;
}

.quote-modal-close {
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
}

/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 900px) {
    .product-brand-header {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 15px;
        padding: 20px;
    }

    .brand-logo-area {
        width: 82px;
        height: 76px;
    }

    .brand-card-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .catalog-search {
        width: 100%;
    }

    .catalog-brochure-list {
        grid-template-columns: 1fr;
    }

    .brochure-modal {
        padding: 12px;
    }

    .brochure-modal-dialog {
        height: 92vh;
        height: 92dvh;
    }
}

/* =========================================================
   MOBILE PHONES
   ========================================================= */

@media (max-width: 600px) {
    .products-directory {
        padding: 40px 0 52px;
    }

    .products-heading {
        margin-bottom: 26px;
    }

    .products-heading h1 {
        font-size: clamp(25px, 7vw, 34px);
        letter-spacing: -0.5px;
    }

    .products-intro {
        font-size: 13px;
        line-height: 1.75;
    }

    .products-search {
        min-height: 48px;
        gap: 8px;
        padding: 0 10px;
    }

    .products-search input {
        padding: 12px 0;
        font-size: 13px;
    }

    .product-brand-header {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .brand-logo-area {
        width: 64px;
        height: 64px;
        padding: 5px;
    }

    .brand-company-info h2 {
        font-size: 16px;
        line-height: 1.35;
    }

    .brand-company-info p {
        font-size: 12px;
        line-height: 1.6;
    }

    .brand-card-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-top: 3px;
    }

    .brand-brochure-count {
        align-self: flex-start;
    }

    .company-toggle {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        white-space: normal;
    }

    .company-catalog {
        padding: 17px 12px;
    }

    .catalog-toolbar h3 {
        font-size: 15px;
    }

    .catalog-toolbar p {
        font-size: 12px;
    }

    .catalog-search {
        min-height: 44px;
    }

    .catalog-brochure-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .catalog-brochure-list .brochure-item {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        padding: 11px;
    }

    .catalog-brochure-list .brochure-file-icon {
        width: 34px;
        height: 38px;
    }

    .catalog-brochure-list .brochure-file-info h4 {
        font-size: 12px;
        line-height: 1.5;
    }

    .catalog-brochure-list .brochure-file-info span {
        font-size: 10px;
    }

    .catalog-brochure-list .brochure-view-button,
    .catalog-brochure-list .brochure-quote-button {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .catalog-pagination {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .catalog-page-buttons {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .catalog-page-buttons button {
        min-width: 0;
        padding: 0 8px;
    }

    .catalog-page-buttons button:last-child {
        justify-self: end;
    }

    /* Full-screen PDF viewer on phones */
    .brochure-modal {
        padding: 0;
    }

    .brochure-modal-dialog {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100%;
        border-radius: 0;
    }

    .brochure-modal-header {
        align-items: center;
        gap: 8px;
        padding:
            max(10px, env(safe-area-inset-top))
            10px
            10px;
    }

    .brochure-modal-title-wrap {
        gap: 8px;
    }

    .brochure-modal-pdf-icon {
        flex: 0 0 32px;
        width: 32px;
        height: 36px;
    }

    .brochure-modal-pdf-icon svg {
        width: 19px;
        height: 19px;
    }

    .brochure-modal-title-wrap h2 {
        display: -webkit-box;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .brochure-modal-title-wrap p {
        font-size: 10px;
    }

    .brochure-modal-actions {
        gap: 5px;
    }

    .brochure-download-button {
        gap: 4px;
        min-height: 38px;
        padding: 0 8px;
        font-size: 10px;
        white-space: nowrap;
    }

    .brochure-modal-close {
        flex: 0 0 36px;
        width: 36px;
        height: 38px;
    }

    .brochure-modal-body {
        min-height: 0;
    }

    /* Inquiry form becomes a mobile-friendly full-screen sheet */
    .quote-modal {
        align-items: flex-end;
        padding: 0;
    }

    .quote-modal-dialog {
        width: 100%;
        max-width: none;
        max-height: 94vh;
        max-height: 94dvh;
        border-radius: 14px 14px 0 0;
    }

    .quote-modal-header {
        gap: 12px;
        padding: 19px 17px;
    }

    .quote-modal-header h2 {
        font-size: 21px;
        line-height: 1.3;
    }

    .quote-modal-header p {
        font-size: 12px;
        line-height: 1.6;
    }

    .quote-eyebrow {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .quote-form-body {
        padding: 18px 17px;
    }

    .quote-selected-product {
        margin-bottom: 20px;
        padding: 13px;
    }

    .quote-selected-product strong {
        font-size: 14px;
    }

    .quote-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .quote-field-full {
        grid-column: auto;
    }

    .quote-field label {
        font-size: 12px;
    }

    .quote-field input,
    .quote-field textarea {
        padding: 12px;
        font-size: 16px;
    }

    .quote-field textarea {
        min-height: 100px;
    }

    .quote-submit-button {
        margin-top: 18px;
        padding: 14px 16px;
        font-size: 14px;
    }

    .quote-privacy-note {
        font-size: 11px;
        line-height: 1.6;
    }

    .quote-alert {
        padding: 13px;
        font-size: 13px;
        overflow-wrap: anywhere;
    }
}

/* EXTRA SMALL PHONES */
@media (max-width: 360px) {
    .product-brand-header {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .brand-logo-area {
        width: 54px;
        height: 56px;
    }

    .brand-company-info h2 {
        font-size: 14px;
    }

    .company-catalog {
        padding: 13px 9px;
    }

    .brochure-modal-header {
        padding-right: 7px;
        padding-left: 7px;
    }

    .brochure-download-button {
        padding: 0 6px;
    }

    .quote-modal-header,
    .quote-form-body {
        padding-right: 13px;
        padding-left: 13px;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .brochure-modal,
    .brochure-modal-dialog,
    .quote-modal,
    .product-brand-card,
    .brochure-item,
    .brochure-view-button,
    .brochure-quote-button,
    .company-toggle {
        animation: none !important;
        transition: none !important;
    }
}

.inquiry-website-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
