: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;
}

.product-card .thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    display: block;
}

.product-image {
    width: 100%;
    max-width: 480px;
    border-radius: 10px;
    margin: 12px 0;
    display: block;
}

.policy-page { max-width: 720px; }
.policy-page h1 { margin-bottom: 4px; }
.policy-lead { color: var(--muted); font-size: 17px; margin-bottom: 32px; }
.policy-page section { margin-bottom: 28px; }
.policy-page h2 { font-size: 19px; margin-bottom: 8px; }
.policy-page ul { padding-left: 20px; }
.policy-page li { margin-bottom: 6px; }
.guarantee-box {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 18px 20px;
}

.review-block { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.review-block h3 { margin: 0 0 10px; font-size: 15px; }
.review-thanks { color: var(--muted); margin: 0; font-size: 14px; }
.review-form { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.review-form select, .review-form textarea { padding: 8px 10px; font-size: 14px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
.review-form button { align-self: flex-start; padding: 8px 16px; background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; }

.rating-summary { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.rating-stars { color: #d9a441; letter-spacing: 1px; }
.rating-count { color: var(--muted); font-size: 13px; }
.review-list { list-style: none; padding: 0; margin: 16px 0 0; }
.review-list li { border-top: 1px solid var(--border); padding: 12px 0; }
.review-list .review-meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.product-card-rating { font-size: 12px; color: #d9a441; margin-top: 2px; }

.account-form { max-width: 380px; }
.account-form label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
.account-form input { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid var(--border); border-radius: 6px; }
.account-form button { margin-top: 16px; padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.order-history-list { list-style: none; padding: 0; }
.order-history-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; background: #fff; }
.order-history-item a { text-decoration: none; color: var(--text); }
.order-history-item a:hover { color: var(--accent); }

.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;
}

.header-links {
    display: flex;
    gap: 20px;
}

.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;
}
