/* CSS Variables */
:root {
    --bg-dark: #050508;
    --bg-card: rgba(15, 15, 20, 0.6);
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --accent-primary: #e0e0e0;
    /* Metallic Silver */
    --accent-glow: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.15);
    --font-main: 'Outfit', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom cursor */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    perspective: 1000px;
    /* Base perspective for 3D */
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
    transition: width 0.2s, height 0.2s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-hover .cursor-dot {
    width: 15px;
    height: 15px;
}

.cursor-hover .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Background Shapes (Dynamic 3D depth) */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatShape 20s infinite alternate linear;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #ffffff;
    top: -100px;
    left: -100px;
    opacity: 0.1;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background: #a0a0a0;
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
    opacity: 0.08;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: #cccccc;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.12;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate(100px, 50px) scale(1.2) rotate(180deg);
    }

    100% {
        transform: translate(-50px, 100px) scale(0.9) rotate(360deg);
    }
}


/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(5, 5, 16, 0.6);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    transform-style: preserve-3d;
}

.logo span {
    color: var(--accent-primary);
    display: inline-block;
    transform: translateZ(20px);
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 20px;
    font-weight: 400;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 1.1rem;
    display: inline-block;
}

nav a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Buttons */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    color: #000;
    padding: 15px 35px;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1), inset 0 0 0 0 rgba(255, 255, 255, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

.cta-btn:hover {
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3);
    transform: translateY(-5px) scale(1.05);
}

.cta-btn i {
    margin-left: 10px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cta-btn:hover i {
    transform: translateX(8px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 5% 50px;
    position: relative;
}

/* 3D Grid floor */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 400px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(600px) rotateX(70deg);
    transform-origin: bottom center;
    z-index: -1;
    mask-image: linear-gradient(to top, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 100%);
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
    transform-style: preserve-3d;
}

.glitch-text {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to right, #fff, #ddd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ffffff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #a0a0a0;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 85px, 0);
        transform: skew(0.2deg);
    }

    5% {
        clip: rect(65px, 9999px, 140px, 0);
        transform: skew(0.5deg);
    }

    10% {
        clip: rect(43px, 9999px, 11px, 0);
        transform: skew(0.1deg);
    }

    15% {
        clip: rect(12px, 9999px, 80px, 0);
        transform: skew(0.4deg);
    }

    20% {
        clip: rect(80px, 9999px, 110px, 0);
        transform: skew(0.6deg);
    }

    100% {
        clip: rect(20px, 9999px, 90px, 0);
        transform: skew(0deg);
    }
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    transform: translateZ(30px);
}

.hero-buttons {
    transform: translateZ(50px);
}

.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.floating-img {
    max-width: 130%;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
    animation: float3D 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes float3D {
    0% {
        transform: translateY(0px) rotateX(0) rotateY(0);
    }

    25% {
        transform: translateY(-15px) rotateX(-2deg) rotateY(3deg);
    }

    50% {
        transform: translateY(-25px) rotateX(0) rotateY(0);
    }

    75% {
        transform: translateY(-15px) rotateX(2deg) rotateY(-3deg);
    }

    100% {
        transform: translateY(0px) rotateX(0) rotateY(0);
    }
}

/* Section Title Glowing */
.text-glow {
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.1);
}

/* Products Section 3D Enhancement */
.products {
    padding: 120px 5%;
    position: relative;
    z-index: 2;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: stretch;
}

.product-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8) 0%, rgba(10, 10, 15, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    transform-style: preserve-3d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

/* Pop out elements inside cards */
.product-card .img-container,
.product-card .category,
.product-card h3,
.product-card p,
.product-card .buy-btn {
    transform: translateZ(40px);
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-card .img-container {
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.product-card .img-container img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .img-container img {
    transform: scale(1.1) rotate(5deg) translateY(-10px) translateZ(60px);
}

.buy-btn {
    border: 2px solid var(--accent-primary);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.buy-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-primary);
    z-index: -2;
}

.buy-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all .3s;
    z-index: -1;
}

.product-card:hover .buy-btn {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transform: translateZ(50px) translateY(-2px);
}

.buy-btn:hover::before {
    width: 100%;
}

/* Contact Section */
.contact {
    padding: 100px 5%;
    position: relative;
    border-top: 1px solid var(--glass-border);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    background: var(--bg-card);
    transform-style: preserve-3d;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding: 50px;
    transform: translateZ(30px);
}

.map-container {
    flex: 1;
    min-width: 300px;
    min-height: 400px;
    position: relative;
    transform: translateZ(30px);
}

.hover-3d {
    transition: transform 0.3s ease;
}

.hover-3d:hover {
    transform: translateX(10px) translateZ(40px);
}

.hover-3d i {
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Map 3D Effect */
.map-3d-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 0 16px 16px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.map-3d-wrapper iframe {
    transition: transform 0.5s ease;
    filter: grayscale(80%) contrast(120%) brightness(80%);
}

.contact-container:hover .map-3d-wrapper iframe {
    transform: scale(1.05);
    filter: grayscale(40%) contrast(110%) brightness(90%);
}

.map-overlay {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: #050510;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 5;
    border-top: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 968px) {
    .map-3d-wrapper {
        border-radius: 0 0 16px 16px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 180px;
    }

    .hero::after {
        display: none;
    }

    .hero-content {
        margin-bottom: 50px;
    }
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .navbar {
        flex-direction: column;
        padding: 10px 5%;
    }

    .navbar .logo img {
        height: 80px !important;
        /* Scale down logo on mobile */
        margin-bottom: 10px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 15px;
        gap: 10px;
    }

    nav a {
        margin: 0 10px;
        font-size: 1rem;
    }

    .glitch-text {
        font-size: 3rem;
    }

    .glitch-text::before,
    .glitch-text::after {
        display: none;
        /* Disable glitch effect on mobile for better performance/readability */
    }

    .hero p {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        /* 1 card per row on very small screens */
    }

    .product-card {
        padding: 20px;
    }

    .cta-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}