:root {
    --primary: #008C99;
    --primary-dark: #006e73;
    --primary-light: #00a5b3;
    --accent: #27D9E5;
    --accent-dark: #06b6d4;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--slate-50);
    color: var(--slate-900);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.logo-img {
    max-height: 50px;
    max-width: 150px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--slate-900);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--slate-600);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
}

.nav-phone {
    color: var(--accent-dark);
    background: rgba(6, 182, 212, 0.1);
}

.nav-phone:hover {
    color: var(--accent-dark);
    background: rgba(6, 182, 212, 0.2);
}

.cart-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.25rem;
}

.main-content {
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #008C99 0%, #006e73 100%);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    max-width: 550px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.search-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    color: var(--slate-900);
    outline: none;
}

.search-form input::placeholder {
    color: var(--slate-500);
}

.search-form button {
    padding: 1rem 2rem;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.search-form button:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

/* Marketplace Container */
.marketplace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.sidebar {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--slate-200);
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.category-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    color: var(--slate-600);
    transition: all 0.2s;
}

.category-item:hover,
.category-item.active {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

.category-item.active {
    background: var(--primary);
    color: white;
}

.category-item .count {
    font-size: 0.75rem;
    background: var(--slate-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--slate-500);
}

.sell-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.sell-box h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.sell-box p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.sell-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    border-radius: 8px;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Products Section */
.products-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--slate-100);
}

.results-count {
    color: var(--slate-600);
    font-size: 0.95rem;
}

.results-count strong {
    color: var(--slate-900);
}

.sort-wrapper select {
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    color: var(--slate-700);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

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

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.category-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: rgba(0,0,0,0.7);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: capitalize;
}

.product-info {
    padding: 1.25rem;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
}

.product-info p {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #fbbf24;
    font-size: 0.875rem;
}

.rating .reviews {
    color: var(--slate-400);
    font-size: 0.8rem;
}

.stock {
    font-size: 0.8rem;
    color: var(--accent-dark);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-100);
}

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

.add-btn {
    padding: 0.75rem 1.25rem;
    background: #f97316;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-btn:hover {
    background: #ea580c;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--slate-500);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--slate-700);
}

.clear-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    border-radius: 8px;
    color: white;
    font-weight: 700;
}

/* Footer */
.footer {
    background: var(--slate-900);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-content p {
    color: var(--slate-400);
    font-size: 0.875rem;
}

.footer-contact {
    display: flex;
    gap: 1.5rem;
}

.footer-contact a {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-contact .fa-whatsapp:hover {
    color: #25D366;
}

/* Cart Page Styles */
.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cart-page h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--slate-900);
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

.cart-items {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--slate-50);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--slate-100);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-info p {
    color: var(--slate-500);
    font-size: 0.875rem;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-summary {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--slate-100);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--slate-600);
}

.summary-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    padding-top: 1rem;
    border-top: 1px solid var(--slate-100);
    margin-top: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

/* Login Page */
.auth-container {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--slate-200);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-logo h1 {
    font-size: 1.75rem;
    color: var(--slate-900);
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--slate-200);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--slate-50);
    color: var(--slate-900);
    outline: none;
    transition: border-color 0.2s;
}

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

.btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #ede9fe;
    border: 1px solid #c7d2fe;
    color: var(--primary-dark);
}

/* Admin Panel */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

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

.admin-header h1 {
    font-size: 2rem;
    color: var(--slate-900);
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--slate-200);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .icon.green {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-dark);
}

.stat-card .icon.purple {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

.stat-card .icon.orange {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.stat-card .info h3 {
    font-size: 0.875rem;
    color: var(--slate-500);
    font-weight: 500;
}

.stat-card .info p {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--slate-900);
}

/* Responsive */
@media (max-width: 1024px) {
    .marketplace-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem;
    }
    
    .marketplace-container {
        padding: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}
