:root {
    --bg-main: #0a0a0c;
    --bg-secondary: #121216;
    --bg-panel: #1a1a20;
    --text-main: #ffffff;
    --text-muted: #8b8b99;

    --neon-cyan: #00ffcc;
    --neon-cyan-dim: rgba(0, 255, 204, 0.2);
    --neon-pink: #ff0066;

    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;

    --border-glow: 0 0 10px var(--neon-cyan-dim), inset 0 0 10px var(--neon-cyan-dim);
    --transit: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.5;
}

body.modal-open {
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.mt-2 {
    margin-top: 2rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan), 0 0 15px var(--neon-cyan);
}

.neon-text-small {
    color: var(--neon-cyan);
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
    font-weight: 900;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(4px, 9999px, 81px, 0);
    }

    20% {
        clip: rect(62px, 9999px, 16px, 0);
    }

    40% {
        clip: rect(98px, 9999px, 34px, 0);
    }

    60% {
        clip: rect(3px, 9999px, 45px, 0);
    }

    80% {
        clip: rect(51px, 9999px, 86px, 0);
    }

    100% {
        clip: rect(27px, 9999px, 12px, 0);
    }
}

/* UI Boxes */
.box-neon {
    background: var(--bg-panel);
    border: 1px solid var(--neon-cyan);
    box-shadow: var(--border-glow);
    position: relative;
}

.box-neon::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 15px;
    height: 15px;
    border-top: 2px solid var(--neon-cyan);
    border-left: 2px solid var(--neon-cyan);
}

.box-neon::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 15px;
    height: 15px;
    border-bottom: 2px solid var(--neon-cyan);
    border-right: 2px solid var(--neon-cyan);
}

.box-dark {
    background: var(--bg-secondary);
    border: 1px solid #333;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: all var(--transit);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.btn-neon {
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan-dim);
}

.btn-neon:hover:not(:disabled) {
    background: var(--neon-cyan);
    color: var(--bg-main);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.btn-neon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--text-muted);
    color: var(--text-muted);
    box-shadow: none;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color var(--transit);
}

.btn-text:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo .glitch {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
}

.logo .sub {
    font-size: 0.7rem;
    color: var(--neon-cyan);
    letter-spacing: 5px;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 3rem;
    align-items: center;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color var(--transit);
}

nav a:hover {
    color: var(--neon-cyan);
}

.cart-toggle {
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: text-shadow var(--transit);
}

.cart-toggle:hover {
    text-shadow: 0 0 8px var(--neon-cyan);
}

/* Hero */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at right, rgba(0, 255, 204, 0.1) 0%, rgba(10, 10, 12, 0.8) 60%, var(--bg-main) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-panel);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Product Grid */
.shop-section {
    padding: 8rem 5%;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-muted);
}

.header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #333, transparent);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.product-card {
    background: var(--bg-secondary);
    border: 1px solid #222;
    cursor: pointer;
    transition: all var(--transit);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-dim);
    transform: translateY(-5px);
}

.product-image-wrap {
    height: 280px;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-wrap img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s;
}

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

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #222;
}

.product-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.product-info .price {
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.quick-add {
    margin-top: auto;
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 1px solid #444;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-card:hover .quick-add {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.quick-add:hover {
    background: var(--neon-cyan) !important;
    color: var(--bg-main) !important;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transit);
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--neon-cyan);
}

.cart-sidebar.active {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 255, 204, 0.1);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
}

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

.empty-cart-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed #222;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #333;
    background: #000;
}

.item-details {
    flex: 1;
}

.item-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.item-price {
    color: var(--neon-cyan);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.qty-box {
    display: flex;
    border: 1px solid #444;
    width: fit-content;
    align-items: center;
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-main);
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.qty-btn:hover {
    color: var(--neon-cyan);
}

.qty-val {
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 5px;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #333;
    background: var(--bg-secondary);
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transit);
}

.modal-overlay:not(.hidden) {
    opacity: 1;
}

.modal-dialog {
    width: 900px;
    max-width: 90vw;
    height: 600px;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform var(--transit);
    display: flex;
    flex-direction: column;
}

.modal-overlay:not(.hidden) .modal-dialog {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    font-size: 2rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    height: 100%;
    overflow: hidden;
}

.modal-image {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    border-right: 1px solid #333;
}

.modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* Holographic scan line */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--neon-cyan);
    opacity: 0.4;
    box-shadow: 0 0 15px var(--neon-cyan);
    animation: scan 4s infinite linear;
    z-index: 3;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.modal-info {
    padding: 3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.badge-small {
    font-size: 0.7rem;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    display: inline-block;
    padding: 2px 8px;
    margin-bottom: 1rem;
    width: fit-content;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-info .price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    border-top: 1px dashed #333;
    border-bottom: 1px dashed #333;
    padding: 1.5rem 0;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-val {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--neon-cyan);
}

.modal-info .description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Checkout View */
.checkout-container {
    padding: 8rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
}

.checkout-form-panel {
    padding: 3rem;
}

form h3 {
    font-size: 1.1rem;
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--neon-cyan);
    box-shadow: inset 0 0 5px var(--neon-cyan-dim);
}

input::placeholder {
    color: #555;
    font-family: var(--font-heading);
    font-size: 0.8rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.payment-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border: 1px dashed #444;
}

.checkout-summary-panel {
    padding: 3rem;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.checkout-items {
    margin-bottom: 2rem;
    border-bottom: 1px dashed #444;
    padding-bottom: 2rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.checkout-item .qty-title {
    color: var(--text-muted);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.summary-line.total {
    border-top: 1px solid #444;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 255, 204, 0.3);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success */
.success-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.success-glitch-icon {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--text-main);
    text-shadow: -2px 0 var(--neon-pink), 2px 0 var(--neon-cyan);
    font-weight: 900;
    margin-bottom: 1rem;
}

.success-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.success-container p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.order-number {
    font-family: monospace;
    color: var(--neon-cyan) !important;
    font-size: 1.5rem !important;
    margin-bottom: 3rem !important;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 3rem;
    left: 3rem;
    background: var(--bg-panel);
    border-left: 3px solid var(--neon-cyan);
    color: var(--text-main);
    font-family: var(--font-heading);
    padding: 1rem 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    transform: translateX(-150%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.back-link {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-decoration: none;
    z-index: 50;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--neon-cyan);
}

@media (max-width: 900px) {

    .checkout-layout,
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-image {
        display: none;
    }

    nav {
        display: none;
    }

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