/* eShowroom Block v3.2.0 — Curtis Lumber palette */

.eshowroom-block {
    max-width: 1100px;
    margin: 2rem auto;
    font-family: inherit;
}
.eshowroom-notice,
.eshowroom-error {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    font-size: 0.95rem;
}
.eshowroom-notice { background: #f2f4f3; color: #555; border: 1px solid #dde0dd; }
.eshowroom-error  { background: #fdf0f0; color: #a33; }

/* --- Manufacturer header --- */
.eshowroom-mfr-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.eshowroom-mfr-header--compact { margin-bottom: 1rem; }
.eshowroom-mfr-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}
.eshowroom-mfr-logo--sm { max-height: 52px; }
.eshowroom-heading {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.25;
    color: #2e7d32;
}
.eshowroom-product-mfr {
    margin: 0.15rem 0 0;
    font-size: 0.88rem;
    color: #666;
}

/* --- Product line subheading (stacked) --- */
.eshowroom-line-heading {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #2e7d32;
    color: #2e7d32;
}

/* --- Product row: image left, text right --- */
.eshowroom-product-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: #f7f9f7;
    border: 1px solid #e4e8e4;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}
.eshowroom-product-row:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.eshowroom-product-row-img {
    width: 140px;
    min-width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: 6px;
    background: #eef0ee;
}
.eshowroom-product-row-body {
    flex: 1;
    min-width: 0;
}
.eshowroom-product-row-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}
.eshowroom-product-row-summary {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.55;
}

/* --- Category tags --- */
.eshowroom-product-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.35rem;
}
.eshowroom-tag {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    background: #e3ede3;
    color: #2e5e2e;
    font-size: 0.75rem;
    font-weight: 500;
}

/* --- Product detail --- */
.eshowroom-breadcrumb { font-size: 0.85rem; color: #777; margin-bottom: 0.75rem; }
.eshowroom-breadcrumb-sep { margin: 0 0.3rem; color: #aaa; }
.eshowroom-product-hero {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
    margin: 1rem 0;
    border-radius: 6px;
    background: #f7f9f7;
    border: 1px solid #e4e8e4;
}
.eshowroom-product-desc {
    line-height: 1.65;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 1.25rem;
}
.eshowroom-product-desc p { margin: 0 0 0.65rem; }

/* --- Resources --- */
.eshowroom-resources {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #dde0dd;
}
.eshowroom-resources-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.eshowroom-resource-card {
    background: #f2f4f3;
    border: 1px solid #dde0dd;
    border-radius: 6px;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.eshowroom-resource-label { font-weight: 600; font-size: 0.82rem; color: #2e7d32; }
.eshowroom-resource-item { font-size: 0.78rem; color: #555; }

/* --- Related content sections --- */
.eshowroom-related {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #dde0dd;
}
.eshowroom-related-heading {
    font-size: 1.1rem;
    margin: 0 0 0.85rem;
    color: #2e7d32;
    font-weight: 600;
}
.eshowroom-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}
.eshowroom-related-card {
    background: #fff;
    border: 1px solid #e4e8e4;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.eshowroom-related-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.eshowroom-related-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #f2f4f3;
}
.eshowroom-related-name {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: #333;
}

/* --- Category page --- */
.eshowroom-description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.55;
}
.eshowroom-cat-hero { margin-bottom: 1.25rem; }
.eshowroom-cat-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 6px;
}
.eshowroom-cat-img-sm {
    max-width: 280px;
    height: auto;
    border-radius: 6px;
}

/* --- Category brand sections --- */
.eshowroom-cat-brand-section {
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid #e4e8e4;
}
.eshowroom-cat-brand-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.eshowroom-heading--brand {
    font-size: 1.3rem;
}
.eshowroom-subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}
.eshowroom-subcat-card {
    background: #f7f9f7;
    border: 1px solid #e4e8e4;
    border-radius: 6px;
    padding: 0.75rem 0.85rem;
    text-align: center;
}
.eshowroom-subcat-name { font-size: 0.88rem; font-weight: 500; color: #333; }

/* --- Brand grid --- */
.eshowroom-cat-brands { margin-top: 1.5rem; }
.eshowroom-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.85rem;
}
.eshowroom-brand-card {
    background: #fff;
    border: 1px solid #e4e8e4;
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}
.eshowroom-brand-logo { max-height: 44px; max-width: 130px; width: auto; object-fit: contain; }
.eshowroom-brand-name { font-weight: 600; font-size: 0.85rem; color: #333; }
.eshowroom-brand-count { font-size: 0.78rem; color: #888; }

/* --- Debug --- */
.eshowroom-debug-pre {
    background: #1a1a2e;
    color: #0f0;
    padding: 20px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    max-height: 80vh;
    overflow: auto;
    white-space: pre-wrap;
}

/* --- Editor --- */
.eshowroom-editor-preview {
    padding: 1rem;
    border: 1px dashed #ccc;
    border-radius: 6px;
    background: #fafbfc;
}

/* --- Mobile --- */
@media ( max-width: 600px ) {
    .eshowroom-product-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .eshowroom-product-row-img {
        width: 100%;
        min-width: 0;
        height: auto;
        aspect-ratio: 16 / 10;
    }
    .eshowroom-mfr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .eshowroom-related-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
