@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Extreme dark palette */
    --bg-base: #030305;
    --bg-glass: rgba(15, 15, 20, 0.4);
    --bg-glass-heavy: rgba(10, 10, 15, 0.7);
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.04);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;

    /* Accents (Neon Cyber style) */
    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --accent-magenta: #ff007f;
    --accent-purple: #7b2cbf;

    /* Gradients */
    --text-gradient: linear-gradient(to right, #00f2fe, #4facfe, #ff007f);
    --btn-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --btn-gradient-hover: linear-gradient(135deg, #4facfe 0%, #ff007f 100%);

    /* Geometry */
    --border-glass: 1px solid rgba(255, 255, 255, 0.06);
    --border-glass-light: 1px solid rgba(255, 255, 255, 0.15);

    /* Fonts */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Light Mode Variations --- */
body.light-mode {
    --bg-base: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-glass-heavy: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(255, 255, 255, 1);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;

    --border-glass: 1px solid rgba(0, 0, 0, 0.1);
    --border-glass-light: 1px solid rgba(0, 0, 0, 0.05);

    /* Mute ambient shadows for light mode so they aren't overwhelming */
    --accent-cyan: #0ea5e9;
    --accent-blue: #3b82f6;
}

body.light-mode .ambient-blob {
    opacity: 0.15;
}

body.light-mode .card::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

body.light-mode .icon-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.light-mode .pill {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-secondary);
}

body.light-mode .pill.active {
    background: var(--text-primary);
    color: var(--bg-base);
}

body.light-mode .card-icon {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .drawer {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .drawer-footer {
    background: rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Ambient Lights --- */
.ambient-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    animation: drift 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 15%) scale(1.1);
    }
}

/* --- Navigation --- */
.floating-nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    height: 70px;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-bottom: var(--border-glass-light);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-logo i {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-glass);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* --- Main Structure --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 40px 60px;
    /* Space for sticky nav */
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 80px 0;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero h1 span {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 5s linear infinite;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* --- Category Pills --- */
.categories-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin-bottom: 40px;
    scrollbar-width: none;
    /* Firefox */
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
}

/* Chrome */

.pill {
    padding: 12px 24px;
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.pill.active {
    background: var(--text-primary);
    color: var(--bg-base);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* --- Products Grid --- */
.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--accent-cyan);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* --- Premium Product Card --- */
.card {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

/* Inner glow ring for cards */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    /* border thickness */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 242, 254, 0.05);
}

body.light-mode .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 242, 254, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-glass);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-primary);
}

.card-delivery {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.card-delivery.account {
    background: rgba(255, 0, 127, 0.1);
    color: var(--accent-magenta);
    border: 1px solid rgba(255, 0, 127, 0.2);
}

.card-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    min-height: 52px;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.old-price {
    font-size: 13px;
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.current-price {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.buy-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: none;
    background: var(--text-primary);
    color: var(--bg-base);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.card:hover .buy-btn {
    background: var(--btn-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
    width: 100px;
    /* Expand on hover */
}

.buy-btn::after {
    content: 'Buy';
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s;
    margin-left: 0;
}

.card:hover .buy-btn::after {
    max-width: 50px;
    opacity: 1;
    margin-left: 8px;
}

.buy-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.stock {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Empty State */
.empty {
    text-align: center;
    padding: 100px 20px;
    background: var(--bg-card);
    border-radius: 24px;
    border: var(--border-glass);
}

.empty i {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

/* --- Side Drawer Checkout (Modal) --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: var(--border-glass);
    z-index: 1000;
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

.drawer-overlay.active .drawer {
    right: 0;
}

.drawer-header {
    padding: 32px;
    border-bottom: var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h2 {
    font-family: var(--font-display);
    font-size: 24px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.drawer-body {
    padding: 32px;
    flex-grow: 1;
    overflow-y: auto;
}

.order-box {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.order-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.order-details h4 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 4px;
}

.order-price {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-top: 8px;
}

.payment-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-direction: column;
}

.method {
    padding: 16px;
    border-radius: 12px;
    border: var(--border-glass);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.method.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.05);
}

.drawer-footer {
    padding: 32px;
    border-top: var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.total-row span {
    color: var(--text-secondary);
}

.total-row strong {
    font-family: var(--font-display);
    font-size: 32px;
}

.btn-large {
    width: 100%;
    padding: 18px;
    border-radius: 100px;
    border: none;
    background: var(--btn-gradient);
    background-size: 200% auto;
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: 0.4s;
    box-shadow: 0 10px 20px rgba(0, 242, 254, 0.2);
}

.btn-large:hover:not(:disabled) {
    background-position: right center;
    box-shadow: 0 15px 30px rgba(255, 0, 127, 0.3);
    transform: translateY(-2px);
}

.btn-large:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Delivery Key Success Block */
.key-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--accent-cyan);
    padding: 24px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 20px;
    color: var(--accent-cyan);
    text-align: center;
    letter-spacing: 2px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .floating-nav {
        top: 12px;
        width: 95%;
        height: 60px;
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .nav-links {
        display: none;
    }

    .container {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    #hugeSearchInput {
        font-size: 18px;
    }
}

/* --- Premium Search Modal --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

body.light-mode .search-overlay {
    background: rgba(255, 255, 255, 0.7);
}

.search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.search-container {
    width: 90%;
    max-width: 800px;
    transform: translateY(-40px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.active .search-container {
    transform: translateY(0);
}

.large-search-form {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-glass-heavy);
    border: var(--border-glass-light);
    border-radius: 20px;
    padding: 10px 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

body.light-mode .large-search-form {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.search-icon-large {
    font-size: 24px;
    color: var(--accent-cyan);
    margin-right: 20px;
}

#hugeSearchInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    outline: none;
    padding: 16px 0;
}

#hugeSearchInput::placeholder {
    color: var(--text-secondary);
}

.close-search {
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-glass);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
}

.close-search:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.search-hints {
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-hint-tag {
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-glass-light);
    padding: 6px 16px;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: var(--text-secondary);
}

.search-hint-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}