* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f5f5;
    color: #333;
}

.main-header {
    background: #1e88e5;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
}

.nav-links a:hover {
    text-decoration: underline;
}

.welcome-text {
    margin-left: 15px;
    font-size: 14px;
}

.btn-logout {
    background: #ef5350;
    padding: 4px 8px;
    border-radius: 4px;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

h1, h2 {
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

.main-footer {
    margin-top: 30px;
    background: #ddd;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

/* forms */

.auth-form, .item-form, .filter-form {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.auth-form label,
.item-form label {
    display: block;
    margin-bottom: 5px;
    margin-top: 10px;
}

.auth-form input,
.item-form input,
.item-form select,
.item-form textarea,
.filter-form select {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.auth-form button,
.item-form button,
.filter-form button,
.btn-view {
    margin-top: 15px;
    padding: 8px 12px;
    border: none;
    background: #1e88e5;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.auth-form button:hover,
.item-form button:hover,
.filter-form button:hover,
.btn-view:hover {
    background: #1565c0;
}

.error-box {
    background: #ffcdd2;
    color: #b71c1c;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 3px;
}

.success-box {
    background: #c8e6c9;
    color: #1b5e20;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 3px;
}

/* items */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 15px;
}

.item-card {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.item-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.item-meta {
    font-size: 13px;
    color: #555;
}

.item-price {
    font-weight: bold;
    margin-top: 5px;
}

.item-owner {
    font-size: 13px;
    margin-top: 5px;
    color: #555;
}

.item-details {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.item-details p {
    margin-bottom: 8px;
}

.small-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

/* images */

.thumb-wrapper {
    text-align: center;
    margin-bottom: 8px;
}

.item-thumb {
    max-width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.item-image-wrapper {
    text-align: center;
    margin-bottom: 15px;
}

.item-image-large {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
}
