@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* =========================
   GLOBAL RESET
========================= */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* =========================
   ROOT VARIABLES
========================= */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #1e1b4b;
    --background-color: #fbfbfb;
    --text-main: #111827;
    --text-muted: #6b7280;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.05);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 40px rgba(79, 70, 229, 0.1);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
}

/* =========================
   BASE
========================= */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* =========================
   NAVBAR
========================= */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    padding: 0.5rem 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.badge.bg-primary {
    background-color: var(--primary-color);
    font-weight: 600;
}

/* =========================
   NAVBAR BUTTONS
========================= */
.btn-navbar {
    height: 40px;
    min-width: 100px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.88rem;
    font-weight: 600;

    border-radius: var(--radius-sm);
    white-space: nowrap;

    transition: all 0.3s ease;
}

.navbar .d-flex.align-items-center {
    flex-wrap: nowrap;
}

/* =========================
   BUTTONS
========================= */
.btn-primary {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-outline-white {
    border: 2px solid #fff;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    background: #fff;
    color: var(--text-main);
}

/* Focus Accessibility */
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.3);
    outline-offset: 2px;
}

/* =========================
   HERO SECTION
========================= */
.hero-section {
    position: relative;
    min-height: 80vh;

    display: flex;
    align-items: center;

    width: 100%;
    overflow: hidden;

    color: white;
    background: #000;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;

    width: 150%;
    height: 100%;

    background-image: url('/assets/images/hero-image.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    z-index: 0;

    animation: panHero 20s ease-in-out infinite alternate;

    will-change: transform;
}

@keyframes panHero {
    0% {
        transform: translateX(0) scale(1);
    }

    50% {
        transform: translateX(-15%) scale(1.05);
    }

    100% {
        transform: translateX(-25%) scale(1.08);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.35) 100%);

    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

/* =========================
   PRODUCT CARDS
========================= */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    overflow: hidden;

    transition: all 0.35s ease;
}

.product-card .card-img-top {
    height: 350px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.product-card .price-tag {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-hover);
        border-color: rgba(79, 70, 229, 0.2);
    }

    .product-card:hover .card-img-top {
        transform: scale(1.05);
    }

    .product-card:hover .card-title {
        color: var(--primary-color);
    }
}

/* =========================
   AI SECTION
========================= */
#ai-recommendations .p-5 {
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg,
            #f8faff 0%,
            #ffffff 100%);
}

.recommendation-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    box-shadow: var(--shadow-hover);
}

/* =========================
   CHAT WIDGET
========================= */
#chat-toggle {
    width: 65px;
    height: 65px;

    background-color: var(--primary-color);

    box-shadow: 0 5px 25px rgba(79, 70, 229, 0.4);
}

#chat-window {
    position: fixed;

    right: 20px;
    bottom: 90px;

    width: 400px;
    max-width: 90vw;

    height: 550px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-radius: var(--radius-lg);

    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

#chat-window .card-header,
#chat-window .card-footer {
    width: 100%;
    flex-shrink: 0;
}

/* =========================
   CART
========================= */
.cart-item {
    background: #fff;

    padding: 1.5rem;

    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);

    margin-bottom: 1.5rem;

    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: var(--shadow-soft);
}

.summary-card {
    background: #fff;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);

    padding: 2.5rem;

    position: sticky;
    top: 100px;
}

/* =========================
   FORMS
========================= */
.checkout-form .form-control,
.checkout-form .form-select {
    border-radius: var(--radius-sm);

    padding: 0.8rem 1rem;

    border-color: #e5e7eb;

    background-color: #f9fafb;
}

.checkout-form .form-control:focus,
.checkout-form .form-select:focus {
    border-color: var(--primary-color);
    background-color: white;

    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.checkout-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* =========================
   FOOTER
========================= */
footer {
    background-color: var(--secondary-color);

    padding-top: 6rem;
    padding-bottom: 4rem;

    margin-top: 5rem;
}

footer h5 {
    color: white;

    margin-bottom: 2rem;

    font-size: 1.1rem;

    text-transform: uppercase;
    letter-spacing: 1px;
}

footer p,
footer a {
    color: rgba(255, 255, 255, 0.72);

    font-size: 0.95rem;

    transition: all 0.2s ease;
}

footer a:hover {
    color: white;
    text-decoration: none;
    padding-left: 5px;
}

/* =========================
   SCROLLBAR
========================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* =========================
   UTILITIES
========================= */
.letter-spacing-1 {
    letter-spacing: 1px;
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

.fw-600 {
    font-weight: 600;
}

.extra-small {
    font-size: 0.75rem;
}

.py-responsive {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 991px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-collapse {
        background: white;

        margin-top: 1rem;
        padding: 1rem;

        border-radius: var(--radius-md);

        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    }

    .nav-link {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .display-2 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .hero-section {
        padding: 6rem 0;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .py-responsive {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

@media (max-width: 576px) {
    .hero-content {
        max-width: 100%;
        text-align: center;
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .product-card .card-img-top {
        height: 280px;
    }

    .product-card .card-body {
        padding: 1rem;
    }

    #chat-window {
        width: 320px;
        height: 450px;
    }

    .btn-navbar {
        min-width: 88px;
        height: 38px;
        font-size: 0.82rem;
    }
}

@media (min-width: 992px) {
    .btn-navbar {
        min-width: 110px;
        height: 42px;
    }

    .py-responsive {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}