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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo {
    background: #2196f3;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-btn, .cart-btn {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

.login-btn {
    background: #4caf50;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.cart-btn {
    position: relative;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.top-bar {
    background: white;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    border-bottom: 1px solid #e0e0e0;
}

.btn-top {
    background: #263238;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-top:hover {
    background: #37474f;
}

.tabs {
    background: #1a3a3a;
    display: flex;
    overflow-x: auto;
}

.tab {
    flex: 1;
    background: transparent;
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}

.tab.active {
    border-bottom-color: #4caf50;
}

.product-header {
    background: #263238;
    color: white;
    display: grid;
    grid-template-columns: 2fr 100px 100px 100px 120px 120px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.product-list {
    background: white;
}

.product-card {
    display: grid;
    grid-template-columns: 2fr 100px 100px 100px 120px 120px;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    gap: 1rem;
}

.product-card:hover {
    background: #f9f9f9;
}

.product-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.product-logo {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #263238;
}

.product-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.product-country {
    text-align: center;
}

.flag {
    width: 30px;
    border-radius: 2px;
}

.stock-badge, .sold-badge {
    background: #e3f2fd;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.stock-badge strong, .sold-badge strong {
    color: #1976d2;
    display: block;
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

.price-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

.btn-buy {
    background: #9e9e9e;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
}

.btn-buy.available {
    background: #4caf50;
}

.btn-buy.available:hover {
    background: #45a049;
}

.cart-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #263238;
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 200;
}

.cart-sidebar.show {
    transform: translateY(0);
}

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

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #263238;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

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

.link {
    color: #667eea;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit:hover {
    opacity: 0.9;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-footer p {
    margin-bottom: 1rem;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: #666 !important;
    font-weight: normal !important;
}

@media (max-width: 1024px) {
    .product-header {
        grid-template-columns: 2fr 80px 80px 80px 100px 100px;
        font-size: 0.75rem;
    }

    .product-card {
        grid-template-columns: 2fr 80px 80px 80px 100px 100px;
    }

    .product-title {
        font-size: 0.9rem;
    }

    .product-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .product-header {
        display: none;
    }

    .product-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .product-info {
        order: 1;
    }

    .product-country, .product-stock, .product-sold {
        display: inline-block;
    }

    .product-price, .product-action {
        order: 2;
    }

    .nav-menu {
        display: none;
    }
}
