:root {
    --ink: #181818;
    --muted: #6f6a62;
    --line: #ded8cf;
    --paper: #fbfaf7;
    --panel: #ffffff;
    --accent: #2f6f63;
    --accent-dark: #204c44;
    --warm: #c7643b;
    --soft: #e8efe9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, Arial, sans-serif;
}

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

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

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
    padding: 14px min(40px, 5vw);
    background: rgba(251, 250, 247, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand,
.nav,
.header-actions,
.buy-row,
.order-top,
.page-head,
.toolbar,
.card-bottom,
.table-actions {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: white;
    background: var(--ink);
    border-radius: 6px;
    font-size: 13px;
}

.nav {
    gap: 18px;
    color: var(--muted);
    font-size: 15px;
}

.header-actions {
    gap: 10px;
}

.cart-link {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
}

.cart-link span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    color: white;
    background: var(--accent);
    border-radius: 999px;
    font-size: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button.dark {
    border-color: var(--ink);
    background: var(--ink);
}

.button.ghost {
    color: var(--ink);
    background: transparent;
    border-color: var(--line);
}

.button.small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 14px;
}

.button.full {
    width: 100%;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 48px;
    align-items: center;
    min-height: 520px;
    padding: 50px 0 36px;
}

.hero h1,
.product-details h1,
.page-head h1,
.auth-card h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1;
    letter-spacing: 0;
}

.hero p,
.lead {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.eyebrow {
    color: var(--warm);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
}

.search {
    display: flex;
    max-width: 570px;
    margin-top: 28px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.search input,
label input,
label textarea,
label select,
.buy-row input,
.qty-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 13px;
    background: white;
    color: var(--ink);
    font: inherit;
}

.search input {
    border: 0;
}

.search button {
    border: 0;
    border-radius: 6px;
    padding: 0 20px;
    color: white;
    background: var(--accent);
    font-weight: 800;
}

.hero-visual {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.toolbar {
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 26px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.filter-check {
    min-height: 42px;
    padding: 10px 0;
}

.chip {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--muted);
    font-weight: 700;
}

.chip.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 20px;
    padding-bottom: 70px;
}

.showcase {
    margin: 6px 0 28px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 30px;
}

.mini-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.mini-product {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.mini-product img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: var(--soft);
}

.mini-product span {
    font-weight: 800;
}

.product-card,
.auth-card,
.summary,
.order-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.product-image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--soft);
    border-radius: 8px 8px 0 0;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    color: white;
    background: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.badge.warm {
    left: auto;
    right: 10px;
    background: var(--warm);
}

.product-image img,
.product-page-image img,
.cart-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.short {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.product-body h2,
.cart-row h2,
.summary h2,
.order-card h2,
.admin-grid h2 {
    margin: 0;
    font-size: 20px;
}

.muted {
    margin: 0 0 6px;
    color: var(--muted);
}

.meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta span,
.status {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 800;
}

.card-bottom,
.page-head,
.order-top {
    justify-content: space-between;
    gap: 16px;
}

del {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.product-page {
    display: grid;
    grid-template-columns: minmax(300px, 520px) minmax(0, 1fr);
    gap: 48px;
    padding: 52px 0;
}

.product-page-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.product-details {
    display: grid;
    gap: 22px;
    align-content: start;
}

.detail-grid,
.admin-grid,
.cart-layout,
.form-grid {
    display: grid;
    gap: 16px;
}

.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.detail-grid span {
    display: block;
    color: var(--muted);
    margin-bottom: 5px;
}

.rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rating-row span {
    padding: 8px 10px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    color: var(--accent-dark);
    font-weight: 800;
}

.info-band {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.info-band h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.info-band p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.buy-row {
    gap: 14px;
    flex-wrap: wrap;
}

.buy-row form {
    display: flex;
    gap: 10px;
}

.buy-row input {
    max-width: 90px;
}

.price {
    font-size: 30px;
}

.price-box {
    display: grid;
    gap: 2px;
}

.auth-wrap {
    display: grid;
    place-items: start center;
    padding: 54px 0;
}

.auth-card {
    display: grid;
    gap: 16px;
    width: min(440px, 100%);
    padding: 26px;
}

.auth-card.wide {
    width: min(640px, 100%);
}

label {
    display: grid;
    gap: 7px;
    font-weight: 800;
}

label textarea {
    min-height: 120px;
    resize: vertical;
}

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

.form-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.check input {
    width: auto;
}

.field-error,
.alert.error {
    color: #a42a2a;
}

.alert {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 6px;
    background: white;
    border: 1px solid var(--line);
}

.alert.success {
    color: var(--accent-dark);
    border-color: #abcbbf;
    background: #eef7f2;
}

.cart-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    padding-bottom: 64px;
}

.cart-list {
    display: grid;
    gap: 14px;
}

.cart-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 150px auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.cart-row img {
    aspect-ratio: 1;
    border-radius: 6px;
    background: var(--soft);
}

.qty-form {
    display: grid;
    gap: 8px;
}

.summary {
    display: grid;
    gap: 16px;
    padding: 20px;
    position: sticky;
    top: 92px;
}

.page-head {
    padding: 42px 0 24px;
}

.order-list {
    display: grid;
    gap: 16px;
    padding-bottom: 60px;
}

.order-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

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

.order-card li {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.admin-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
    align-items: start;
    padding-bottom: 70px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    background: white;
}

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

.table-actions {
    gap: 8px;
    justify-content: flex-end;
}

.empty {
    padding: 42px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: white;
}

@media (max-width: 860px) {
    .site-header {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        width: 100%;
    }

    .hero,
    .product-page,
    .cart-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .cart-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .summary {
        position: static;
    }
}

@media (max-width: 560px) {
    main {
        width: min(100% - 20px, 1180px);
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .search,
    .buy-row form {
        flex-direction: column;
    }

    .detail-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
