/* Dark Gradient Theme - Modern & Dynamic & Fully Mobile Responsive */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css');

:root {
    --primary-color: #00fff7;
    --secondary-color: #ff00ff;
    --success-color: #00ff00;
    --danger-color: #ff0000;
    --warning-color: #ffd700;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.95);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #cccccc;
    --font-main: 'Outfit', sans-serif;
    --shadow-glow: 0 0 15px rgba(0, 255, 247, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background: linear-gradient(45deg, #000428, #004e92) fixed;
    /* Fixed gradient for better mobile performance */
    min-height: 100vh;
}

/* Background Animation - Optmized for Mobile */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, transparent 20%, rgba(0, 255, 255, 0.05) 20.1%, transparent 40%);
    /* Reduced opacity for better text contrast */
    animation: rotate 60s linear infinite;
    /* Slower animation for performance */
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.particle {
    position: absolute;
    background: rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) scale(0);
    }

    50% {
        opacity: 0.5;
    }

    10% {
        transform: translateY(90vh) scale(1);
    }

    90% {
        transform: translateY(-10vh) scale(1);
    }
}

/* Base Layout & Typography */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    /* Standard mobile padding */
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 0.5em;
}

/* Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Colors */
.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-muted {
    color: var(--text-muted);
}

.bg-gray-50 {
    background: transparent !important;
}

/* Removing override */

/* Navbar - Mobile Responsive */
.navbar {
    background: rgba(10, 25, 47, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(0, 255, 247, 0.5);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 25, 47, 0.98);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-header {
    text-align: center;
    padding: 3rem 1rem;
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
}

.hero-title {
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
}

/* Grid System - Mobile First */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    /* 1 column mobile */
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 600px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    height: auto;
    /* Changed from 100% to auto to prevent massive stretching */
    color: white;
}

.h-full {
    height: 100%;
}

.bg-transparent {
    background: transparent !important;
}

/* Product Cards */
.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 255, 247, 0.15);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), #00ccff);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 247, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.w-full {
    width: 100%;
}

/* Product Page Layout */
.product-detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.product-detail-left,
.product-detail-right {
    flex: 1;
    min-width: 300px;
    /* Stacks on mobile */
}

@media (max-width: 768px) {
    .product-detail-grid {
        flex-direction: column;
    }

    .product-detail-left,
    .product-detail-right {
        width: 100%;
        min-width: 0;
    }
}

/* Forms */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-family: inherit;
    margin-bottom: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 247, 0.2);
}

/* Mobile Friendly Tables (Card View for Mobile) */
@media (max-width: 768px) {

    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tr {
        border: 1px solid var(--border-color);
        margin-bottom: 1rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        padding: 1rem;
    }

    .table-responsive td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        text-align: right;
    }

    .table-responsive td:before {
        position: absolute;
        top: 0.5rem;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary-color);
        text-align: left;
    }
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 99;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
    text-decoration: none;
}

.float-whatsapp {
    background: #25D366;
}

.float-telegram {
    background: #0088cc;
}

/* Admin Sidebar Overlay for Mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        padding: 1rem;
    }
}

/* Pulse Animation for Pay Button */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}