/* Simple, minimal stylesheet for nomarket */

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

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial;
    background: #f5f7fb;
    color: #222;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
    padding-bottom: 40px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: #fff;
    border-bottom: 1px solid #e6e9ef;
    margin-bottom: 24px;
}

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

header h1 {
    color: #222;
    font-size: 1.25rem;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info {
    color: #666;
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.12s ease, transform 0.12s ease;
    line-height: 1;
}

.btn-primary {
    background: #459fff;
    color: #fff;
}
.btn-secondary {
    background: #eef1f6;
    color: #2b2f36;
    border: 1px solid #e2e6ee;
}
.btn-danger {
    background: #e05a4f;
    color: #fff;
}
.btn-success {
    background: #2aa06d;
    color: #fff;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-success:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.auth-card {
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    border: 1px solid #edf0f5;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 18px;
    color: #459fff;
    font-size: 1.25rem;
}
.auth-link {
    text-align: center;
    margin-top: 14px;
    color: #666;
    font-size: 0.95rem;
}
.auth-link a {
    color: #459fff;
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.95rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e6e9ef;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #cfe0ff;
    box-shadow: 0 0 0 3px rgba(47, 111, 235, 0.06);
}

/* Search Bar */
.search-bar {
    margin-bottom: 20px;
}
.search-bar input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e6e9ef;
    background: #fff;
    font-size: 0.95rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.product-card {
    background: #fff;
    border: 1px solid #e9edf4;
    border-radius: 8px;
    padding: 16px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(28, 36, 44, 0.06);
}
.product-card h3 {
    color: #222;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
}
.product-card .price {
    color: #459fff;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 8px 0;
}
.product-card .seller {
    color: #6b7280;
    font-size: 0.88rem;
}

/* Status */
.product-card .status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 10px;
    border: 1px solid transparent;
}
.status.available {
    color: #155724;
    background: #e9f7ef;
    border-color: #d2f0db;
}
.status.sold {
    color: #721c24;
    background: #fff0f0;
    border-color: #ffd6d6;
}

/* Product Detail */
.product-detail {
    background: #fff;
    border: 1px solid #e9edf4;
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 18px;
}
.product-detail h2 {
    color: #222;
    margin-bottom: 12px;
    font-size: 1.5rem;
}
.product-detail .price {
    color: #2f6feb;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 12px 0;
}
.product-detail .description {
    margin-top: 14px;
    padding: 14px;
    background: #fbfdff;
    border-radius: 6px;
    font-size: 0.96rem;
    color: #333;
}

/* Post & Purchase containers */
.post-container,
.purchase-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9edf4;
    max-width: 720px;
    margin: 0 auto 18px auto;
}
.post-container h2,
.purchase-section h3 {
    color: #2f6feb;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* Purchase list */
.purchase-item {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f1f4f8;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.purchase-item .buyer-info {
    color: #555;
    font-size: 0.92rem;
}

/* Messages */
.error-message,
.success-message {
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 0.95rem;
    display: none;
}
.error-message.show {
    display: block;
    background: #fff4f4;
    color: #a43a3a;
    border: 1px solid #ffdede;
}
.success-message.show {
    display: block;
    background: #f3fff6;
    color: #1f8f52;
    border: 1px solid #d2f6de;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .auth-card {
        padding: 18px;
    }
    .product-detail {
        padding: 16px;
    }
    .post-container,
    .purchase-section {
        padding: 14px;
    }
    .purchase-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
