/*
 * OyunAta - Modern Gaming Marketplace
 * Premium Dark Theme - Clean & Modern
 */

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors - Discord-like indigo */
    --primary: #5865F2;
    --primary-light: #7289DA;
    --primary-dark: #4752C4;
    --primary-glow: rgba(88, 101, 242, 0.15);

    /* Secondary Colors */
    --secondary: #3b82f6;
    --secondary-light: #60a5fa;
    --secondary-dark: #2563eb;

    /* Accent Colors - More muted, professional */
    --accent-pink: #f472b6;
    --accent-orange: #fb923c;
    --accent-green: #22c55e;
    --accent-red: #f87171;
    --accent-yellow: #fbbf24;

    /* Background Colors - Dark with subtle contrast */
    --bg-dark: #121215;
    --bg-darker: #0C0C0E;
    --bg-card: #1A1A1E;
    --bg-card-hover: #222226;
    --bg-input: #16161A;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Border Colors - Pure gray */
    --border-color: #232326;
    --border-light: #2F2F33;

    /* Gradients - Subtle dark */
    --gradient-primary: linear-gradient(135deg, #5865F2 0%, #3B82F6 100%);
    --gradient-dark: linear-gradient(180deg, #141416 0%, #0D0D0F 100%);
    --gradient-card: linear-gradient(145deg, #161618 0%, #101012 100%);
    --gradient-shine: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Spacing */
    --container-width: 1280px;
    --header-height: 70px;
    --category-nav-height: 52px;
}

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Container ========== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
}

.btn-success {
    background: var(--accent-green);
    color: white;
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ========== Cards ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-fast);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-darker);
}

/* ========== Product Card ========== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-fast);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.product-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-darker);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-sale {
    background: var(--accent-red);
    color: white;
}

.badge-new {
    background: var(--accent-green);
    color: white;
}

.badge-stock {
    background: var(--primary);
    color: white;
}

.product-card-body {
    padding: 20px;
}

.product-card-category {
    font-size: 0.8rem;
    color: var(--primary-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: var(--text-primary);
}

.product-card-title a:hover {
    color: var(--primary-light);
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-green);
}

.price-old {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.product-card-footer .btn {
    width: 100%;
}

/* ========== Header Top Bar ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding-top: 10px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 25px;
    padding: 0 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo span {
    color: var(--text-primary);
}

.logo i {
    color: var(--primary);
}

/* Header Search - Larger */
.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.header-search .search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.header-search input {
    width: 100%;
    padding: 12px 50px 12px 45px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.header-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.header-search button:hover {
    background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.header-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.header-icon-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.nav-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.category-nav {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 0;
    right: 0;
    height: var(--category-nav-height);
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
}

.category-nav-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

/* Categories Dropdown Button */
.category-dropdown {
    position: relative;
}

.category-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-dropdown-btn:hover {
    background: var(--primary-dark);
}

.category-dropdown-btn i {
    width: 16px;
    height: 16px;
}

.category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 1002;
}

.category-dropdown:hover .category-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.category-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.category-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.category-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.category-dropdown-item i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.category-dropdown-item .submenu-arrow {
    margin-left: auto;
    color: var(--text-muted);
    width: 14px;
    height: 14px;
}

/* Header Categories (Pinned in navbar) */
.header-categories {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
}

.header-categories::-webkit-scrollbar {
    display: none;
}

.header-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.header-category-item:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.header-category-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}

.header-category-item i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Gradient line under category nav - subtle */
.category-nav-gradient {
    height: 2px;
    background: linear-gradient(90deg,
            var(--primary) 0%,
            var(--secondary) 50%,
            var(--primary) 100%);
    opacity: 0.6;
}

/* ========== Main Content ========== */
.main-content {
    padding-top: calc(var(--header-height) + var(--category-nav-height) + 40px);
    min-height: 100vh;
    padding-bottom: 50px;
}

/* ========== Hero Slider ========== */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    margin-bottom: 50px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.hero-slide-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero-slide-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.hero-nav {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.hero-dot.active {
    background: var(--primary);
    width: 35px;
    border-radius: var(--radius-full);
}

/* ========== Section ========== */
.section {
    padding: 50px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.section-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
}

.section-link:hover {
    gap: 12px;
}

/* ========== Grid ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* ========== Category Card ========== */
.category-card {
    position: relative;
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.category-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: var(--transition-slow);
}

.category-card:hover .category-card-image {
    opacity: 0.5;
    transform: scale(1.1);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.category-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.category-card-title a {
    color: var(--text-primary);
}

.category-card-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* ========== Product Detail ========== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + 30px);
}

.product-main-image {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-info-category {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 20px;
}

.product-info-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.product-info-price .price-current {
    font-size: 2.5rem;
}

.product-info-price .price-old {
    font-size: 1.5rem;
}

.product-info-stock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 25px;
}

.stock-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-green);
}

.stock-indicator.out-of-stock {
    background: var(--accent-red);
}

