/* Where to Buy: normalize and center retailer logos */
body.page-id-5969 img[alt^="Buy Samsill products"] {
    display: block;
    width: 160px;
    height: 60px;
    object-fit: contain;
    object-position: center;
    max-width: 100%;
    margin: 0 auto;
}

/* Remove gap between Kadence header and page content */
#masthead {
    margin-bottom: 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid #dfe3e8 !important;
    box-shadow: 0 4px 14px rgba(0, 31, 61, 0.06) !important;
    position: relative;
    z-index: 100;
}

#content,
.site-content,
.content-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wp-site-blocks > *:first-child {
    margin-top: 0 !important;
}

/* Homepage statistics section */
body.home .samsill-stats,
body.page-id-6429 .samsill-stats {
    background: #ffffff !important;
    border-top: 1px solid #e6e8eb !important;
    border-bottom: 1px solid #e6e8eb !important;
    padding-top: 34px !important;
    padding-bottom: 34px !important;
}

/* Remove individual card treatment */
body.home .samsill-stat-card,
body.page-id-6429 .samsill-stat-card {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

/* Add subtle separators between statistics */
body.home .samsill-stat-card:not(:last-child),
body.page-id-6429 .samsill-stat-card:not(:last-child) {
    border-right: 1px solid #dfe3e8 !important;
}

/* 1953: heritage gold */
body.home .samsill-stat-card:nth-child(1) .samsill-stat-icon,
body.page-id-6429 .samsill-stat-card:nth-child(1) .samsill-stat-icon {
    background: #9a6a18 !important;
    color: #ffffff !important;
}

/* 70+: Samsill blue */
body.home .samsill-stat-card:nth-child(2) .samsill-stat-icon,
body.page-id-6429 .samsill-stat-card:nth-child(2) .samsill-stat-icon {
    background: #174785 !important;
    color: #ffffff !important;
}

/* ONLY: preserve the U.S. flag treatment */
body.home .samsill-stat-card:nth-child(3) .samsill-stat-icon,
body.page-id-6429 .samsill-stat-card:nth-child(3) .samsill-stat-icon {
    border-color: #d4d8de !important;
    box-shadow: none !important;
}

/* USDA: green */
body.home .samsill-stat-card:nth-child(4) .samsill-stat-icon,
body.page-id-6429 .samsill-stat-card:nth-child(4) .samsill-stat-icon {
    background: #3f7f4c !important;
    color: #ffffff !important;
}

/* Keep all statistic numbers consistent */
body.home .samsill-stat-number,
body.page-id-6429 .samsill-stat-number {
    color: #102a4c !important;
}

/* Homepage blog card images: show full graphics */
body.home .samsill-blog-card img,
body.page-id-6429 .samsill-blog-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #ffffff !important;
}

/* Responsive cleanup */
@media (max-width: 1024px) {
    body.home .samsill-stat-card,
    body.page-id-6429 .samsill-stat-card {
        border-right: 0 !important;
        border-bottom: 1px solid #dfe3e8 !important;
    }

    body.home .samsill-stat-card:nth-last-child(-n+2),
    body.page-id-6429 .samsill-stat-card:nth-last-child(-n+2) {
        border-bottom: 0 !important;
    }
}

@media (max-width: 782px) {
    body.home .samsill-stat-card,
    body.page-id-6429 .samsill-stat-card {
        border-bottom: 1px solid #dfe3e8 !important;
    }

    body.home .samsill-stat-card:last-child,
    body.page-id-6429 .samsill-stat-card:last-child {
        border-bottom: 0 !important;
    }
}