/* Reset och grundläggande styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: white;
}

/* Sidebar - Vänster meny */
.sidebar {
    width: 300px;
    background: #f8f9fa;
    color: #333;
    padding: 0;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.sidebar h2 {
    margin: 0;
    padding: 15px 20px;
    font-size: 1.2rem;
    color: #495057;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.product-list {
    display: flex;
    flex-direction: column;
}

.product-item {
    background: white;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #dee2e6;
    border-left: 3px solid transparent;
}

.product-item:hover {
    background: #f8f9fa;
    border-left-color: #007bff;
}

.product-item.selected {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.product-name {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: #333;
    line-height: 1.3;
}

.product-price {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 2px;
}

.product-brand {
    font-size: 0.8rem;
    color: #999;
}

/* Main content - Produktdetaljer */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
}

.product-detail h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 600;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.product-price-large {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
}

.product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.info-section {
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.info-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

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

/* Knappar */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #ced4da;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    background: white;
    color: #495057;
}

.btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Responsiv design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .product-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .actions {
        flex-direction: column;
    }
}

/* Placeholder för när ingen produkt är vald */
.product-detail p {
    color: #6c757d;
    font-size: 1rem;
    text-align: center;
    margin-top: 50px;
}

/* Error styling */
.error {
    color: #dc3545;
    padding: 20px;
    text-align: center;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    margin: 20px;
}