﻿/* =======================================
   🌍 GLOBAL BASE
======================================= */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
    overflow-x: hidden;
}

    /* Layout: home vs inner pages */
    body.home-page main.home-main {
        padding-top: 0;
        min-height: 100vh;
    }

    body.inner-page main.inner-main {
        padding-top: 80px;
        min-height: calc(100vh - 80px);
    }

/* =======================================
   🍎 APPLE-STYLE PREMIUM NAVBAR (FINAL)
======================================= */
.navbar-premium {
    background: rgba(235, 235, 240, 0.88); /* Apple light glass */
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.12);
    padding: 0.8rem 2rem;
    z-index: 1050;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

    /* Dark navbar on scroll */
    .navbar-premium.scrolled {
        background: rgba(20, 20, 20, 0.85);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }

    /* ======================
   NAV LINKS – LIGHT STATE
====================== */
    .navbar-premium .nav-link {
        color: #1d1d1f; /* Apple dark text */
        font-weight: 500;
        position: relative;
        transition: color 0.25s ease;
    }

        .navbar-premium .nav-link:hover,
        .navbar-premium .nav-link.active {
            color: #000;
        }

        /* Underline indicator */
        .navbar-premium .nav-link::after {
            content: "";
            position: absolute;
            bottom: -4px;
            left: 50%;
            width: 0;
            height: 2px;
            background: #0a84ff; /* Apple blue */
            transform: translateX(-50%);
            transition: width 0.25s ease;
        }

        .navbar-premium .nav-link:hover::after,
        .navbar-premium .nav-link.active::after {
            width: 50%;
        }

    /* ======================
   NAV LINKS – SCROLLED
====================== */
    .navbar-premium.scrolled .nav-link {
        color: rgba(255,255,255,0.85);
    }

        .navbar-premium.scrolled .nav-link:hover,
        .navbar-premium.scrolled .nav-link.active {
            color: #ffffff;
        }

        .navbar-premium.scrolled .nav-link::after {
            background: #5ac8fa;
        }

    /* ======================
   AUTH BUTTONS
====================== */
    .navbar-premium .btn {
        border-radius: 10px;
        font-weight: 600;
        padding: 0.45rem 0.9rem;
        transition: all 0.25s ease;
    }

    /* Login button – light navbar */
    .navbar-premium .btn-outline-light {
        border: 2px solid #1d1d1f;
        color: #1d1d1f;
    }

        .navbar-premium .btn-outline-light:hover {
            background: #1d1d1f;
            color: #ffffff;
        }

    /* Login button – dark navbar */
    .navbar-premium.scrolled .btn-outline-light {
        border-color: #ffffff;
        color: #ffffff;
    }

        .navbar-premium.scrolled .btn-outline-light:hover {
            background: #ffffff;
            color: #000000;
        }

    /* Sign up button */
    .navbar-premium .btn-warning {
        background: #ffbe0b;
        color: #000;
        border: none;
    }

        .navbar-premium .btn-warning:hover {
            background: #ffd23f;
            box-shadow: 0 0 10px rgba(255,215,0,0.3);
        }


/* =======================================
   📱 Offcanvas Fix: Full Height & No Scrollbar
======================================= */
.offcanvas {
    height: 100vh !important;
    overflow-y: auto !important;
    transition: transform 0.35s ease-in-out, opacity 0.25s ease;
}

    .offcanvas.show {
        transform: none !important;
        opacity: 1;
    }

.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* Disable body scroll when offcanvas open */
body.offcanvas-open {
    overflow: hidden !important;
}


/* =======================================
   🖼️ HERO SLIDER (Smooth Overlay)
======================================= */
.hero-carousel, .hero-carousel .carousel-inner, .hero-carousel .carousel-item {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slide-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    filter: brightness(1.05) contrast(1.1);
    transition: transform 0.6s ease;
}

.hero-carousel .carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0,0,0,0.28), rgba(0,0,0,0.12) );
    z-index: 1;
    pointer-events: none;
}

.hero-carousel .carousel-caption {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    max-width: 900px;
}

    .hero-carousel .carousel-caption h1 {
        font-size: 3rem;
        font-weight: 700;
        color: #fff;
        text-shadow: 0 6px 20px rgba(0,0,0,0.55);
    }

    .hero-carousel .carousel-caption p {
        color: #f1f1f1;
        font-size: 1.2rem;
        margin-bottom: 1.8rem;
        text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
    }

    .hero-carousel .carousel-caption .btn {
        font-weight: 600;
        padding: 0.7rem 1.4rem;
        border-radius: 8px;
        border: 2px solid #fff;
        margin: 0 0.4rem;
        transition: all 0.25s ease;
    }

        .hero-carousel .carousel-caption .btn:hover {
            box-shadow: 0 0 10px rgba(255,255,255,0.7);
            transform: scale(1.05);
        }

