:root{
  --tl-menu-w: 320px;
  --tl-cart-w: 360px;
  --tl-gutter: 1rem;
  --tl-speed: .5s;
  --tl-vmargin: 1.5rem;
}



/*
.tl-app{
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: var(--bg);




}

.tl-track{
  height: 100%;
  display: flex;
  width: calc(var(--tl-menu-w) + 100vw + var(--tl-cart-w));
  transform: translate3d(calc(-1 * var(--tl-menu-w)), 0, 0); 
  transition: transform var(--tl-speed) ease;
  will-change: transform;
}


.tl-col{
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
*/
.tl-col--menu, .tl-col--cart{ 
    width: var(--tl-menu-w); 
    border-right: none; 
    padding: 0 var(--tl-vmargin);

    .tl-nav, .tl-cart {
        padding: var(--tl-vmargin) 0;
        ul {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: var(--tl-vmargin);
            li {
                text-transform: uppercase;
                a {
                    text-decoration: none;
                    letter-spacing: .5px;
                    font-weight: 500;
                    transition: calc(var(--tl-speed) / 2) ease-out;
                    &:hover {
                        color: var(--accent);
                    }
                }
            }
             ul {
                margin: var(--tl-vmargin) 0 var(--tl-vmargin) var(--tl-vmargin);
            }
        }       
    }
}

.tl-nav, .foo-nav {
    li {
        text-transform: uppercase;
        a {
            text-decoration: none;
            letter-spacing: .5px;
        }
    }
}

.tl-xxss, .foo-xxss {
    margin: var(--tl-vmargin) 0;
    display: flex;
    gap: var(--tl-vmargin);
    align-items: start;           
    a {
        display: flex;
        align-items: end;
        position: relative;
        background-color: var(--bg);
        &:after {
            content: '';
            position:absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            z-index: 10;
            background-color: var(--primary);
            mix-blend-mode: screen;
        }
        img {
            height: 1.25rem;
            filter: invert(0);
            transition: calc(var(--tl-speed) / 2) ease-out;
        }
        &:hover {
            img {
                filter: invert(0.5) brightness(.885) sepia(3) contrast(9.25) hue-rotate(716deg)
            }  
        }
    }
} 

.foo-xxss {
    justify-content: end;
}

/*
.tl-col--content{ width: 100dvw; }
.tl-col--cart{ width: var(--tl-cart-w); }

.tl-col__inner{ padding: var(--tl-vmargin); height: initial; min-height: calc(100% - (var(--tl-vmargin) * 2) ); }

/* Topbar */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;        
    background-color: var(--bg);
}
.tl-topbar{
    display:flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--tl-vmargin) 0;
    transition: var(--tl-speed) ease-out;
    > * {
        flex: 1;
    }
    button{
        border:0; 
        background: none; 
        color: inherit; 
        font-family: inherit;
        cursor: pointer;
        padding: 1rem;
        box-sizing: border-box;
        overflow:hidden;
        @media (max-width: 768px) {
            padding: .5rem;
        }
    }
    
    .tl-toggle {
        display: flex;
        width: 8rem;
        gap:1rem;
        cursor: pointer;
        
        #menu-icon {
            height: .75rem;
            .shape {
                transition: d 0.35s cubic-bezier(0.4, 0, 0.2, 1), fill 0.25s ease; 
                d: path( "M140 40 L0 40 L0 30 L140 30 Z" );
                fill: var(--primary);
            }
        }

        &:hover #menu-icon .shape {
            d: path( "M140 75 L0 43 L0 38 L140 0 Z" );
            fill: var(--accent);
        }
    }   
    .tl-right-menu {
        display: flex;
        justify-content: end;
        button {
            position: relative;
            aspect-ratio: 1 / 1;
            border-radius: 100rem;
            svg {
                width: 1rem;
                * {
                    transition: calc(var(--tl-speed) / 2) ease-out; 
                }
            }
            &:hover {
                svg * { fill: var(--accent); }
                /*svg { animation: marqueeShift .5s ease-in-out forwards; } */
            }
            span.cart-count {
                position: absolute;
                top: .75em;
                right: 1em;
                font-size: .5rem;
                background: var(--accent);
                display: flex;
                aspect-ratio: 1 / 1;
                width: 1.5em;
                border-radius: 3rem;
                justify-content: center;
                align-items: center;
                line-height: 0;
                font-weight: 500;
            }
            span.user-initials {
                display: flex;
                width: 2rem;
                background: var(--primary);
                color: var(--bg);
                border-radius: 100rem;
                height: 2rem;
                justify-content: center;
                align-items: center;
                transition: calc(var(--tl-speed) / 2) ease-out; 
                &:hover {
                    background-color: var(--accent);
                    color: var(--primary);
                }
            }
        }
    }  
}