.stock-indicator.waiting {
    background: var(--accent-yellow);
}

.product-options {
    margin-bottom: 25px;
}

.product-option {
    margin-bottom: 20px;
}

.product-option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-inputs {
    margin-bottom: 25px;
}

.product-actions {
    display: flex;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quantity-btn:hover {
    background: var(--bg-card-hover);
}

.quantity-input {
    width: 60px;
    height: 45px;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: center;
    font-weight: 600;
}

.product-description {
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 50px;
}

.product-description h3 {
    margin-bottom: 20px;
}

.product-description-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========== Cart Page ========== */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
}

.cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-darker);
}

.cart-product-name {
    font-weight: 600;
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-summary-row:last-of-type {
    border-bottom: none;
}

.cart-summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
}

/* ========== Client Panel ========== */
.client-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.client-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 30px);
}

.client-user-info {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 15px;
}

.client-username {
    font-weight: 600;
    margin-bottom: 5px;
}

.client-balance {
    color: var(--accent-green);
    font-size: 1.2rem;
    font-weight: 700;
}

.client-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    margin-bottom: 5px;
}

.client-nav a:hover,
.client-nav a.active {
    background: var(--primary);
    color: white;
}

.client-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== Orders Table ========== */
.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.orders-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(234, 179, 8, 0.2);
    color: var(--accent-yellow);
}

.status-processing {
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.status-waiting {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 15px;
}

.footer-description {
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    padding: 8px 0;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========== Admin Panel ========== */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    padding: 25px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar .logo {
    padding: 0 25px 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.admin-nav {
    padding: 0 15px;
}

.admin-nav-section {
    margin-bottom: 25px;
}

.admin-nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 10px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    margin-bottom: 3px;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary);
    color: white;
}

.admin-nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-content {
    margin-left: 260px;
    padding: 30px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.admin-title {
    font-size: 1.8rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-stat-icon.purple {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
}

.admin-stat-icon.cyan {
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
}

.admin-stat-icon.green {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.admin-stat-icon.orange {
    background: rgba(249, 115, 22, 0.2);
    color: var(--accent-orange);
}

.admin-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.admin-stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-card-body {
    padding: 25px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-darker);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover td {
    background: var(--bg-card-hover);
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.delete:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* ========== Auth Page ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    gap: 5px;
    background: var(--bg-input);
    padding: 5px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

/* ========== Alerts ========== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========== Tabs ========== */
.tabs {
    display: flex;
    gap: 5px;
    background: var(--bg-input);
    padding: 5px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
}

.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--primary);
    color: white;
}

/* ========== Delivery Status ========== */
.delivery-content {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: monospace;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.waiting-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid var(--accent-orange);
    border-radius: var(--radius-md);
    color: var(--accent-orange);
}

.waiting-message .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-orange);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .client-layout {
        grid-template-columns: 1fr;
    }

    .client-sidebar {
        position: relative;
        top: 0;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .nav-menu {
        display: none;
    }

    .header-search input {
        width: 150px;
    }

    .hero-slider {
        height: 350px;
    }

    .hero-slide-content {
        padding: 30px;
    }

    .hero-slide-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .cart-table {
        display: block;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        padding: 20px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 15px;
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .auth-card {
        padding: 25px;
    }
}

/* =========================================
   HEADER & SCROLLBAR STYLES (Moved from HTML)
   ========================================= */

.bg-custom-box {
    background-color: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .bg-custom-box {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

.bg-custom-input {
    background-color: rgba(28, 28, 28, 0.5);
    border-color: #2a2a2a;
}

/* Hide scrollbar but keep functionality */
.horizontal-scroll {
    overflow-y: hidden !important;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    cursor: grab;
    /* Show grab cursor */
    user-select: none;
    /* Prevent text selection while dragging */
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

.horizontal-scroll:active {
    cursor: grabbing;
}

animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .client-layout {
        grid-template-columns: 1fr;
    }

    .client-sidebar {
        position: relative;
        top: 0;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .nav-menu {
        display: none;
    }

    .header-search input {
        width: 150px;
    }

    .hero-slider {
        height: 350px;
    }

    .hero-slide-content {
        padding: 30px;
    }

    .hero-slide-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .cart-table {
        display: block;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        padding: 20px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 15px;
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .auth-card {
        padding: 25px;
    }
}

/* =========================================
   HEADER & SCROLLBAR STYLES (Moved from HTML)
   ========================================= */

.bg-custom-box {
    background-color: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .bg-custom-box {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

.bg-custom-input {
    background-color: rgba(28, 28, 28, 0.5);
    border-color: #2a2a2a;
}

/* Hide scrollbar but keep functionality */
.horizontal-scroll {
    overflow-y: hidden !important;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    cursor: grab;
    /* Show grab cursor */
    user-select: none;
    /* Prevent text selection while dragging */
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

.horizontal-scroll:active {
    cursor: grabbing;
}

[data-theme="light"] .bg-custom-input {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}