/* =======================================
   📱 MOBILE HERO FIX (TEXT + BUTTONS)
======================================= */
@media (max-width: 768px) {

    /* Caption stays absolute – DO NOT flex */
    .hero-carousel .carousel-caption {
        top: 58%;
        max-width: 95%;
        text-align: center;
    }

        /* Title clamp */
        .hero-carousel .carousel-caption h1 {
            font-size: 1.8rem;
            line-height: 1.15;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Description clamp */
        .hero-carousel .carousel-caption p {
            font-size: 0.95rem;
            line-height: 1.35;
            margin-bottom: 14px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    /* Button row – side by side */
    .hero-carousel .hero-btn-row {
        display: flex;
        justify-content: center;
        gap: 12px;
    }

        .hero-carousel .hero-btn-row .btn {
            min-width: 130px;
            padding: 0.6rem 1.2rem;
            white-space: nowrap;
        }
}



/* =======================================
   🏪 PRODUCT & CATEGORY CARDS
======================================= */
.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    }

.media-top {
    position: relative;
    height: 260px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .media-top img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.35s ease;
    }

.product-card:hover img {
    transform: scale(1.05);
}

.media-top::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0));
    pointer-events: none;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.card-footer {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    padding: 0.8rem;
}

    .card-footer .btn {
        border-radius: 6px;
        transition: all 0.25s ease;
        margin: 0 0.3rem;
    }

        .card-footer .btn:hover {
            box-shadow: 0 0 10px rgba(0,140,255,0.3);
            transform: scale(1.05);
        }

/* Category Card */
.category-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    color: #fff;
    height: 220px;
    background: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .category-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

    .category-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0.1));
        opacity: 0.6;
        z-index: 1;
        transition: opacity 0.3s ease;
    }

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    }

        .category-card:hover img {
            transform: scale(1.06);
        }

        .category-card:hover::before {
            opacity: 0.8;
        }

/* =======================================
   📱 MOBILE LAYOUT OPTIMIZATION
======================================= */
@media (max-width: 768px) {
    .col-lg-4, .col-md-6, .col-sm-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .product-card, .category-card {
        width: 94%;
        margin: 0 auto 1.5rem auto;
        border-radius: 12px;
    }

    .card-footer .btn {
        width: 90%;
        margin: 0.5rem auto;
    }
}
/* ===== Mobile Menu Visibility Fix ===== */
#mobileMenu .nav-link {
    color: #ffffff !important;
    font-weight: 500;
}

    #mobileMenu .nav-link:hover {
        color: #ffd23f !important;
    }

/* ===== Show Mobile Toggler Icon ===== */
.navbar-toggler-icon {
    width: 1.5rem;
    height: 1.5rem;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.95)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
/* Fix dropdown click being blocked */
.dropdown-menu {
    position: absolute;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

.dropdown-item {
    pointer-events: auto !important;
}

/* =======================================
   ⚡ PERFORMANCE SAFE HINTS
======================================= */
img, .media-top img, .hero-slide-img {
    backface-visibility: hidden;
    transition: transform 0.35s ease;
}
/* =======================================
   🎞 SMOOTH SLIDING FEEL (NOT FADE)
======================================= */
.hero-carousel .carousel-item {
    transition: transform 0.9s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
}

/* =======================================
   📱 HERO SLIDER – BREAK OUT OF CENTER
   (Only slider, all devices)
======================================= */
.hero-carousel {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
    /* =======================================
   🎞 HERO SLIDER – UNLOCK FULL WIDTH
   (All devices)
======================================= */
    .hero-carousel .hero-caption {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 1200px;
        width: calc(100% - 2rem);
        padding-left: 1rem;
        padding-right: 1rem;
    }
/* =======================================
   📱 MOBILE HERO TEXT – CONTROLLED WIDTH
======================================= */
@media (max-width: 768px) {

    /* Limit text width to center area */
    .hero-carousel .hero-caption h1,
    .hero-carousel .hero-caption p {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}
/* =======================================
   🍎 NAV ATTENTION LINKS (Apple Style)
======================================= */
.navbar .nav-link.nav-attention {
    font-weight: 600;
    color: #ffffff;
    position: relative;
    opacity: 0.95;
}

    /* subtle glow underline */
    .navbar .nav-link.nav-attention::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -6px;
        width: 28px;
        height: 3px;
        background: linear-gradient(90deg, #0a84ff, #5ac8fa);
        transform: translateX(-50%);
        border-radius: 4px;
        opacity: 0.85;
    }

    /* hover – premium lift */
    .navbar .nav-link.nav-attention:hover {
        opacity: 1;
    }

/* Login background image (async, non-blocking) */
.login-bg {
    position: fixed;
    inset: 0;
    background: url('/images/login-bg.jpg') center / cover no-repeat;
    filter: blur(3px) brightness(0.7);
    z-index: 0;
}

/* Ensure login card stays above */
.card {
    z-index: 1;
}