@keyframes marqueeShift {
    0% { transform: translateX(0%); }              
    45% { transform: translateX(200%); }
    46% { transform: translateX(-200%); }              
    100% { transform: translateX(0%);}              
  }

body.menu {
    .tl-topbar .tl-toggle {
        #menu-icon .shape {
            d: path( "M140 75 L0 43 L0 38 L140 0 Z" );
            fill: var(--accent);
        }        
        &:hover #menu-icon .shape {
            d: path( "M140 40 L0 40 L0 36 L140 36 Z" );
            fill: var(--primary);
        }
    }
}

.tl-brand{ 
    text-align: center; 
    img { 
        height: 5rem; transition: var(--tl-speed) ease-out; background-color: var(--white); border-radius: 5rem; 
        @media (max-width: 768px) {
            height: 3rem;
        }
    } 
}

.has-scrolled { 

        .tl-topbar {
            background-color: var(--bg);
            padding: 0;
            .tl-brand img { 
                height: 3rem; 
            }
        }
}

.tl-brand__link{ color: inherit; font-weight: 600; display: flex; justify-content: center; }

/* Panel states (set via data-panel on #tl-app)
.tl-app[data-panel="content"] .tl-track{
  transform: translate3d(calc(-1 * var(--tl-menu-w)), 0, 0);
}
.tl-app[data-panel="menu"] .tl-track{
  transform: translate3d(0, 0, 0);
}
.tl-app[data-panel="cart"] .tl-track{
  transform: translate3d(calc(-1 * (var(--tl-menu-w) + var(--tl-cart-w))), 0, 0); 
}

/* Optional: prevent text selection during transitions 
.tl-track{ user-select: none; }
.tl-col__inner, .tl-entry__body{ user-select: text; }


@media (max-width: 520px){
  :root{ --tl-menu-w: 84vw; --tl-cart-w: 92vw; }
}
 */

aside .tl-col__inner {
    padding: 1rem;
}

aside.tl-col--menu {
    position: fixed;
    top: 0px;
    left: calc(var(--tl-menu-w) * -1);
    width: var(--tl-menu-w);
    transition: all var(--tl-speed) ease-out;
    z-index: 1000;
    max-height: 100%;
    min-height: 100%;
    background: var(--bg);
}

aside.tl-col--cart {
    position: fixed;
    top: 0px;
    right: calc(var(--tl-cart-w) * -1);
    width: var(--tl-cart-w);
    transition: all var(--tl-speed) ease-out;
    z-index: 1000;
    background: var(--bg);
    max-height: 100%;
    min-height: 100%;
    overflow-y: auto;
    
    .col-title {
        display: flex;
        justify-content: space-between;
        margin-top: -.3rem;
        button {
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--primary);
            cursor: pointer;
        }
    }
}

body {
    overflow-x: hidden;
    header, footer, main {
        transition: transform var(--tl-speed) ease-out;
    }
}

body.menu {
    aside.tl-col--menu {
        left: 0;
    }
    header, footer, main {
        transform: translateX(var(--tl-menu-w));
    }
}

body.cart {
    aside.tl-col--cart {
        right: 0;
    }
    header, footer, main {
        transform: translateX(calc(var(--tl-menu-w) * -1));
    }
}

.tl-cart-grid {
    display: grid;
    margin: 1.5rem 0;

    .tl-cart-grid__row {
        display: grid;
        grid-template-columns: 60px 5fr 1fr 1fr;
        align-items: center;
        column-gap: .5rem;
        padding: .75rem 0;
        border-top: 1px solid rgba(0,0,0,.1);    
        .tl-cart-grid__thumb img {
            width: 56px;
            height: auto;
            display: block;
        }
        a {
            display: inline-block;
            line-height: 1.2;
            text-decoration: none;
            &:hover {
                text-decoration: underline;
            }
        }
        &.totals > * {
            grid-column: span 2;
            text-align: right;
        }
    }
  }
  
  .tl-cart-grid__unit,
  .tl-cart-grid__qty,
  .tl-cart-grid__line {
    text-align: right;
  }
  
  .tl-cart-grid__remove {
    display: flex;
    justify-content: flex-end;
    button {
        border:0;
        background: none;
        cursor: pointer;
    }
  }

  .tl-cart__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
  
.tl-cart-promotions {
        margin: 2rem 0;
        background: white;
        padding: 1rem;
        border-radius: 8px;
        display: grid;
        gap: 1rem;
        
        .tl-cart-promotions__title {
            margin: 0;
            font-size: .875rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .tl-cart-promotions__gift {
            display: grid;
            grid-template-columns: 60px 1fr;
            gap: 1rem;
            align-content: center;
        }
        .tl-cart-promotions__gift * {
            margin: 0;
            align-content: center;
            line-height: 1.2;
            font-size: .875rem;
        }
    }