/* Category directory and product listings */
.catalog-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(18px, 3vw, 32px);
    background: #f8f5ef;
    border-radius: 12px;
}
.catalog-heading .eyebrow { margin-bottom: 8px; color: #624c39; }
.catalog-heading h1 { font-size: clamp(28px, 4.2vw, 48px); line-height: 1.08; }
.catalog-heading p { margin-top: 9px; max-width: 60ch; color: #53504d; }
.catalog-heading > a { flex-shrink: 0; }
.catalog-lead { margin-bottom: clamp(20px, 3vw, 35px); }

.category-directory-grid { gap: 20px; }
.department-card { overflow: hidden; padding: 0; }
.department-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(74px, 11vw, 130px);
    gap: 12px;
    padding: clamp(12px, 2vw, 22px);
    min-height: 144px;
    background: #faf7f2;
}
.department-card-heading .category-art {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 8px;
}
.department-card-heading h2 { font-size: clamp(18px, 2.3vw, 24px); }
.department-card-heading p { line-height: 1.4; }
.department-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; margin-top: 9px; }
.department-link svg { width: 16px; height: 16px; }
.department-card ul { margin: 0; padding: 0 clamp(12px, 2vw, 22px); }
.department-card li a { min-height: 44px; align-items: center; }
.department-card li:first-child a { border-top: 0; }
.department-card li a:hover { color: #8d211a; }
.department-card li small { flex: 0 0 auto; }

.subcategory-section { margin: clamp(16px, 2.5vw, 28px) 0 0; }
.subcategory-section h2 { margin-bottom: 10px; }
.subcategory-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(136px, 15vw, 176px);
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding: 4px 4px 10px;
    margin-inline: -4px;
}
.subcategory-cards:focus-visible { outline: 2px solid #126ecb; outline-offset: -1px; }
.subcategory-card { scroll-snap-align: start; }
.subcategory-art { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; }
.subcategory-art img { margin: 9%; }
.subcategory-card-label { min-height: 63px; padding: 9px; }
.subcategory-card-label strong { overflow-wrap: anywhere; }
.subcategory-card[data-empty] .subcategory-card-label small { color: #685b4f; }

.category-results { min-width: 0; scroll-margin-top: 130px; }
.category-filters nav a[aria-current] {
    color: #6f2119;
    text-decoration-thickness: 2px;
}
.category-results .category-toolbar { padding-bottom: 10px; border-bottom: 1px solid #e8e4de; }
.category-results .category-toolbar > p { color: #5a534d; }
.category-results .product-image { aspect-ratio: 1; border-radius: 9px; }
.category-results .product-image img { padding: clamp(10px, 1.5vw, 20px); }
.category-results .empty-state {
    margin: 0 0 26px;
    padding: clamp(24px, 6vw, 60px) 18px;
    background: #faf7f2;
    border: 1px solid #e9e4dd;
    border-radius: 12px;
}
.category-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.category-results .category-seo { border-top: 1px solid #e8e4de; }

/* Product page */
.page-product .pdp-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "gallery title" "gallery purchase";
    grid-template-rows: auto 1fr;
    column-gap: clamp(24px, 5vw, 64px);
    row-gap: 16px;
}
.pdp-product-heading { grid-area: title; min-width: 0; }
.pdp-product-heading h1 { font-size: clamp(27px, 3.6vw, 44px); line-height: 1.09; margin: 0 0 8px; }
.pdp-product-heading .pdp-brand { font-size: 14px; color: #574d43; }
.pdp-product-heading .pdp-information-link { font-size: 13px; }
.page-product .pdp-gallery-column { grid-area: gallery; }
.page-product .pdp-photo { background: #f8f6f2; aspect-ratio: 1; }
.pdp-photo img { padding: clamp(12px, 2.5vw, 30px); }
.pdp-photo-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    background: #f8f6f2;
    color: #63584c;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
}
.page-product .pdp-purchase { grid-area: purchase; position: static; padding: 0; }
.pdp-order-card {
    background: #faf7f2;
    border: 1px solid #e9e3da;
    border-radius: 12px;
    padding: clamp(14px, 2.3vw, 24px);
}
.pdp-order-card .pdp-price.detail-price { margin: 0 0 7px; font-size: clamp(30px, 3.6vw, 40px); }
.pdp-order-card .pdp-price-note { font-size: 13px; color: #5a534d; }
.pdp-price-request { font-size: 24px; font-weight: 650; }
.pdp-order-card .pdp-option-heading { margin-top: 18px; }
.pdp-order-card .pdp-pack-thumbs > a { background: #fff; }
.pdp-order-card .pdp-add-form { align-items: end; }
.pdp-quantity { display: grid; gap: 5px; font-size: 13px; font-weight: 650; }
.pdp-order-card .pdp-stage-note { margin: 11px 0 0; }
.pdp-order-card .pdp-inquiry { margin-top: 14px; }
.pdp-purchase .pdp-service-panels { margin-top: 12px; }
.pdp-related .section-heading h2 { font-size: clamp(22px, 3vw, 30px); }

@media (max-width: 760px) {
    .catalog-heading { flex-direction: column; align-items: flex-start; gap: 9px; }
    .catalog-heading > a { min-height: 36px; }
    .department-card-heading { grid-template-columns: minmax(0, 1fr) 78px; min-height: 0; }
    .subcategory-cards { grid-auto-columns: clamp(116px, 37vw, 150px); }
    .category-results .category-toolbar { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
    .category-results .category-toolbar > p { grid-column: 1; }
    .category-results .category-toolbar .mobile-filter-button { grid-column: 2; padding-inline: 10px; font-size: 13px; }
    .page-product .pdp-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "title" "gallery" "purchase";
        grid-template-rows: auto;
        gap: 12px;
    }
    .page-product .pdp-photo:only-child { aspect-ratio: 5 / 4; }
    .pdp-breadcrumbs > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .pdp-tabs > button { min-height: 42px; }
}
