/*
 * AvidVinyl Build 056.2 — Exact Tagline Alignment
 * Header correction only.
 */

/* Header search is removed from index.php; this is a defensive fallback. */
.site-header .av-search{
    display:none !important;
}

/* Two-column top header: brand left, account/basket right. */
.site-header .av-topbar{
    min-height:128px !important;
    padding-top:14px !important;
    padding-bottom:14px !important;
    grid-template-columns:max-content auto !important;
    justify-content:space-between !important;
    gap:32px !important;
}

/*
 * Critical fix:
 * make the brand container the same width as the logo artwork rather than
 * allowing it to stretch across the header.
 */
.site-header .av-brand-v56{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:center !important;
    width:fit-content !important;
    max-width:min(560px,48vw) !important;
    min-width:0 !important;
    justify-self:start !important;
    text-decoration:none !important;
}

.site-header .av-brand-v56 img{
    display:block !important;
    width:100% !important;
    max-width:560px !important;
    height:auto !important;
    object-fit:contain;
    object-position:left center;
}

/*
 * The approved logo artwork places the A of AvidVinyl.com approximately
 * 25.5% across the image, after the record icon.
 * Because the brand now fits the logo width, this percentage is reliable.
 */
.site-header .av-brand-v56 .av-brand-tagline{
    display:block !important;
    margin-top:8px !important;
    margin-left:25.5% !important;
    color:rgba(255,255,255,.95) !important;
    font-family:Arial,Helvetica,sans-serif;
    font-size:16px !important;
    font-weight:600 !important;
    line-height:1.2 !important;
    letter-spacing:.01em !important;
    white-space:nowrap !important;
}

/* Rebalance account/basket in the cleared right side. */
.site-header .av-actions{
    justify-self:end !important;
    align-self:center !important;
    margin:0 !important;
}

/* Keep the approved navigation polish. */
.site-header .av-nav{
    column-gap:0 !important;
}

.site-header .av-nav a{
    padding-left:16px !important;
    padding-right:16px !important;
}

.site-header{
    border-bottom:1px solid #e8dfcf !important;
}

@media(max-width:1050px){
    .site-header .av-brand-v56{
        max-width:min(460px,55vw) !important;
    }

    .site-header .av-brand-v56 .av-brand-tagline{
        font-size:14px !important;
    }
}

@media(max-width:720px){
    .site-header .av-topbar{
        min-height:auto !important;
        padding:11px 14px !important;
        gap:12px !important;
    }

    .site-header .av-brand-v56{
        max-width:min(310px,65vw) !important;
    }

    .site-header .av-brand-v56 .av-brand-tagline{
        margin-top:5px !important;
        margin-left:25.5% !important;
        max-width:230px;
        font-size:10.5px !important;
        white-space:normal !important;
    }
}

/* =========================================================
   AvidVinyl Build 071.0 — Mobile homepage navigation
   Keep desktop navigation unchanged; wrap links on phones.
   ========================================================= */
@media(max-width:720px){
    .site-header .av-nav{
        display:flex !important;
        flex-wrap:wrap !important;
        justify-content:center !important;
        align-items:center !important;
        width:100% !important;
        max-width:100% !important;
        min-height:auto !important;
        padding:6px 10px !important;
        column-gap:0 !important;
        row-gap:0 !important;
        overflow-x:hidden !important;
        box-sizing:border-box !important;
    }

    .site-header .av-nav a{
        flex:0 0 auto !important;
        min-height:52px !important;
        padding-left:10px !important;
        padding-right:10px !important;
        font-size:11px !important;
        white-space:nowrap !important;
    }

    .site-header .av-nav a::after{
        bottom:6px !important;
    }
}

/* =========================================================
   AvidVinyl Build 071.0 — Final mobile navigation
   Reliable two-column phone layout.
   ========================================================= */
@media(max-width:720px){
    .site-header .av-nav{
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        width:100% !important;
        max-width:100% !important;
        min-height:auto !important;
        padding:6px 10px 8px !important;
        gap:0 !important;
        overflow:hidden !important;
        box-sizing:border-box !important;
    }

    .site-header .av-nav a{
        min-width:0 !important;
        min-height:48px !important;
        padding:0 6px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        text-align:center !important;
        font-size:11px !important;
        line-height:1.15 !important;
        white-space:normal !important;
    }

    .site-header .av-nav a:last-child{
        grid-column:1 / -1 !important;
        justify-self:center !important;
        width:50% !important;
    }

    .site-header .av-nav a::after{
        bottom:4px !important;
    }
}

/* =========================================================
   AvidVinyl Build 071.0 — Homepage mobile polish
   ========================================================= */
@media(max-width:720px){
    /* Reduce excess space before the homepage catalogue controls. */
    .wrap{
        padding-top:28px !important;
    }

    .wrap > .filters{
        margin-top:0 !important;
        padding-top:0 !important;
    }

    /* Keep two-column cards, but make copy more compact on phones. */
    .wrap > .grid .card-body{
        padding:13px 12px 14px !important;
    }

    .wrap > .grid .artist{
        margin-bottom:5px !important;
        font-size:.92rem !important;
        line-height:1.18 !important;
    }

    .wrap > .grid .card h3{
        margin-bottom:9px !important;
        font-size:.86rem !important;
        line-height:1.25 !important;
    }

    .wrap > .grid .meta{
        margin-bottom:5px !important;
        font-size:.82rem !important;
        line-height:1.3 !important;
    }

    .wrap > .grid .buy-row{
        gap:8px !important;
        padding-top:12px !important;
    }
}

/* =========================================================
   AvidVinyl Build 071.0 — Final mobile search spacing
   ========================================================= */
@media(max-width:720px){
    .av-benefits + .wrap{
        padding-top:12px !important;
    }

    .av-benefits + .wrap > .filters{
        margin-top:0 !important;
    }
}
