/*
Theme Name: HC Packaging WordPress
Theme URI: https://gxhcpackaging.com/
Author: HC Packaging
Description: Pixel-faithful WordPress conversion of the HC Packaging storefront. Includes local assets, preserved /pages/, /collections/, and /products/ routes, and a bundled 260-product catalog.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hc-packaging
*/
html, body { margin: 0; padding: 0; }
body.admin-bar .hc-source-page { min-height: calc(100vh - 32px); }
@media (max-width: 782px) { body.admin-bar .hc-source-page { min-height: calc(100vh - 46px); } }

/*
 * Responsive image guardrail: legacy source markup has fixed width/height
 * attributes. Once a responsive CSS width shrinks an image, its height must
 * be recalculated from the native aspect ratio rather than retaining the
 * original attribute value and becoming stretched.
 */
body:not(.wp-admin) img {
    max-width: 100%;
    height: auto;
}

/* Fixed-size gallery frames intentionally fill their own frame. */
.hc-product-image img,
.hc-carousel-thumbnail img {
    height: 100%;
}

/* The legacy breadcrumb icon had width/height attributes but only a max-height rule. */
.bread img {
    width: auto;
    height: auto;
    max-height: 20px;
}

@media (max-width: 900px) {
    .hc-product-image img {
        width: calc(100% - 40px);
        height: calc(100% - 224px);
        object-fit: contain;
    }
}

@media (max-width: 767px) {
    .bread img {
        width: 18px;
        height: 18px;
        max-height: none;
    }
}

/* Keep the product inquiry grid inside its own grey panel on narrow desktop columns. */
.hc-product-inquiry {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.hc-product-inquiry form {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}

.hc-product-inquiry .hc-form-line,
.hc-product-inquiry .hc-form-pair,
.hc-product-inquiry .hc-form-submit-row {
    min-width: 0;
    max-width: 100%;
}

.hc-product-inquiry .hc-form-submit-row {
    grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
}

.hc-product-inquiry .hc-form-submit-row button {
    width: 100%;
    min-width: 0;
}

@media (max-width: 600px) {
    .hc-product-inquiry .hc-form-submit-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
