:root {
    --bg: #f5f0e6;
    --bg-accent: #fffaf1;
    --surface: rgba(255, 252, 245, 0.94);
    --surface-strong: #ffffff;
    --line: rgba(47, 58, 74, 0.12);
    --line-strong: rgba(47, 58, 74, 0.2);
    --text: #1d2430;
    --muted: #5e6a7a;
    --accent: #8f5a2f;
    --accent-soft: #f2ddbf;
    --sale: #be4a2f;
    --new: #1f8f68;
    --shadow: 0 20px 48px rgba(38, 32, 22, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Zen Kaku Gothic New", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(241, 205, 150, 0.5), transparent 24%),
        linear-gradient(180deg, #faf5eb 0%, #f3ede2 52%, #efe7db 100%);
}

a {
    color: inherit;
}

.page-shell {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
    padding: 26px 0 56px;
}

.hero {
    padding: 34px;
    border-radius: 30px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 248, 234, 0.92), rgba(248, 240, 227, 0.88)),
        var(--surface);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}

.hero-copy {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
}

.hero h1 {
    margin: 0 0 14px;
    font-family: "Noto Serif JP", serif;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: 0.01em;
}

.hero-text {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
    font-size: 15px;
}

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

.hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface-strong);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.hero-actions a:hover {
    border-color: rgba(143, 90, 47, 0.34);
    background: #fff7ec;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.stat-grid article,
.toolbar,
.notice,
.product-card {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-grid article {
    padding: 18px 20px;
    border-radius: 20px;
}

.stat-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.stat-grid strong {
    font-size: clamp(24px, 3vw, 34px);
}

.content {
    margin-top: 22px;
}

.toolbar,
.notice {
    padding: 24px;
    border-radius: 24px;
}

.toolbar-head {
    margin-bottom: 18px;
}

.toolbar-head h2 {
    margin: 0 0 6px;
    font-family: "Noto Serif JP", serif;
    font-size: 28px;
}

.toolbar-head p,
.toolbar-meta p,
.notice p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.toolbar-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    gap: 14px;
}

.toolbar label span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.toolbar input[type="search"],
.toolbar select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
}

.toolbar input[type="search"]::placeholder {
    color: #8a95a3;
}

.toolbar-flags,
.toolbar-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar-flags {
    margin-top: 16px;
}

.toolbar-flags label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(143, 90, 47, 0.06);
    color: var(--text);
    font-size: 14px;
}

.toolbar-meta {
    justify-content: space-between;
    margin-top: 18px;
}

.notice {
    margin-top: 16px;
}

.notice a {
    color: var(--accent);
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.product-card {
    overflow: hidden;
    border-radius: 24px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 56px rgba(38, 32, 22, 0.12);
}

.card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, #faf7f0 0%, #efe8dc 100%);
}

.card-media img,
.image-placeholder {
    width: 100%;
    height: 100%;
}

.card-media img {
    object-fit: contain;
    background: #fff;
}

.image-placeholder {
    display: grid;
    place-items: center;
    color: #8a95a3;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.badge-row {
    position: absolute;
    inset: 14px 14px auto 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(47, 58, 74, 0.1);
}

.badge-new {
    color: var(--new);
}

.badge-sale {
    color: var(--sale);
}

.badge-rank {
    color: var(--accent);
}

.badge-source {
    color: var(--text);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.card-source {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}

.card-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.75;
    min-height: 5.2em;
}

.price-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: baseline;
}

.price-current {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.price-before {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 15px;
}

.sale-copy,
.review-line {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

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

.meta-row span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #f5ecdf;
    color: #4d5968;
    font-size: 12px;
}

.card-actions {
    margin-top: auto;
}

.primary-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    text-decoration: none;
    background: linear-gradient(135deg, #1f2835 0%, #2f3a4a 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.primary-link:hover {
    filter: brightness(1.05);
}

.empty-state {
    margin-top: 20px;
    padding: 36px;
    border: 1px dashed var(--line-strong);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.5);
    text-align: center;
    color: var(--muted);
}

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

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

    .hero-copy {
        flex-direction: column;
    }

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

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 18px, 100%);
        padding-top: 12px;
    }

    .hero,
    .toolbar,
    .notice,
    .product-card {
        border-radius: 20px;
    }

    .hero,
    .toolbar,
    .notice {
        padding: 20px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .product-grid,
    .toolbar-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-title {
        min-height: unset;
    }
}
