/* Brand tokens: slightly deeper logo blue keeps white button text legible. */
body.emh-brand-style {
    --emh-blue: #176da5;
    --emh-navy: #173b55;
    --emh-sale: #b45309;
    --emh-soft: #eef5fa;
    --emh-border: #cbdce7;
    --emh-muted: #687785;
    --emh-page: #f5f7fa;
    --emh-image-width: 238px;
    --emh-image-height: 200px;
}
/* Homepage only. The existing Storefront column widths remain in control. */
body.emh-home-polish .emh-category-nav {
    clear: both;
    margin: 0 0 28px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 14px;
}
body.emh-home-polish .emh-category-nav h2 {
    margin: 0 0 15px;
    font-size: 23px;
    font-weight: 600;
    color: #111;
}
body.emh-home-polish .emh-category-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}
body.emh-home-polish .emh-category-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 14px;
    background: var(--emh-soft);
    border: 1px solid var(--emh-border);
    border-radius: 6px;
    color: var(--emh-navy);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
}
body.emh-home-polish .emh-category-links a:hover {
    background: var(--emh-blue);
    border-color: var(--emh-blue);
    color: #fff;
}
body.emh-home-polish .emh-category-links a:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}
body.emh-home-polish .site-main ul.products {
    align-items: stretch !important;
}
body.emh-home-polish .site-main ul.products li.product {
    display: flex !important;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}
body.emh-home-polish .site-main ul.products li.product > a.woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
}
body.emh-home-polish .site-main ul.products li.product a.woocommerce-LoopProduct-link > img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: contain;
    margin: 0 0 15px;
    box-sizing: border-box;
}
body.emh-home-polish .site-main ul.products li.product .woocommerce-loop-product__title {
    margin: 0 0 12px;
    min-height: 0;
    line-height: 1.4;
}
/* Put the sale badge over the photo so it does not shift the price down. */
body.emh-home-polish .site-main ul.products li.product .onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    margin: 0;
    z-index: 2;
    pointer-events: none;
}
body.emh-home-polish .site-main ul.products li.product .price {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 10px;
    min-height: 46px;
    margin: auto 0 12px !important;
    font-size: 15px !important;
    font-weight: 550 !important;
    color: var(--emh-navy) !important;
    line-height: 1.5;
}
body.emh-home-polish .site-main ul.products li.product .price ins {
    font-size: 15px !important;
    font-weight: 550 !important;
    color: var(--emh-navy) !important;
    background: transparent;
    text-decoration: none;
}
body.emh-home-polish .site-main ul.products li.product .price del {
    font-size: 15px;
    font-weight: 400;
    color: var(--emh-muted);
    opacity: 1;
    margin-right: 0;
}
body.emh-home-polish .site-main ul.products li.product > .button {
    align-self: center;
    margin: 0;
}
@media (max-width: 900px) {
    body.emh-home-polish .emh-category-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    body.emh-home-polish .emh-category-nav { padding: 16px; }
    body.emh-home-polish .emh-category-links a { padding: 10px 8px; font-size: 14px; }
}

/* Consistent action colors on home, category, product, cart and contact pages. */
body.emh-brand-style .site-main a.button,
body.emh-brand-style .site-main button.button,
body.emh-brand-style .site-main input.button,
body.emh-brand-style .site-main button[type="submit"],
body.emh-brand-style .site-main input[type="submit"],
body.emh-brand-style .site-main .wp-block-button__link,
body.emh-brand-style .emh-btn-primary,
body.emh-brand-style .emh-quote-btn {
    background: var(--emh-blue) !important;
    border-color: var(--emh-blue) !important;
    color: #fff !important;
    border-radius: 6px;
    box-shadow: none !important;
}
body.emh-brand-style .site-main a.button:hover,
body.emh-brand-style .site-main button.button:hover,
body.emh-brand-style .site-main input.button:hover,
body.emh-brand-style .site-main button[type="submit"]:hover,
body.emh-brand-style .site-main input[type="submit"]:hover,
body.emh-brand-style .site-main .wp-block-button__link:hover,
body.emh-brand-style .emh-btn-primary:hover,
body.emh-brand-style .emh-quote-btn:hover {
    background: var(--emh-navy) !important;
    border-color: var(--emh-navy) !important;
    color: #fff !important;
}
body.emh-brand-style .site-main .button:focus-visible,
body.emh-brand-style .emh-btn-primary:focus-visible,
body.emh-brand-style .emh-quote-btn:focus-visible {
    outline: 3px solid var(--emh-navy);
    outline-offset: 3px;
}
/* A single warm accent is reserved for sales. */
body.emh-brand-style .site-main .onsale {
    background: var(--emh-sale) !important;
    border-color: var(--emh-sale) !important;
    color: #fff !important;
}
body.emh-brand-style .site-main .price,
body.emh-brand-style .site-main .price ins {
    color: var(--emh-navy) !important;
}
body.emh-brand-style .site-main .price del {
    color: var(--emh-muted) !important;
    opacity: 1;
}
body.emh-brand-style .emh-hero,
body.emh-brand-style.woocommerce-page .site-main {
    background: var(--emh-page);
}
body.emh-brand-style .emh-hero-h1,
body.emh-brand-style .emh-category-nav h2,
body.emh-brand-style ul.products li.product h2 {
    color: var(--emh-navy);
}
body.emh-brand-style .emh-btn-link,
body.emh-brand-style .main-navigation ul li a {
    color: var(--emh-navy);
}
body.emh-brand-style .main-navigation ul li:hover {
    background: var(--emh-soft);
}
body.emh-brand-style .woocommerce-pagination ul.page-numbers li .current {
    background: var(--emh-blue);
    color: #fff;
}
body.emh-brand-style .woocommerce-pagination ul.page-numbers li a {
    background: var(--emh-soft);
    color: var(--emh-navy);
}
body.emh-brand-style .woocommerce-pagination ul.page-numbers li a:hover {
    background: var(--emh-border);
}
body.emh-brand-style .emh-hero-slider .swiper-pagination-bullet-active {
    background: var(--emh-blue);
}
body.emh-brand-style ul.products li.product {
    border-color: #e1e9ef;
}
body.emh-brand-style ul.products li.product:hover {
    box-shadow: 0 8px 20px rgba(23, 59, 85, 0.12);
}

