:root{
    --main:#00A8E8;
    --main-rgb:0,168,232;
    --main-hover:#008fd1;
    --main-glow:rgba(var(--main-rgb),.26);
    --main-soft:rgba(var(--main-rgb),.10);
    --carvana-navy:#062b49;
    --carvana-ink:#001f3f;
    --carvana-blue:#00A8E8;
    --carvana-yellow:#ffd23f;
    --page:#f4f8fc;
    --card:#ffffff;
    --line:#d8e5ef;
    --text:#082847;
    --muted:#66788a;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
    overflow-y:scroll;
    scrollbar-gutter:stable;
}

body{
    min-height:100vh;
    overflow-x:hidden;
    background:
        radial-gradient(circle at top left, rgba(var(--main-rgb),.11), transparent 28%),
        linear-gradient(180deg,#f8fbff 0%,#eef5fb 52%,#f7fbff 100%);
    color:var(--text);
    font-family:Arial, Helvetica, sans-serif;
}

button,
select,
input,
textarea{
    font-family:inherit;
}

button{
    cursor:pointer;
}

/* ================================
   GLOBAL TOP NAV DEFAULT
   Template CSS can override this.
================================ */

.TopNav{
    height:84px;
    padding:0 42px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:28px;
    background:rgba(255,255,255,.94);
    border-bottom:1px solid rgba(6,43,73,.10);
    box-shadow:0 12px 34px rgba(4,34,58,.08);
    position:sticky;
    top:0;
    z-index:999;
    backdrop-filter:blur(18px);
}

.LogoBox{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:max-content;
}

.LogoImg{
    width:54px;
    height:54px;
    object-fit:contain;
    flex-shrink:0;
}

.LogoBox h1{
    font-size:26px;
    letter-spacing:1px;
    line-height:24px;
    color:var(--carvana-navy);
    font-weight:900;
}

.LogoBox span{
    font-size:10px;
    letter-spacing:5px;
    color:var(--main);
    font-weight:900;
}

.NavLinks{
    display:flex;
    align-items:center;
    gap:8px;
    background:#f3f8fd;
    border:1px solid #dbe8f2;
    border-radius:999px;
    padding:6px;
}

.NavLinks a{
    color:#31516b;
    text-decoration:none;
    text-transform:uppercase;
    font-size:12px;
    font-weight:900;
    letter-spacing:.06em;
    padding:12px 16px;
    border-radius:999px;
    transition:.18s ease;
    cursor:pointer;
}

.NavLinks a.active,
.NavLinks a:hover{
    background:#fff;
    color:var(--carvana-navy);
    box-shadow:0 8px 18px rgba(6,43,73,.08);
}

.NavLinks a.active::after{
    display:none;
}

@media (min-width:901px){
    .TopNav{
        position:sticky;
    }

    .LogoBox,
    #HeaderActionBtn{
        z-index:2;
    }

    .LogoBox{
        position:relative;
    }

    #HeaderActionBtn{
        position:absolute;
        right:42px;
        top:0;
        bottom:0;
        height:48px;
        min-height:48px;
        margin:auto 0;
        z-index:2;
    }

    .NavLinks{
        position:absolute;
        left:50%;
        top:50%;
        transform:translate(-50%,-50%);
        z-index:1;
    }
}

/* ================================
   BUTTONS
================================ */

