:root {
    --text: #1a1a1a;
    --muted: #666;
    --border: #e2e2e2;
    --accent: #2451e0;
    --bg: #fafafa;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

.site-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
    color: var(--text);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.catalog-layout {
    display: flex;
    gap: 32px;
}

.categories {
    flex: 0 0 200px;
}

.categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories a {
    display: block;
    padding: 6px 0;
    color: var(--muted);
    text-decoration: none;
}

.categories a.active,
.categories a:hover {
    color: var(--accent);
}

.product-grid {
    flex: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.product-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s ease;
}

.product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.price {
    font-weight: 600;
    color: var(--accent);
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.availability {
    font-weight: 500;
    margin: 8px 0 24px;
}

.availability.in-stock { color: #1a8a4a; }
.availability.out-of-stock { color: #c0392b; }
.availability.on-demand { color: var(--muted); }

.description {
    line-height: 1.6;
}

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

.cart-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.message {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.message.success { background: #e6f4ea; color: #1a8a4a; }
.message.error { background: #fdecea; color: #c0392b; }

.btn-add-to-cart,
.btn-checkout {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.link-button {
    background: none;
    border: none;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.cart-table th,
.cart-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.cart-total {
    font-weight: 600;
    font-size: 18px;
    margin: 16px 0;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-row input {
    width: 100%;
    max-width: 320px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
}

.order-status {
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.order-status.pending { background: #fff8e1; color: #8a6d1a; }
.order-status.delivered { background: #e6f4ea; color: #1a8a4a; }
.order-status.problem { background: #fdecea; color: #c0392b; }

.delivered-secrets code {
    display: block;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 4px 0;
}