/* Keep percentage badges legible and compact, including variation labels. */
body.emh-brand-style .site-main .onsale.emh-percent-badge {
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    border-radius: 5px;
}

/* Shared image footprint: match the inner area of a 280px shop card. */
body.emh-home-polish .site-main ul.products li.product a.woocommerce-LoopProduct-link > img {
    max-width: var(--emh-image-width);
    height: var(--emh-image-height);
    margin: 0 auto 15px;
}
/* The theme uses generated IDs; important overrides keep these rules stable. */
body.emh-brand-style .emh-recently-sold {
    width: 100%;
    max-width: 1268px;
    margin: 40px auto !important;
    box-sizing: border-box;
}
body.emh-brand-style .emh-recently-sold .swiper-wrapper {
    align-items: stretch;
}
body.emh-brand-style .emh-recently-sold .emh-sold-slide {
    position: relative;
    height: auto;
    box-sizing: border-box;
    padding: 20px;
    background: #fff;
    border: 1px solid #e1e9ef;
    border-radius: 18px;
}
/* Put the card border on the whole slide, including the category link. */
body.emh-brand-style .emh-recently-sold .emh-sold-card {
    display: block !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    box-shadow: none !important;
}
body.emh-brand-style .emh-recently-sold .emh-sold-imgwrap {
    width: 100%;
    max-width: var(--emh-image-width);
    height: var(--emh-image-height);
    margin: 0 auto 15px;
    position: static !important;
    background: #fff !important;
}
body.emh-brand-style .emh-recently-sold img.emh-sold-img {
    display: block !important;
    width: 100% !important;
    max-width: var(--emh-image-width) !important;
    height: var(--emh-image-height) !important;
    max-height: var(--emh-image-height) !important;
    object-fit: contain !important;
    object-position: center;
    margin: 0 auto !important;
    border: 0 !important;
    border-radius: 0 !important;
}
body.emh-brand-style .emh-recently-sold .emh-sold-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    transform: none !important;
    padding: 5px 9px !important;
    margin: 0 !important;
    background: var(--emh-navy) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    border-radius: 5px;
    box-shadow: none !important;
    z-index: 2;
    pointer-events: none;
}
body.emh-brand-style .emh-recently-sold .emh-sold-meta {
    padding: 0 !important;
    text-align: center;
}
body.emh-brand-style .emh-recently-sold .emh-sold-name {
    font-size: 16px !important;
    line-height: 1.4 !important;
    color: var(--emh-navy);
}
body.emh-brand-style .emh-recently-sold .emh-sold-cat,
body.emh-brand-style .emh-recently-sold .emh-sold-cat a {
    color: var(--emh-muted);
}
body.emh-brand-style .emh-recently-sold .emh-sold-title {
    color: var(--emh-navy);
}
body.emh-brand-style .emh-recently-sold .emh-sold-swiper {
    border-color: var(--emh-border) !important;
}
body.emh-brand-style .emh-recently-sold .emh-sold-nav {
    background: var(--emh-soft) !important;
    border-color: var(--emh-border) !important;
}
body.emh-brand-style .emh-recently-sold .emh-sold-nav::after {
    border-color: var(--emh-navy) !important;
}
body.emh-brand-style .emh-recently-sold .swiper-pagination-bullet-active {
    background: var(--emh-blue);
}
