/* NikoStore - Modern Dark Theme */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #667eea;
    --accent-hover: #5a67d8;
    --success: #48bb78;
    --danger: #e53e3e;
    --warning: #ed8936;
    --border: #2d2d2d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 45px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
}

.btn-block {
    width: 100%;
}

/* Auth Section */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--accent);
    background-size: cover;
    background-position: center;
}

.user-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 8px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s;
}

.user-menu .dropdown a:hover {
    background: var(--bg-card);
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.category-filter select {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
}

.price-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-filter input {
    width: 100px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: var(--accent);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-category {
    display: inline-block;
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.product-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-price.free {
    color: var(--success);
}

.product-price.paid {
    color: var(--warning);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
}

/* Admin Panel */
.admin-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.admin-panel h2,
.admin-panel h3 {
    margin-bottom: 15px;
}

.users-list {
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.user-item:hover {
    background: var(--bg-card);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    animation: slideDown 0.3s;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.close:hover {
    color: var(--danger);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
}

/* Crop */
.crop-container {
    margin: 20px 0;
    text-align: center;
}

.crop-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.crop-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.crop-controls input {
    width: 80px;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
}

/* Product Details */
.product-details {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-detail-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.product-detail-info {
    flex: 1;
}

.product-detail-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.donation-info {
    background: rgba(237, 137, 54, 0.1);
    border: 1px solid var(--warning);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

/* Reviews */
.reviews-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.reviews-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.review-item {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.review-text {
    margin-bottom: 10px;
    line-height: 1.5;
}

.review-replies {
    margin-left: 30px;
    margin-top: 15px;
}

.reply-item {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    padding: 10px;
    margin-bottom: 10px;
}

.add-review textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    margin-bottom: 10px;
    resize: vertical;
}

/* Profile */
.profile-container {
    display: flex;
    gap: 30px;
    align-items: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.profile-info p {
    margin-bottom: 10px;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    animation: slideIn 0.3s;
    z-index: 2000;
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--danger);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        justify-content: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .price-filter {
        flex-wrap: wrap;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-details {
        flex-direction: column;
    }
    
    .product-detail-image {
        width: 100%;
        height: auto;
    }
    
    .profile-container {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        margin: 20px;
        width: auto;
    }
}