﻿/* =======================================
   🌍 GLOBAL BASE
======================================= */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "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);
    }

/* =======================================
   🌈 NAVBAR (Frosted)
======================================= */
.navbar-premium {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    padding: 0.8rem 2rem;
    z-index: 1050;
}

    .navbar-premium.scrolled {
        background: rgba(20, 20, 20, 0.85);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }

    /* Nav Links */
    .navbar-premium .nav-link {
        color: rgba(255,255,255,0.9);
        font-weight: 500;
        letter-spacing: 0.3px;
        position: relative;
        transition: color 0.25s ease;
    }

        .navbar-premium .nav-link:hover,
        .navbar-premium .nav-link.active {
            color: #fff;
        }

        .navbar-premium .nav-link::after {
            content: "";
            position: absolute;
            bottom: -3px;
            left: 50%;
            width: 0;
            height: 2px;
            background: #fff;
            transform: translateX(-50%);
            transition: width 0.25s ease;
        }

        .navbar-premium .nav-link:hover::after,
        .navbar-premium .nav-link.active::after {
            width: 50%;
        }

    /* Auth Buttons (Desktop only) */
    .navbar-premium .btn {
        border-radius: 10px;
        font-weight: 600;
        padding: 0.45rem 0.9rem;
        transition: all 0.25s ease;
    }

    .navbar-premium .btn-outline-light {
        border: 2px solid #fff;
        color: #fff;
    }

        .navbar-premium .btn-outline-light:hover {
            background: #fff;
            color: #000;
            box-shadow: 0 0 10px rgba(255,255,255,0.4);
        }

    .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(0.9) contrast(1.05);
    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.5), rgba(0,0,0,0.15));
    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: 2px 2px 8px rgba(0,0,0,0.7);
    }

    .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);
        }

/* Responsive Hero Text */
@media (max-width: 768px) {
    .hero-carousel .carousel-caption {
        top: 60%;
        max-width: 95%;
    }

        .hero-carousel .carousel-caption h1 {
            font-size: 2rem;
        }

        .hero-carousel .carousel-caption p {
            font-size: 1rem;
        }

        .hero-carousel .carousel-caption .btn {
            display: inline-block !important;
            width: auto !important;
            margin: 0 0.3rem !important;
        }
}

/* =======================================
   🏪 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");
}

/* =======================================
   ⚡ PERFORMANCE SAFE HINTS
======================================= */
img, .media-top img, .hero-slide-img {
    backface-visibility: hidden;
    transition: transform 0.35s ease;
}