.NavBtn,
.PrimaryBtn{
    -webkit-appearance:none;
    appearance:none;
    min-height:48px;
    border:none;
    border-radius:999px;
    padding:0 24px;
    background:linear-gradient(135deg,var(--main),var(--main-hover));
    background:linear-gradient(135deg,var(--main),color-mix(in srgb,var(--main) 78%,#005c93));
    color:#fff;
    font-weight:900;
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    box-shadow:0 16px 34px rgba(var(--main-rgb),.22);
    transition:.18s ease;
}

.NavBtn:hover,
.PrimaryBtn:hover{
    transform:translateY(-2px);
    box-shadow:0 22px 42px rgba(var(--main-rgb),.28);
    filter:saturate(1.08);
}

.NavBtn:active,
.PrimaryBtn:active{
    transform:scale(.98);
}

.GhostBtn{
    min-height:48px;
    border:1px solid rgba(var(--main-rgb),.35);
    border-radius:999px;
    padding:0 24px;
    background:#fff;
    color:var(--main);
    font-weight:900;
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
    box-shadow:0 12px 26px rgba(6,43,73,.07);
    transition:.18s ease;
}

.GhostBtn:hover{
    transform:translateY(-2px);
    border-color:var(--main);
    box-shadow:0 18px 36px rgba(var(--main-rgb),.18);
}

/* ================================
   GLOBAL ICON SYSTEM FIX
================================ */

.Icon{
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
}

.Icon img,
.CarIcon{
    display:block;
    filter:none;
    opacity:1;
    object-fit:contain;
}

.ThemeIconMask{
    display:block !important;
    flex-shrink:0;
    background:var(--main);
    opacity:1 !important;

    -webkit-mask-image:var(--icon);
    mask-image:var(--icon);

    -webkit-mask-position:center;
    mask-position:center;

    -webkit-mask-size:contain;
    mask-size:contain;

    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
}

.Icon .ThemeIconMask,
.StatCard .ThemeIconMask{
    width:80px;
    height:80px;
    min-width:80px;
    min-height:80px;
}

.ServiceCard .ThemeIconMask,
.ThemeIconMask.CarIcon{
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
}

/* fallback sizes if a template does not define them */
.Icon img{
    width:80px;
    height:80px;
}

.CarIcon{
    width:40px;
    height:40px;
}

/* ================================
   PAGE LOADING
================================ */

.PageLoading{
    opacity:0;
    transform:translateY(0);
}

#App{
    opacity:1;
    transform:translateY(0);
    transition:opacity .16s ease, transform .16s ease;
    will-change:opacity, transform;
}

#App.IsTransitioning{
    pointer-events:none;
}

#App.PageTransitionOut{
    opacity:0;
    transform:translateY(0);
}

#App.PageTransitionIn{
    opacity:1;
    transform:translateY(0);
}

body.SiteLeaving{
    opacity:0;
    transition:opacity .14s ease;
}

@media (prefers-reduced-motion: reduce){
    html{
        scroll-behavior:auto;
    }

    #App,
    .AdminContent{
        transition:none !important;
        transform:none !important;
    }
}

/* ================================
   FORM OUTPUT
================================ */

.FormOutput{
    display:none;
    margin-top:16px;
    padding:16px;
    max-height:260px;
    overflow:auto;
    border:1px solid rgba(var(--main-rgb),.22);
    background:rgba(var(--main-rgb),.06);
    color:var(--text);
    white-space:pre-wrap;
    font-size:13px;
    line-height:1.55;
    border-radius:16px;
}

/* ================================
   MOBILE DEFAULTS
================================ */

@media(max-width:900px){
    .TopNav{
        position:relative;
        height:auto;
        min-height:120px;
        display:grid;
        grid-template-columns:1fr auto;
        grid-template-rows:auto auto;
        padding:18px 20px;
        row-gap:18px;
    }

    #HeaderActionBtn{
        position:absolute;
        top:23px;
        right:20px;
        height:42px;
        padding:0 16px;
        font-size:11px;
        width:auto;
        z-index:20;
    }

    .LogoBox{
        grid-column:1/2;
        width:max-content;
    }

    .LogoImg{
        width:52px;
        height:52px;
    }

    .LogoBox h1{
        font-size:24px;
    }

    .LogoBox span{
        font-size:10px;
        letter-spacing:5px;
    }

    .NavLinks{
        grid-column:1/3;
        width:100%;
        justify-content:flex-start;
        overflow-x:auto;
        overflow-y:hidden;
        scrollbar-width:none;
        gap:6px;
    }

    .NavLinks::-webkit-scrollbar{
        display:none;
    }

    .NavLinks a{
        font-size:11px;
        white-space:nowrap;
        flex-shrink:0;
        padding:11px 14px;
    }

    .HeroButtons,
    .HeroBtns{
        display:flex!important;
        flex-direction:row!important;
        justify-content:center;
        align-items:center;
        gap:12px;
        width:100%;
    }

    .HeroButtons>*,
    .HeroBtns>*{
        flex:1;
        max-width:190px;
        white-space:nowrap;
    }

    .CarouselCard,
    .CarCard{
        min-width:100%!important;
        max-width:100%!important;
    }

    .VehicleGallery img{
        aspect-ratio:16/9!important;
        height:auto!important;
        object-fit:cover;
    }

    .Icon .ThemeIconMask,
    .StatCard .ThemeIconMask,
    .Icon img{
        width:62px;
        height:62px;
        min-width:62px;
        min-height:62px;
    }
}



