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

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --secondary: #06B6D4;
    --accent: #F97316;
    --accent-light: #FB923C;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --light-bg: #F0F9FF;
    --white: #FFFFFF;
    --text-dark: #0F172A;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 10px 40px rgba(37, 99, 235, 0.2);
    --gradient: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --gradient-accent: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.logo-icon { font-size: 2rem; }

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

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav a:hover, .nav a.active {
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

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

.cart-icon {
    position: relative;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    min-width: 22px;
    text-align: center;
}

.btn-admin {
    background: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #2563EB 0%, #06B6D4 50%, #F97316 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '🖥️';
    position: absolute;
    font-size: 20rem;
    opacity: 0.1;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-secondary { background: var(--primary); color: white; }
.btn-secondary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-light); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.category-icon {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.category-count {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--light-bg);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #DBEAFE 0%, #F0F9FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

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

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.product-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
    text-decoration: none;
}

.product-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Filter */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
    outline: none;
    transition: border-color 0.3s;
    background: white;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary);
}

/* Product Detail */
.product-detail {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-detail-image {
    background: linear-gradient(135deg, #DBEAFE 0%, #F0F9FF 100%);
    border-radius: 20px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10rem;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.product-detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.product-detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item { display: flex; flex-direction: column; }
.meta-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.product-detail-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Cart */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.cart-summary {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
}

/* Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.checkout-form {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.checkout-form h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info-card {
    background: var(--gradient);
    color: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.contact-info-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-item .icon {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.8rem;
    border-radius: 12px;
}

.contact-info-item h4 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.contact-info-item p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.contact-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.contact-form-card h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Footer */
.footer {
    background: var(--gradient);
    color: white;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    margin-bottom: 1rem;
    color: var(--accent-light);
}

.footer a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer a:hover {
    opacity: 1;
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.85;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input { width: auto; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover { background: var(--light-bg); }
table img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-processing { background: #DBEAFE; color: #1E40AF; }
.badge-shipped { background: #E0E7FF; color: #3730A3; }
.badge-completed { background: #D1FAE5; color: #065F46; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-edit { background: #FEF3C7; color: #92400E; }
.btn-edit:hover { background: var(--warning); color: white; }
.btn-delete { background: #FEE2E2; color: #991B1B; }
.btn-delete:hover { background: var(--danger); color: white; }
.btn-view { background: #DBEAFE; color: #1E40AF; }
.btn-view:hover { background: var(--primary); color: white; }

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

.sidebar {
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    color: white;
    padding: 2rem 0;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    color: var(--accent-light);
}

.sidebar-header p {
    font-size: 0.85rem;
    opacity: 0.7;
}

.sidebar-menu a {
    display: block;
    padding: 0.9rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(37, 99, 235, 0.2);
    border-left-color: var(--accent);
}

.main-content {
    padding: 2rem;
    overflow-x: auto;
    background: var(--light-bg);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: transform 0.3s;
}

.stat-card:hover { transform: translateY(-5px); }

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-card .stat-icon {
    font-size: 2rem;
    float: right;
    opacity: 0.3;
}

.stat-card.accent { border-left-color: var(--accent); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.info { border-left-color: var(--secondary); }

.content-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
}

.login-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-box > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
}

.demo-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

.demo-info code {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--primary);
    font-weight: 600;
}

/* Success Page */
.success-page {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 3rem auto;
}

.success-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.order-details {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 15px;
    margin: 2rem 0;
    text-align: left;
}

.order-details h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .nav { gap: 0.8rem; font-size: 0.85rem; flex-wrap: wrap; justify-content: center; }
    .product-detail { grid-template-columns: 1fr; padding: 1.5rem; }
    .section-title { font-size: 1.8rem; }
    .header-container { padding: 1rem; flex-direction: column; gap: 1rem; }
    .logo { font-size: 1.4rem; }
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .cart-layout, .checkout-layout, .contact-layout { grid-template-columns: 1fr; }
}