:root {
    --bg: #0c0c0c;
    --bg-soft: #141414;
    --card: #181818;
    --border: #2b2b2b;
    --text: #f5f5f5;
    --muted: #bdbdbd;
    --accent: #ffffff;
    --danger: #a33232;
    --success: #1f6b41;
    --container: 1200px;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.small-container {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header,
.admin-header {
    border-bottom: 1px solid var(--border);
    background: rgba(12,12,12,0.96);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 78px;
    gap: 24px;
}

.brand {
    letter-spacing: 0.35rem;
    font-size: 1.3rem;
    font-weight: bold;
}

.menu {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.menu a,
.menu button {
    color: var(--muted);
}

.menu a:hover {
    color: var(--text);
}

.hero {
    padding: 72px 0;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #101010 0%, #0c0c0c 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 32px;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    margin: 12px 0 18px;
}

.hero-text,
.lead,
.card p,
.product-body p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-card,
.card,
.product-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hero-card {
    padding: 28px;
    min-height: 220px;
}

.hero-badge,
.tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #222;
    color: var(--muted);
    border: 1px solid var(--border);
    font-size: 0.82rem;
}

.section {
    padding: 56px 0;
}

.section.alt {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.section-head h1,
.section-head h2,
.card h1,
.card h2,
.card h3 {
    margin: 0;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    padding: 24px;
}

.product-card {
    overflow: hidden;
}

.product-image-wrap {
    display: block;
    background: #101010;
}

.product-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.product-image.large {
    height: 520px;
}

.product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.35rem;
    color: #8d8d8d;
    background: #111;
}

.product-image.placeholder.large {
    height: 520px;
}

.product-body {
    padding: 18px;
    display: grid;
    gap: 14px;
}

.product-top {
    display: grid;
    gap: 10px;
}

.product-bottom,
.hero-actions,
.checkout-box,
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price.big strong {
    font-size: 2rem;
}

.price-old {
    color: #9c9c9c;
    text-decoration: line-through;
    font-size: 0.95rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 18px;
    border: 1px solid var(--border);
    background: #242424;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.btn:hover {
    opacity: 0.92;
}

.btn-dark {
    background: #f3f3f3;
    color: #111;
    border-color: #f3f3f3;
}

.btn-light {
    background: #ffffff;
    color: #111;
    border-color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
}

.btn-danger {
    background: #3a1a1a;
    color: #fff;
    border-color: #5e2b2b;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.92rem;
}

.alert {
    margin: 20px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.alert.success {
    background: rgba(31, 107, 65, 0.2);
    border-color: rgba(31, 107, 65, 0.6);
}

.alert.error {
    background: rgba(163, 50, 50, 0.16);
    border-color: rgba(163, 50, 50, 0.5);
}

.error-list {
    margin: 0;
    padding-left: 20px;
}

.filter-bar,
.form-grid,
.inline-form,
.add-form {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-bar,
.form-grid {
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.field {
    display: grid;
    gap: 8px;
}

.field.full,
.full {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #101010;
    color: var(--text);
    font: inherit;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

.product-page,
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.content-box,
.summary-box {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #101010;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.checkout-box,
.success-card {
    margin-top: 24px;
}

.total-price {
    font-size: 1.8rem;
    margin: 0;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.total-row {
    font-size: 1.15rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0 48px;
    margin-top: 56px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 10px;
}

.muted,
.stock {
    color: var(--muted);
}

@media (max-width: 980px) {
    .hero-grid,
    .grid-3,
    .grid-4,
    .product-page,
    .checkout-grid,
    .footer-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .product-image,
    .product-image.large,
    .product-image.placeholder.large {
        height: 320px;
    }

    .nav {
        min-height: auto;
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
    }
}

.brand-logo {
    letter-spacing: normal;
    display: inline-flex;
    align-items: center;
}

.site-logo {
    height: 88px;
    width: auto;
    display: block;
}

@media (max-width: 980px) {
    .site-logo {
        height: 64px;
    }
}
