:root {
    --bottom-nav-height: 64px;
    --fyp-ui-lift: calc(180px + env(safe-area-inset-bottom));
}




html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body.locked #fypContainer {
    scroll-snap-type: none;
}


#fypContainer {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}


.fyp-slide {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    background: #000;
    color: #fff;
}



body.locked {
    overflow: hidden;
}

/* Background blur */
body.locked #fypContainer {
    filter: blur(6px);
    transform: scale(1.03);
}

/* Overlay */
.fyp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 32px 16px;
    -webkit-overflow-scrolling: touch;
}



/* Card */
.fyp-overlay-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;

    width: 100%;
    max-width: 680px;

    margin: 0;
    text-align: center;

    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}




.fyp-logo {
    width: 120px;
    margin-bottom: 14px;
}

.fyp-overlay-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.fyp-overlay-card p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 20px;
}

/* Buttons */
.fyp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: block;
    padding: 12px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.btn.primary {
    background: #00bed3;
    color: #ffffff;
}

.btn.secondary {
    border: 2px solid #00bed3;
    color: #00bed3;
    background: #ffffff;
}




.category-overlay {
    backdrop-filter: blur(8px);
}

.fyp-overlay-card.large {
    max-width: 680px;
	
    -webkit-overflow-scrolling: touch;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0 20px;
}

@media (min-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cat-tile {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    position: relative;
}

.cat-tile input {
    display: none;
}

.cat-tile span {
    display: block;
}

.cat-tile input:checked + span {
    background: #00bed3;
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
}

.btn.full {
    width: 100%;
}








.fyp-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.fyp-info {
    position: absolute;
    left: 16px;
    bottom: var(--fyp-ui-lift);
    z-index: 3;
    max-width: 70%;
}

.fyp-info h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.fyp-info .price {
    font-weight: 800;
    margin-bottom: 4px;
}

.fyp-info .seller {
    font-size: 13px;
    opacity: 0.9;
}

.fyp-actions {
    position: absolute;
    right: 12px;
    bottom: var(--fyp-ui-lift);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fyp-actions .act {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;

    display: flex;              
    align-items: center;        
    justify-content: center;    

    font-size: 18px;
    line-height: 1;             
    padding: 0;                 

    cursor: pointer;
}



@media (max-width: 640px) {
    .fyp-overlay-card {
        padding: 20px;
    }
	
	.fyp-overlay {
        padding: 24px 12px;
    }

    .category-grid {
        margin-bottom: 16px;
    }
	
}



/* ------------------------------
   AUTH OVERLAY ACTIONS (LOGIN)
-------------------------------- */
.fyp-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

/* Ensure overlay buttons NEVER inherit FYP positioning */
.fyp-auth-actions .btn {
    position: static;
}
