﻿:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #1b2733;
    --muted: #607286;
    --primary: #0059b3;
    --primary-hover: #00448a;
    --danger: #c62828;
    --border: #dde5ef;
    --shadow: 0 10px 24px rgba(17, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #eff5ff 0%, var(--bg) 35%);
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

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

.nav-links {
    display: flex;
    gap: 18px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}

main.container {
    padding: 20px 0 40px;
}

.hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin: 12px 0 18px;
}

.search-form input {
    flex: 1;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.product-card {
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.card-body p {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.35;
    min-height: 56px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.inline-form,
.qty-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

input,
textarea,
button,
.button {
    border-radius: 10px;
    border: 1px solid var(--border);
    font: inherit;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    background: #fff;
}

button,
.button {
    padding: 10px 14px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: none;
    display: inline-block;
}

button:hover,
.button:hover {
    background: var(--primary-hover);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

button.danger {
    background: var(--danger);
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.alert.success {
    background: #e3f5e7;
    color: #1f7a34;
}

.alert.error {
    background: #fde8e8;
    color: #b42318;
}

.cart-table-wrap {
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

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

.checkout-summary,
.success-box {
    margin-top: 16px;
    padding: 18px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
}

.checkout-form {
    padding: 16px;
}

.checkout-form label {
    display: block;
    margin-bottom: 10px;
}

.order-box {
    padding: 16px;
}

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

.order-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.total-line {
    margin-top: 12px;
    font-size: 1.1rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 16px 0;
    color: var(--muted);
}

@media (max-width: 840px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 8px 0;
    }
}