/* =========================================================
   UNIVERSAL FORM TOASTS
========================================================= */
.PimzuToastStack{
    position:fixed;
    top:22px;
    right:22px;
    width:min(380px, calc(100vw - 28px));
    display:grid;
    gap:12px;
    z-index:9999999;
    pointer-events:none;
}

.PimzuToast{
    pointer-events:auto;
    display:flex;
    align-items:center;
    gap:13px;
    padding:15px 16px;
    border-radius:18px;
    background:#fff;
    border:1px solid rgba(var(--main-rgb), .28);
    box-shadow:0 22px 55px rgba(6,43,73,.18), 0 0 0 5px rgba(var(--main-rgb),.06);
    color:#08243c;
    opacity:0;
    transform:translateY(-10px) scale(.96);
    transition:opacity .22s ease, transform .22s ease;
}

.PimzuToast.Show{
    opacity:1;
    transform:translateY(0) scale(1);
}

.PimzuToastIcon{
    width:40px;
    height:40px;
    min-width:40px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:var(--main);
    color:#fff;
    font-size:21px;
    font-weight:1000;
    box-shadow:0 12px 24px rgba(var(--main-rgb), .24);
}

.PimzuToastText{
    min-width:0;
    flex:1;
}

.PimzuToastText h4{
    margin:0;
    color:#08243c;
    font-size:15px;
    line-height:1.15;
    font-weight:1000;
}

.PimzuToastText p{
    margin:4px 0 0;
    color:#667b8e;
    font-size:12px;
    line-height:1.35;
    font-weight:750;
}

.PimzuToastClose{
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:rgba(8,36,60,.06);
    color:#61798d;
    cursor:pointer;
    font-size:19px;
    line-height:1;
    display:grid;
    place-items:center;
}

.PimzuToastClose:hover{
    background:rgba(var(--main-rgb), .12);
    color:var(--main);
}

body.Template-luxury-dark .PimzuToast{
    background:linear-gradient(180deg,rgba(18,18,18,.98),rgba(6,6,6,.98));
    border:1px solid rgba(var(--main-rgb), .44);
    box-shadow:0 24px 70px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.05), 0 0 30px rgba(var(--main-rgb),.16);
    color:#fff;
}

body.Template-luxury-dark .PimzuToastIcon{
    background:var(--main);
    color:#fff;
    box-shadow:0 0 26px rgba(var(--main-rgb), .34);
}

body.Template-luxury-dark .PimzuToastText h4{
    color:#fff;
}

body.Template-luxury-dark .PimzuToastText p{
    color:rgba(255,255,255,.62);
}

body.Template-luxury-dark .PimzuToastClose{
    background:rgba(255,255,255,.06);
    color:rgba(255,255,255,.62);
}

body.Template-luxury-dark .PimzuToastClose:hover{
    background:rgba(var(--main-rgb), .18);
    color:#fff;
}

@media(max-width:650px){
    .PimzuToastStack{
        top:14px;
        left:14px;
        right:14px;
        width:auto;
    }

    .PimzuToast{
        border-radius:16px;
        padding:14px;
    }
}

/* =========================================================
   ADMIN FULLSCREEN MODE
   Kept exactly for the admin portal behavior
========================================================= */

body.AdminMode{
    background:#050b10;
    overflow:hidden;
}

body.AdminMode .TopNav{
    display:none !important;
}

body.AdminMode #App{
    width:100%;
    height:100vh;
    overflow:hidden;
}

body.AdminMode .AdminPortal,
body.AdminMode .AdminApp{
    width:100%;
    height:100vh;
    min-height:100vh;
    overflow:hidden;
}

body.AdminMode .AdminSidebar{
    height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
}

body.AdminMode .AdminMain{
    height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    padding-bottom:60px;
}

body.AdminMode .AdminContent{
    min-height:0;
    padding-bottom:60px;
}

body.AdminMode .BrandingAdminPage,
body.AdminMode .MessagesAdminPage,
body.AdminMode .BookingAdminPage,
body.AdminMode .InventoryAdminCard,
body.AdminMode .AdminCard{
    max-height:none;
}
