/* TWM Premium Floating Cart - fully scoped to avoid theme/header/footer conflicts */
.twm-pfc-root{
    --twm-pfc-gold:#D0A743;
    --twm-pfc-gold-light:#EBC66D;
    --twm-pfc-gold-dark:#9E7928;
    --twm-pfc-black:#111111;
    --twm-pfc-white:#ffffff;
    --twm-pfc-cream:#FBF7ED;
    --twm-pfc-muted:#756B5E;
    --twm-pfc-border:rgba(208,167,67,.24);
    --twm-pfc-shadow:0 28px 80px rgba(17,17,17,.22);
    font-family:"DM Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.twm-pfc-root *{box-sizing:border-box;}

.twm-pfc-overlay{
    position:fixed;
    inset:0;
    z-index:999970;
    background:rgba(17,17,17,.48);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    opacity:0;
    pointer-events:none;
    transition:opacity .32s ease;
}

.twm-pfc-root.is-open .twm-pfc-overlay{
    opacity:1;
    pointer-events:auto;
}

.twm-pfc-float{
    position:fixed;
    right:24px;
    bottom:26px;
    z-index:999960;
    width:74px;
    height:74px;
    border:0 !important;
    border-radius:999px;
    color:var(--twm-pfc-black) !important;
    background:linear-gradient(135deg,var(--twm-pfc-gold) 0%,var(--twm-pfc-gold-light) 48%,var(--twm-pfc-gold-dark) 100%) !important;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow:0 20px 48px rgba(208,167,67,.36), inset 0 1px 0 rgba(255,255,255,.7);
    transform:translateZ(0);
    transition:transform .28s ease, box-shadow .28s ease, filter .28s ease;
    isolation:isolate;
}

.twm-pfc-float:hover{
    transform:translateY(-5px) scale(1.04);
    box-shadow:0 28px 64px rgba(208,167,67,.46), inset 0 1px 0 rgba(255,255,255,.8);
    filter:saturate(1.08);
}

.twm-pfc-float:focus-visible,
.twm-pfc-close:focus-visible,
.twm-pfc-primary:focus-visible,
.twm-pfc-secondary:focus-visible{
    outline:3px solid rgba(208,167,67,.48);
    outline-offset:4px;
}

.twm-pfc-float__shine{
    position:absolute;
    inset:2px;
    border-radius:inherit;
    background:linear-gradient(120deg,rgba(255,255,255,.5),transparent 38%,rgba(255,255,255,.16));
    z-index:-1;
}

.twm-pfc-float__icon{display:flex;line-height:0;}

.twm-pfc-count{
    position:absolute;
    top:-7px;
    right:-6px;
    min-width:27px;
    height:27px;
    padding:0 7px;
    border-radius:999px;
    background:var(--twm-pfc-black);
    color:#fff;
    border:2px solid #fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:900;
    line-height:1;
}

.twm-pfc-drawer{
    position:fixed;
    top:18px;
    right:18px;
    bottom:18px;
    z-index:999980;
    width:420px;
    max-width:calc(100vw - 28px);
    pointer-events:none;
    transform:translateX(116%) scale(.96);
    opacity:0;
    transition:transform .42s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
    filter:drop-shadow(var(--twm-pfc-shadow));
}

.twm-pfc-root.is-open .twm-pfc-drawer{
    pointer-events:auto;
    transform:translateX(0) scale(1);
    opacity:1;
}

.twm-pfc-panel{
    height:100%;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border-radius:30px;
    background:linear-gradient(180deg,#fff 0%,var(--twm-pfc-cream) 100%);
    border:1px solid var(--twm-pfc-border);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.95);
}

.twm-pfc-top{
    position:relative;
    padding:26px 24px 24px;
    color:#fff;
    background:radial-gradient(circle at 20% 0%,rgba(208,167,67,.55),transparent 34%), linear-gradient(135deg,#111 0%,#24201A 100%);
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
}

.twm-pfc-eyebrow{
    display:inline-flex;
    color:var(--twm-pfc-gold-light);
    font-size:11px;
    font-weight:900;
    letter-spacing:.16em;
    text-transform:uppercase;
    margin-bottom:8px;
}

.twm-pfc-top h3{
    margin:0;
    color:#fff;
    font-family:"Petrona",Georgia,serif;
    font-size:34px;
    line-height:1.05;
    font-weight:600;
}

.twm-pfc-top p{
    margin:8px 0 0;
    color:rgba(255,255,255,.72);
    font-size:14px;
    line-height:1.5;
    font-weight:500;
}

.twm-pfc-close{
    width:42px;
    height:42px;
    min-width:42px;
    border:1px solid rgba(255,255,255,.22) !important;
    border-radius:999px;
    background:rgba(255,255,255,.08) !important;
    color:#fff !important;
    font-size:28px;
    line-height:38px;
    cursor:pointer;
    transition:background .25s ease, transform .25s ease;
}

.twm-pfc-close:hover{
    background:rgba(208,167,67,.24) !important;
    transform:rotate(90deg);
}

.twm-pfc-body{
    flex:1;
    overflow:auto;
    padding:20px;
    scrollbar-width:thin;
    scrollbar-color:var(--twm-pfc-gold) transparent;
}

.twm-pfc-items{display:grid;gap:14px;}

.twm-pfc-item{
    display:grid;
    grid-template-columns:82px 1fr;
    gap:14px;
    align-items:center;
    padding:13px;
    border-radius:22px;
    background:rgba(255,255,255,.92);
    border:1px solid rgba(208,167,67,.15);
    box-shadow:0 12px 30px rgba(17,17,17,.06);
    animation:twmPfcItemIn .28s ease both;
}

.twm-pfc-item__image{
    width:82px;
    height:82px;
    border-radius:18px;
    overflow:hidden;
    background:#eee;
    border:1px solid rgba(208,167,67,.16);
}

.twm-pfc-item__image img{
    width:100% !important;
    height:100% !important;
    object-fit:cover;
    display:block;
}

.twm-pfc-item__title{
    display:block;
    color:var(--twm-pfc-black) !important;
    text-decoration:none !important;
    font-size:15px;
    line-height:1.28;
    font-weight:900;
    margin-bottom:8px;
}

.twm-pfc-item__line{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    color:var(--twm-pfc-muted);
    font-size:13px;
    font-weight:700;
}

.twm-pfc-item__line strong{
    color:var(--twm-pfc-gold-dark);
    font-size:14px;
    font-weight:900;
}

.twm-pfc-summary{
    margin-top:18px;
    padding:18px;
    border-radius:22px;
    background:#fff;
    border:1px solid rgba(208,167,67,.2);
    box-shadow:0 12px 30px rgba(17,17,17,.05);
}

.twm-pfc-summary__row{
    display:flex;
    justify-content:space-between;
    gap:16px;
    color:var(--twm-pfc-muted);
    font-size:14px;
    font-weight:800;
    padding:8px 0;
}

.twm-pfc-summary__row--total{
    border-top:1px solid rgba(208,167,67,.18);
    margin-top:8px;
    padding-top:16px;
    color:var(--twm-pfc-black);
    font-size:17px;
}

.twm-pfc-summary__row--total strong{
    color:var(--twm-pfc-gold-dark);
    font-size:20px;
    font-weight:900;
}

.twm-pfc-footer{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-top:16px;
}

.twm-pfc-primary,
.twm-pfc-secondary{
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:17px;
    text-decoration:none !important;
    font-family:"DM Sans",system-ui,sans-serif;
    font-size:13px;
    font-weight:900;
    letter-spacing:.07em;
    text-transform:uppercase;
    transition:transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.twm-pfc-primary{
    background:linear-gradient(135deg,var(--twm-pfc-gold),var(--twm-pfc-gold-light) 48%,var(--twm-pfc-gold-dark)) !important;
    color:var(--twm-pfc-black) !important;
    box-shadow:0 16px 34px rgba(208,167,67,.32);
}

.twm-pfc-secondary{
    background:var(--twm-pfc-black) !important;
    color:#fff !important;
    box-shadow:0 14px 30px rgba(17,17,17,.16);
}

.twm-pfc-primary:hover,
.twm-pfc-secondary:hover{
    transform:translateY(-3px);
}

.twm-pfc-empty{
    min-height:420px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:30px 16px;
}

.twm-pfc-empty__icon{
    width:84px;
    height:84px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,rgba(208,167,67,.22),rgba(208,167,67,.08));
    color:var(--twm-pfc-gold-dark);
    font-size:42px;
    margin-bottom:18px;
}

.twm-pfc-empty h4{
    margin:0 0 8px;
    color:var(--twm-pfc-black);
    font-family:"Petrona",Georgia,serif;
    font-size:30px;
    font-weight:600;
}

.twm-pfc-empty p{
    max-width:280px;
    color:var(--twm-pfc-muted);
    margin:0 0 20px;
    font-size:14px;
    line-height:1.55;
}

.twm-pfc-root.is-loading .twm-pfc-body{opacity:.58;pointer-events:none;}

@keyframes twmPfcItemIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

@media (max-width:600px){
    .twm-pfc-float{right:16px;bottom:18px;width:66px;height:66px;}
    .twm-pfc-drawer{top:10px;right:10px;bottom:10px;max-width:calc(100vw - 20px);width:390px;}
    .twm-pfc-panel{border-radius:24px;}
    .twm-pfc-top{padding:22px 20px;}
    .twm-pfc-top h3{font-size:29px;}
    .twm-pfc-body{padding:16px;}
    .twm-pfc-footer{grid-template-columns:1fr;}
}
