/* Premium Digital Marketplace CSS Variables & Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #07090e;
    --bg-secondary: #0c0f17;
    --bg-card: #121622;
    --border-color: #1e2536;
    --border-hover: rgba(99, 102, 241, 0.35);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-primary: #4f46e5;
    --color-primary-glow: rgba(79, 70, 229, 0.4);
    --color-accent: #8b5cf6;
    --color-accent-glow: rgba(139, 92, 246, 0.4);
    
    --color-success: #10b981;
    --color-success-glow: rgba(16, 185, 129, 0.25);
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-danger-glow: rgba(239, 68, 68, 0.2);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --glow-premium: 0 0 20px rgba(79, 70, 229, 0.15);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(0,0,0,0) 70%);
    bottom: 20%;
    left: -100px;
    z-index: -1;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Premium Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Glass Header */
.header {
    background: rgba(7, 9, 14, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.logo span {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--text-muted);
}

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

.btn-outline-success:hover {
    background: var(--color-success);
    color: #07090e;
    box-shadow: 0 0 15px var(--color-success-glow);
}

.btn-white {
    background: #ffffff;
    color: #07090e;
}

.btn-white:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.cart-icon-btn {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cart-icon-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.rating-badge span.star {
    color: var(--color-warning);
}

.hero-title {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    display: block;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #a5b4fc, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Banner Slider/Static */
.banner-wrapper {
    margin-bottom: 60px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    position: relative;
    height: 240px;
}

.banner-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(7, 9, 14, 0.95), rgba(7, 9, 14, 0.4)), url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1200&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.banner-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.banner-content p {
    color: var(--text-secondary);
    max-width: 500px;
    font-size: 15px;
}

/* Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), var(--glow-premium);
}

.card-img-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #0f131f;
    overflow: hidden;
}

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

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

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 8px var(--color-danger-glow);
    z-index: 2;
}

.sold-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
}

.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.original-price {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.sale-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 10px;
}

/* Floating Contact Options */
.floating-contacts {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99;
}

.contact-float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
    color: white;
}

.contact-float-btn:hover {
    transform: scale(1.1) translateY(-2px);
}

.telegram-float {
    background: #0088cc;
}

.whatsapp-float {
    background: #25d366;
}

/* Details Page styling */
.product-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

@media(max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
    }
}

.product-gallery {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
}

.feature-list {
    list-style: none;
    margin: 20px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.feature-item svg {
    color: var(--color-success);
    flex-shrink: 0;
}

.tech-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Cart Page Styling */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 40px 0;
}

@media(max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-items-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #0f131f;
}

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

.cart-item-title {
    font-weight: 600;
    font-size: 16px;
}

.cart-item-price {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 700;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 6px;
}

.cart-item-remove:hover {
    color: var(--color-danger);
}

.cart-summary-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
}

.coupon-section {
    margin: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    flex-grow: 1;
}

.coupon-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    color: white;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

/* Premium Checkout QR simulation */
.checkout-box {
    max-width: 500px;
    margin: 40px auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.upi-id-box {
    background: var(--bg-primary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-container {
    background: white;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    margin: 20px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #07090e;
    font-weight: 600;
}

/* Admin Panel Styling */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

@media(max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
}

.admin-content {
    padding: 40px;
    background: var(--bg-primary);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.admin-nav-item.active {
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--color-primary);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

/* Tables */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.admin-table th, .admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Footer styling */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Notifications UI */
.notify-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--bg-card);
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notify-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.notify-toast.success { border-left-color: var(--color-success); }
.notify-toast.error { border-left-color: var(--color-danger); }
