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

:root {
    /* Colors */
    --bg-primary: #050505;
    --bg-secondary: #0D0D0D;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --accent: #CCFF00;
    /* Electric Lime */
    --accent-glow: rgba(204, 255, 0, 0.3);
    --accent-muted: rgba(204, 255, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-heavy: rgba(10, 10, 10, 0.75);
    --border: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-smooth: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Day Mode / Light Mode Override */
body.light-mode {
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --text-primary: #1D1D1F;
    /* Apple standard near-black */
    --text-secondary: #424245;
    /* Darker gray for readability */
    --accent: #2D5A27;
    /* Deep forest green for light mode contrast */
    --glass: rgba(0, 0, 0, 0.05);
    --glass-heavy: rgba(255, 255, 255, 0.95);
    --border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: none;
    /* Hide default for custom cursor */
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease-out;
    transform: translate(-50%, -50%);
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }

    .custom-cursor,
    .custom-cursor-outline {
        display: none !important;
    }
}

/* Typography Utility */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    background: linear-gradient(to bottom, var(--bg-primary), transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-smooth);
}

header.scrolled {
    padding: var(--spacing-sm) 0;
    background: var(--glass-heavy);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition-smooth);
    opacity: 0.7;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 2px;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

.btn-primary {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 255, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(204, 255, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(204, 255, 0, 0);
    }
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Page Tab Spacing Fixes */
.page-section {
    padding-top: 120px;
    min-height: 100vh;
    animation: fadeIn 0.8s ease;
}

#page-shop {
    padding-top: 140px;
}

#page-about {
    padding-top: 140px;
}

/* Ensure the first heading in every section has clear space */
.page-section h1:first-child,
.page-section .section-title:first-child {
    margin-top: 50px;
}

.hero {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3.5rem, 10vw, 7rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(180deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease forwards;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
    margin-top: var(--spacing-md);
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(circle at 70% 50%, rgba(204, 255, 0, 0.1), transparent 70%);
}

.hero-image {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-40%);
    width: 65%;
    height: auto;
    object-fit: cover;
    mix-blend-mode: screen;
    opacity: 0.8;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 0 30px var(--accent-muted));
    will-change: transform;
}

body.light-mode .hero-image {
    mix-blend-mode: multiply;
    opacity: 0.6;
}

/* Sections */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.section-title .line {
    width: 60px;
    height: 2px;
    background-color: var(--accent);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.product-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: var(--spacing-md);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--accent-muted), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-muted);
}

.product-card:hover::before {
    opacity: 1;
}

.product-image-container {
    height: 350px;
    background: #000;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

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

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.product-price {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Category Section */
.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
}

.category-item {
    height: 500px;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
}

.category-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.category-item:hover img {
    opacity: 0.7;
    transform: scale(1.05);
}

.category-content {
    position: relative;
    z-index: 2;
}

.category-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-image {
        display: none;
    }

    .hero-bg {
        width: 100%;
    }
}

/* Modal Specifics */
.modal-image {
    background: radial-gradient(circle at center, var(--bg-secondary), var(--bg-primary));
    padding: 2rem;
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-details {
    padding-left: var(--spacing-lg);
}

/* Page Transitions */
.page-section {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scroll Reveal Placeholder */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    #modal-content {
        grid-template-columns: 1fr;
    }

    .modal-details {
        padding-left: 0;
        margin-top: 2rem;
    }

    /* Floating Widgets - ensure visible on mobile */
    .whatsapp-widget {
        right: 20px;
        bottom: 20px;
        width: 54px;
        height: 54px;
    }

    .theme-toggle {
        right: 20px;
        bottom: 80px;
        width: 48px;
        height: 48px;
    }

    /* Footer - stack on mobile */
    footer .container>div:first-child {
        flex-direction: column;
        gap: 2rem;
    }

    footer h2 {
        font-size: 2rem !important;
    }

    /* Cart sidebar - full width on mobile */
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    /* Trust signals - stack */
    .trust-signals .container>div {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Admin dashboard - stack grids */
    #page-admin .container>div {
        grid-template-columns: 1fr !important;
    }

    #page-admin h1 {
        font-size: 2rem !important;
    }

    /* About page grid */
    #page-about .container div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    #page-about h1 {
        font-size: 2.5rem !important;
    }

    /* Checkout form */
    .checkout-form {
        padding: var(--spacing-md);
    }

    /* General container padding */
    .container {
        padding: 0 1rem;
    }
}

/* Theme Toggle Button - Now a Floating Widget */
.theme-toggle {
    position: fixed;
    bottom: 100px;
    /* Above WhatsApp widget */
    right: 30px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: #000;
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    transition: var(--transition-smooth);
}

.whatsapp-widget:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-widget svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.whatsapp-widget span {
    display: none;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 3000;
    transition: var(--transition-smooth);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.cart-header h3 {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #000;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.cart-item-details p {
    font-size: 0.8rem;
    margin: 0;
}

.btn-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: var(--transition-smooth);
}

.btn-remove:hover {
    color: var(--accent);
}

.cart-footer {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-heading);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2999;
    display: none;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.cart-overlay.open {
    display: block;
}

/* Age Verification Overlay */
.age-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(20px);
}

.age-content {
    max-width: 500px;
    width: 90%;
    margin: 0 1rem;
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .age-content {
        padding: var(--spacing-md);
        width: 85%;
    }

    .age-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .age-content p {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .age-content div {
        flex-direction: column;
        gap: 1rem;
    }

    .age-content .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }
}

.age-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* Checkout Form Styles */
.checkout-form {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
    position: relative;
    animation: fadeInUp 0.8s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}