:root {
    --bg: #f5f5f2;
    --paper: #ffffff;
    --line: #d4d7d1;
    --line-strong: #b9beb5;
    --ink: #2a2f2a;
    --muted: #6d746f;
    --brand: #2f5f8a;
    --brand-soft: #edf3f8;
    --accent: #a89263;
    --danger: #b54b4b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fafaf7;
    font: normal 14px/1.85 Arial, Helvetica, "Hiragino Kaku Gothic ProN", "Yu Gothic", Osaka, "MS PGothic", sans-serif;
    letter-spacing: 0.01em;
}

a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

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

body.product-list-page .page-main {
    width: min(1240px, calc(100% - 32px));
}

.site-header {
    border-top: 3px solid #7c8a80;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 16px 0 14px;
}

.brand {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--ink);
    text-decoration: none;
}

.nav,
.auth-nav,
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.nav a,
.nav-button,
.auth-user {
    color: var(--muted);
    font-size: 0.9rem;
}

.nav-button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.logout-form {
    margin: 0;
}

.page-main {
    padding: 28px 0 56px;
}

.hero,
.card,
.panel,
.form-card,
.article-card,
.table-card,
.info-list {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: none;
}

.hero,
.article-card,
.form-card,
.table-card {
    padding: 26px 28px;
}

.panel,
.card {
    padding: 20px 22px;
}

.card-grid,
.split-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    line-height: 1.5;
    margin: 0 0 14px;
    color: #27312d;
}

h1 {
    font-size: 1.75rem;
    letter-spacing: 0.04em;
}

h2 {
    font-size: 1.25rem;
    letter-spacing: 0.03em;
}

h3 {
    font-size: 1rem;
    letter-spacing: 0.02em;
}

p,
li,
dd {
    color: #4e5853;
}

p {
    margin: 0 0 1.1em;
}

strong {
    color: #2b3430;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 2px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.button-secondary {
    background: #fff;
    color: var(--brand);
    border-color: var(--brand);
}

.muted {
    color: var(--muted);
    font-size: 0.93rem;
}

.simple-list,
.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.simple-list li,
.notice-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.product-card-image-link,
.product-card-image-link:hover {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    text-decoration: none;
}

.product-card-image,
.product-hero-image,
.product-gallery-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}

.product-card-image {
    border: none;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.product-grid .actions {
    margin-top: auto;
}

.product-card h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

@media (max-width: 1180px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    body.product-list-page .page-main {
        width: min(940px, calc(100% - 24px));
    }

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

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

.product-hero-media {
    margin: 0 0 22px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}

.product-gallery-item {
    margin: 0;
}

.product-assets {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.richtext h2,
.richtext h3,
.richtext h4 {
    margin-top: 24px;
}

.richtext ol,
.richtext ul {
    padding-left: 1.4em;
    margin: 0 0 1.1em;
}

.notice-list li {
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.notice-list li span {
    min-width: 92px;
    color: var(--muted);
    font-size: 0.88rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
}

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

.data-table th {
    color: #39423d;
    font-weight: 700;
    background: #f6f7f3;
    border-top: 1px solid var(--line-strong);
}

form p {
    display: grid;
    gap: 8px;
    margin: 0 0 20px;
}

label {
    color: #36403b;
    font-weight: 700;
    font-size: 0.92rem;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #8fa39b;
    box-shadow: 0 0 0 3px rgba(47, 98, 89, 0.08);
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 18px;
    align-items: end;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.message-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.message {
    padding: 12px 14px;
    border-radius: 3px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
}

.message.success {
    background: #ebf6ee;
    color: #255d34;
}

.message.error {
    background: #faecec;
    color: var(--danger);
}

dt {
    font-weight: 700;
    margin-top: 14px;
    color: #2e3732;
}

dd {
    margin: 4px 0 0;
    color: var(--muted);
}

.hero {
    border-top: 2px solid var(--line-strong);
}

.card h2,
.panel h2,
.article-card h1,
.table-card h1,
.form-card h1 {
    margin-bottom: 16px;
}

.actions {
    margin-top: 18px;
}

.richtext p:last-child,
.card p:last-child,
.panel p:last-child {
    margin-bottom: 0;
}

@media (max-width: 880px) {
    .header-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cart-row {
        grid-template-columns: 1fr;
    }

    .notice-list li {
        display: block;
    }
}
