/*
 * Heather Rose Blog — Product Shop Post Layout v1.3.0
 * Loads only on individual WordPress blog posts.
 */
:root{
    --hrb-post-blush:#f8f3f2;
    --hrb-post-blush-2:#f5eeec;
    --hrb-post-border:#eadbd7;
    --hrb-post-text:#292525;
    --hrb-post-muted:#746d6b;
}

.single-post .entry-content{
    color:var(--hrb-post-text);
    font-size:17px;
    line-height:1.75;
    letter-spacing:.005em;
}
.single-post .entry-content > p{margin-top:0;margin-bottom:24px}
.single-post .entry-content > h2,
.single-post .entry-content > h3{
    font-family:Georgia,"Times New Roman",serif;
    font-weight:400;
    line-height:1.2;
    color:var(--hrb-post-text);
}
.single-post .entry-content > h2{margin:42px 0 18px;font-size:34px}
.single-post .entry-content > h3{margin:34px 0 16px;font-size:28px}

/* PRODUCT CARD */
.single-post .entry-content .hrb-product-card{
    display:grid !important;
    grid-template-columns:minmax(190px,300px) minmax(0,1fr) !important;
    gap:26px !important;
    align-items:start !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    margin:34px auto !important;
    padding:20px !important;
    border:1px solid var(--hrb-post-border) !important;
    border-radius:18px !important;
    background:linear-gradient(180deg,#faf7f6 0%,#f6efed 100%) !important;
    box-shadow:0 10px 22px rgba(116,91,87,.08), inset 0 1px 1px rgba(255,255,255,.92) !important;
    box-sizing:border-box !important;
    overflow:visible !important;
}

/* MEDIA COLUMN — NO WHITE WRAPPER. Images themselves carry the frame. */
.single-post .entry-content .hrb-product-media{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-start !important;
    align-self:start !important;
    gap:14px !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    overflow:visible !important;
}

.single-post .entry-content .hrb-product-media > *{
    flex:0 0 auto !important;
    align-self:center !important;
    width:auto !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

.single-post .entry-content .hrb-product-image-link{
    display:block !important;
    width:auto !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 auto !important;
    padding:0 !important;
    line-height:0 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    overflow:visible !important;
}

.single-post .entry-content .hrb-product-image-el{
    display:block !important;
    width:auto !important;
    max-width:280px !important;
    height:auto !important;
    min-height:0 !important;
    max-height:440px !important;
    margin:0 auto !important;
    padding:0 !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
    object-position:center !important;
    position:static !important;
    float:none !important;
    border:1px solid #e8d9d5 !important;
    border-radius:10px !important;
    background:transparent !important;
    box-shadow:0 8px 18px rgba(116,91,87,.08) !important;
    box-sizing:border-box !important;
}

/* Info side */
.single-post .entry-content .hrb-product-info{
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    padding:8px 12px 8px 0 !important;
}
.single-post .entry-content .hrb-product-info p{
    width:100%;
    margin:0 0 16px !important;
    color:#403b3a;
    font-size:17px;
    line-height:1.7;
}
.single-post .entry-content .hrb-product-info h2,
.single-post .entry-content .hrb-product-info h3,
.single-post .entry-content .hrb-product-info h4{
    margin:0 0 12px !important;
    color:#2d2827;
    font-family:Georgia,"Times New Roman",serif;
    font-size:27px;
    line-height:1.2;
    font-weight:400;
}
.single-post .entry-content .hrb-product-info strong{font-weight:700;color:#2d2827}

/* Buttons */
.single-post .entry-content .wp-block-buttons{
    width:100%;
    margin:10px 0 0 !important;
    gap:10px !important;
}
.single-post .entry-content .wp-block-button{margin:0 !important}
.single-post .entry-content .wp-block-button__link,
.single-post .entry-content a.wp-block-button__link,
.single-post .entry-content a.button,
.single-post .entry-content a.btn,
.single-post .entry-content a.wp-element-button,
.single-post .entry-content p[style*="background"] > a:only-child,
.single-post .entry-content div[style*="background"] > a:only-child{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:240px !important;
    min-height:54px !important;
    padding:14px 26px !important;
    border:1px solid #eee3e0 !important;
    border-radius:8px !important;
    background:linear-gradient(180deg,#fbf7f6 0%,#f5eeec 100%) !important;
    color:#262222 !important;
    font-family:inherit !important;
    font-size:14px !important;
    font-weight:600 !important;
    line-height:1.2 !important;
    letter-spacing:.18em !important;
    text-transform:uppercase !important;
    text-align:center !important;
    text-decoration:none !important;
    box-shadow:0 8px 16px rgba(111,86,82,.08),inset 0 1px 1px rgba(255,255,255,.96) !important;
    transition:transform .15s ease,background .15s ease,box-shadow .15s ease !important;
}
.single-post .entry-content .wp-block-button__link:hover,
.single-post .entry-content a.wp-block-button__link:hover,
.single-post .entry-content a.button:hover,
.single-post .entry-content a.btn:hover,
.single-post .entry-content a.wp-element-button:hover{
    color:#262222 !important;
    transform:translateY(-1px);
    background:linear-gradient(180deg,#fff 0%,#f7f1ef 100%) !important;
    box-shadow:0 10px 18px rgba(111,86,82,.10),inset 0 1px 1px rgba(255,255,255,.98) !important;
}

/* Standalone images outside product cards */
.single-post .entry-content > figure.wp-block-image,
.single-post .entry-content > .wp-block-image,
.single-post .entry-content > figure.wp-caption,
.single-post .entry-content > p:has(> img:not(.emoji)),
.single-post .entry-content > p:has(> a > img:not(.emoji)){
    width:min(100%,360px) !important;
    height:auto !important;
    min-height:0 !important;
    margin:26px auto 32px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}
.single-post .entry-content > figure.wp-block-image img,
.single-post .entry-content > .wp-block-image img,
.single-post .entry-content > figure.wp-caption img,
.single-post .entry-content > p > img:not(.emoji),
.single-post .entry-content > p > a > img:not(.emoji){
    display:block !important;
    width:auto !important;
    max-width:100% !important;
    height:auto !important;
    max-height:520px !important;
    margin:0 auto !important;
    padding:0 !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
    border:1px solid #eee2df !important;
    border-radius:12px !important;
    background:transparent !important;
    box-shadow:0 8px 18px rgba(116,91,87,.08) !important;
    box-sizing:border-box !important;
}

.single-post .entry-content figcaption,
.single-post .entry-content .wp-caption-text{
    margin:9px 4px 0 !important;
    color:var(--hrb-post-muted) !important;
    font-size:12px !important;
    line-height:1.5 !important;
    text-align:center !important;
}

@media(max-width:850px){
    .single-post .entry-content .hrb-product-card{
        grid-template-columns:1fr !important;
        gap:20px !important;
        max-width:680px !important;
        padding:16px !important;
        border-radius:16px !important;
    }
    .single-post .entry-content .hrb-product-media{width:100% !important}
    .single-post .entry-content .hrb-product-image-el{max-width:min(100%,360px) !important;max-height:600px !important}
    .single-post .entry-content .hrb-product-info{
        padding:0 8px 8px !important;
        align-items:center !important;
        text-align:center !important;
    }
    .single-post .entry-content .hrb-product-info .wp-block-buttons{justify-content:center}
}

@media(max-width:600px){
    .single-post .entry-content{font-size:16px;line-height:1.75}
    .single-post .entry-content .hrb-product-card{margin:24px auto !important;padding:12px !important;border-radius:14px !important}
    .single-post .entry-content .hrb-product-info p{font-size:16px}
    .single-post .entry-content .hrb-product-info h2,
    .single-post .entry-content .hrb-product-info h3,
    .single-post .entry-content .hrb-product-info h4{font-size:24px}
    .single-post .entry-content .wp-block-button__link,
    .single-post .entry-content a.wp-block-button__link,
    .single-post .entry-content a.button,
    .single-post .entry-content a.btn,
    .single-post .entry-content a.wp-element-button,
    .single-post .entry-content p[style*="background"] > a:only-child,
    .single-post .entry-content div[style*="background"] > a:only-child{
        width:100% !important;
        min-width:0 !important;
        box-sizing:border-box !important;
    }
}


/* v1.3.1 final image normalization: no white canvas, no forced enlargement. */
.single-post .entry-content .hrb-product-media,
.single-post .entry-content .hrb-product-media > *,
.single-post .entry-content .hrb-product-image-link{
    background:transparent !important;
    padding:0 !important;
    min-height:0 !important;
    height:auto !important;
}
.single-post .entry-content .hrb-product-image-el{
    width:auto !important;
    max-width:280px !important;
    height:auto !important;
    max-height:440px !important;
    padding:0 !important;
    background:transparent !important;
    object-fit:contain !important;
}
@media(max-width:850px){
    .single-post .entry-content .hrb-product-image-el{
        max-width:min(100%,320px) !important;
        max-height:500px !important;
    }
}
@media(max-width:600px){
    .single-post .entry-content .hrb-product-image-el{
        max-width:min(100%,290px) !important;
        max-height:440px !important;
    }
}


/* v1.3.2 adaptive image sizing — preserve each image's natural ratio and
   automatically size the card according to portrait/square/landscape shape. */
.single-post .entry-content .hrb-product-card{
    grid-template-columns:minmax(190px,var(--hrb-media-col,285px)) minmax(0,1fr) !important;
}

.single-post .entry-content .hrb-product-media{
    width:100% !important;
}

.single-post .entry-content .hrb-product-image-el{
    width:auto !important;
    height:auto !important;
    max-width:100% !important;
    max-height:none !important;
    object-fit:contain !important;
}

/* Tall photos stay narrower so they don't overpower the copy. */
.single-post .entry-content .hrb-product-image-el.hrb-img-portrait{
    max-width:225px !important;
    max-height:360px !important;
}

/* Square / almost-square photos get the normal product size. */
.single-post .entry-content .hrb-product-image-el.hrb-img-square{
    max-width:275px !important;
    max-height:340px !important;
}

/* Landscape photos may use a little more width, but remain shorter. */
.single-post .entry-content .hrb-product-image-el.hrb-img-landscape{
    max-width:305px !important;
    max-height:265px !important;
}

/* Very wide images can spread wider without becoming tall. */
.single-post .entry-content .hrb-product-image-el.hrb-img-wide{
    max-width:325px !important;
    max-height:225px !important;
}

/* Multiple-image products keep a tidy vertical stack. */
.single-post .entry-content .hrb-product-card--multi .hrb-product-media{
    gap:12px !important;
}

@media(max-width:850px){
    .single-post .entry-content .hrb-product-card{
        grid-template-columns:1fr !important;
    }
    .single-post .entry-content .hrb-product-image-el.hrb-img-portrait{max-width:225px !important;max-height:370px !important}
    .single-post .entry-content .hrb-product-image-el.hrb-img-square{max-width:300px !important;max-height:360px !important}
    .single-post .entry-content .hrb-product-image-el.hrb-img-landscape{max-width:360px !important;max-height:290px !important}
    .single-post .entry-content .hrb-product-image-el.hrb-img-wide{max-width:390px !important;max-height:245px !important}
}

@media(max-width:600px){
    .single-post .entry-content .hrb-product-image-el.hrb-img-portrait{max-width:min(68vw,215px) !important;max-height:360px !important}
    .single-post .entry-content .hrb-product-image-el.hrb-img-square{max-width:min(82vw,290px) !important;max-height:340px !important}
    .single-post .entry-content .hrb-product-image-el.hrb-img-landscape{max-width:min(88vw,340px) !important;max-height:270px !important}
    .single-post .entry-content .hrb-product-image-el.hrb-img-wide{max-width:min(90vw,365px) !important;max-height:220px !important}
}


/* v1.3.5: any standalone linked CTA text becomes the same product button. */
.single-post .entry-content .hrb-product-info a.hrb-auto-shop-button{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:240px !important;
    min-height:54px !important;
    padding:14px 26px !important;
    margin:10px 0 0 !important;
    border:1px solid #eee3e0 !important;
    border-radius:8px !important;
    background:linear-gradient(180deg,#fbf7f6 0%,#f5eeec 100%) !important;
    color:#262222 !important;
    font-family:inherit !important;
    font-size:14px !important;
    font-weight:600 !important;
    line-height:1.2 !important;
    letter-spacing:.18em !important;
    text-transform:uppercase !important;
    text-align:center !important;
    text-decoration:none !important;
    box-shadow:0 8px 16px rgba(111,86,82,.08), inset 0 1px 1px rgba(255,255,255,.96) !important;
    transition:transform .15s ease, background .15s ease, box-shadow .15s ease !important;
}
.single-post .entry-content .hrb-product-info a.hrb-auto-shop-button:hover{
    transform:translateY(-1px);
    background:linear-gradient(180deg,#fff 0%,#f7f1ef 100%) !important;
    box-shadow:0 10px 18px rgba(111,86,82,.10), inset 0 1px 1px rgba(255,255,255,.98) !important;
}
@media(max-width:600px){
    .single-post .entry-content .hrb-product-info a.hrb-auto-shop-button{
        width:100% !important;
        min-width:0 !important;
        box-sizing:border-box !important;
    }
}


/* v1.3.8 extracted inline product links become a tidy action row. */
.single-post .entry-content .hrb-auto-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    width:100%;
    margin-top:10px;
}

/* v1.3.9: recognize legacy Gutenberg columns/galleries as product media.
   Multiple images stay clean and consistent inside the card instead of being
   left unstyled above it. */
.single-post .entry-content .hrb-product-card--multi .hrb-product-media{
    gap:12px !important;
}
.single-post .entry-content .hrb-product-card--multi .hrb-product-image-el{
    max-width:100% !important;
}
