/*
 * Vila Baco Core v0.14.1
 * HOME ONLY — alignment of "Ver ficha técnica".
 *
 * Adega already works and is intentionally untouched.
 * Wine images, table images, search, header, filters, panel,
 * modals and WhatsApp are intentionally untouched.
 */

/* Make every featured wine card use the same internal tracks. */
.vb-home-block [data-vb-catalog="vinhos"] .vb-catalog__grid{
    align-items:stretch !important;
}

.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine{
    display:flex !important;
    flex-direction:column !important;
    align-self:stretch !important;
    height:100% !important;
}

.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine{
    position:static !important;
    display:grid !important;
    flex:1 1 auto !important;
    grid-template-columns:1fr !important;

    /* Exact same five areas on all 3 Home cards:
       facts / title / description / technical sheet / footer */
    grid-template-rows:62px 88px 170px 58px 123px !important;
    align-content:start !important;

    box-sizing:border-box !important;
    width:100% !important;
    min-height:501px !important;
    height:501px !important;
    padding-bottom:0 !important;
}

/* Facts: enough room for the card that wraps into 2 rows. */
.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__facts{
    position:static !important;
    grid-row:1 !important;
    display:flex !important;
    align-content:flex-start !important;
    align-items:flex-start !important;
    flex-wrap:wrap !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:62px !important;
    min-height:62px !important;
    max-height:62px !important;
    margin:0 !important;
    overflow:hidden !important;
}

/* Title: same 2-line area for every card. */
.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > h3{
    position:static !important;
    grid-row:2 !important;
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:88px !important;
    min-height:88px !important;
    max-height:88px !important;
    margin:0 !important;
    overflow:hidden !important;
}

/* Description: room for the longest current featured description. */
.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__description{
    position:static !important;
    grid-row:3 !important;
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:170px !important;
    min-height:170px !important;
    max-height:170px !important;
    margin:0 !important;
    overflow:visible !important;
}

/* Technical-sheet button: mathematically identical row. */
.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-wine-details-slot{
    position:static !important;
    inset:auto !important;
    grid-row:4 !important;
    display:flex !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    margin:0 !important;
    padding:0 !important;
}

.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-wine-details-slot > .vb-wine-details-link{
    position:static !important;
    inset:auto !important;
    align-self:flex-start !important;
    justify-self:start !important;
    margin:0 !important;
}

/* Footer: same final row on all cards. */
.vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__footer{
    position:static !important;
    inset:auto !important;
    grid-row:5 !important;
    align-self:stretch !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:123px !important;
    min-height:123px !important;
    max-height:123px !important;
    margin:0 !important;
}

/* Mobile remains natural. */
@media(max-width:600px){
    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine{
        display:flex !important;
        flex-direction:column !important;
        height:auto !important;
        min-height:0 !important;
    }

    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__facts,
    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > h3,
    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__description,
    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-wine-details-slot,
    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__footer{
        position:static !important;
        width:100% !important;
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
        overflow:visible !important;
    }

    .vb-home-block [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-wine-details-slot{
        margin-top:18px !important;
    }
}
