/*
 * Vila Baco Core v0.14.0
 * Fixes:
 * - Home wine-card button alignment
 * - Adega wine-card button alignment
 * - Adega search visibility
 *
 * Does NOT alter wine images, table images, header, people filter,
 * modals, panel or WhatsApp.
 */

/* ==========================================================
   ALL WINE CATALOG CARDS
   Equal-height card + flexible description = aligned button/footer
   without clipping the text.
   ========================================================== */
[data-vb-catalog="vinhos"] .vb-catalog__grid{
    align-items:stretch !important;
}

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

[data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine{
    display:grid !important;
    flex:1 1 auto !important;
    grid-template-columns:1fr !important;
    grid-template-rows:auto auto minmax(150px,1fr) 58px 123px !important;
    align-content:stretch !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-height:520px !important;
    height:auto !important;
    padding-bottom:24px !important;
}

[data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__facts{
    grid-row:1 !important;
    align-self:start !important;
    min-height:58px !important;
    margin:0 !important;
}

[data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > h3{
    grid-row:2 !important;
    align-self:start !important;
    min-height:82px !important;
    margin:0 !important;
}

[data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__description{
    grid-row:3 !important;
    align-self:start !important;
    min-height:150px !important;
    margin:0 !important;
}

[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;
    margin:0 !important;
    padding:0 !important;
}

[data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-wine-details-slot > .vb-wine-details-link{
    position:static !important;
    margin:0 !important;
}

[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;
    margin:0 !important;
}

/* ==========================================================
   ADEGA SEARCH
   Force visible and usable on /adega/.
   ========================================================== */
body.vb-content-page [data-vb-catalog="vinhos"] .vb-catalog__search-form{
    position:relative !important;
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:100% !important;
    max-width:760px !important;
    min-height:56px !important;
    margin:0 0 20px !important;
    overflow:visible !important;
}

body.vb-content-page [data-vb-catalog="vinhos"] .vb-catalog__search-form label{
    position:relative !important;
    display:block !important;
    visibility:visible !important;
    width:100% !important;
}

body.vb-content-page [data-vb-catalog="vinhos"] .vb-catalog__search-form input[type="search"]{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:56px !important;
    padding:0 58px 0 24px !important;
    border:1px solid rgba(67,0,25,.18) !important;
    border-radius:0 !important;
    color:#3d3035 !important;
    background:#fff !important;
    font:inherit !important;
    font-size:14px !important;
}

body.vb-content-page [data-vb-catalog="vinhos"] .vb-catalog__search-form button{
    position:absolute !important;
    top:50% !important;
    right:12px !important;
    display:grid !important;
    place-items:center !important;
    visibility:visible !important;
    width:34px !important;
    height:34px !important;
    padding:0 !important;
    border:0 !important;
    color:#430019 !important;
    background:transparent !important;
    transform:translateY(-50%) !important;
    cursor:pointer !important;
}

body.vb-content-page [data-vb-catalog="vinhos"] .vb-catalog__search-form button svg{
    width:18px !important;
    height:18px !important;
    fill:none !important;
    stroke:currentColor !important;
    stroke-width:1.8 !important;
}

/* Existing instant-search hidden state */
[data-vb-catalog="vinhos"] .vb-product--wine.vb-search-hidden{
    display:none !important;
}

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

    [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__facts,
    [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > h3,
    [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__description{
        min-height:0 !important;
    }

    [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-wine-details-slot,
    [data-vb-catalog="vinhos"] .vb-product--wine > .vb-product__body--wine > .vb-product__footer{
        height:auto !important;
        min-height:0 !important;
    }

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