/*
Theme Name: Manicemu Store
Description: 用于管理商品和导出静态店面的 WordPress 主题。
Version: 1.0.0
Requires PHP: 8.3
*/

:root {
    color-scheme: light dark;
    --background: #f8f8f5;
    --surface: #eceee9;
    --ink: #171c23;
    --quiet: #555d69;
    --line: #d7d9d4;
    --brand: #263ea6;
    --button-text: #fff;
    --button-hover: #1a2e85;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #171a21;
        --surface: #232936;
        --ink: #f1f1ed;
        --quiet: #bbc3ce;
        --line: #3a4252;
        --brand: #b2c2ff;
        --button-text: #171d3a;
        --button-hover: #d0daff;
    }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .24em; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 5px; }
.shell { width: min(100% - 4rem, 76rem); margin-inline: auto; }
.skip-link { position: fixed; inset: .75rem auto auto .75rem; z-index: 2; padding: .65rem 1.1rem; background: var(--background); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.header-content { display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; min-height: 4.25rem; }
.brand { font: 800 1.1rem/1 system-ui, sans-serif; letter-spacing: .12em; display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; overflow-wrap: anywhere; }
.brand-mark { width: .92rem; height: .92rem; flex: none; background: var(--brand); border-radius: 45% 0 45% 0; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9rem; }
nav a, .back { text-decoration: none; }
nav a:hover, .back:hover { text-decoration: underline; }
.demo-note { text-align: center; border-bottom: 1px solid var(--line); color: var(--quiet); padding: .35rem 1rem; font-size: .875rem; }
main { min-height: 58vh; }
.hero { display: grid; grid-template-columns: 5fr 6fr; min-height: clamp(24rem, 43vw, 34rem); margin-block: 2rem 4.25rem; background: var(--surface); }
.hero-stacked { grid-template-columns: 1fr; min-height: 19rem; }
.hero-content { align-self: center; padding: clamp(2rem, 6vw, 5.75rem); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1 { font-size: clamp(2.4rem, 5vw, 5.1rem); letter-spacing: -.055em; line-height: 1.12; }
.hero .button { margin-top: 2rem; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; background: var(--brand); color: var(--button-text); padding: .65rem 1.35rem; text-decoration: none; font-weight: 700; }
.button:hover { background: var(--button-hover); }
.catalog { margin-bottom: 5rem; scroll-margin-top: 1rem; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); margin-bottom: 1.3rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.2; }
.section-heading span, .muted { color: var(--quiet); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.product-card { display: block; text-decoration: none; }
.product-card img { width: 100%; aspect-ratio: 5/4; object-fit: cover; background: var(--surface); }
.product-card-label { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.product-card:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
.product-card h3 { font-size: 1.06rem; }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.product-card .price { color: var(--quiet); font-size: .9rem; }
.back { display: inline-block; margin-block: 1.75rem 1rem; color: var(--quiet); }
.product-detail { display: grid; grid-template-columns: 1.12fr 1fr; align-items: start; gap: clamp(2rem, 6vw, 6rem); margin-bottom: 5rem; }
.product-detail-no-photo { grid-template-columns: minmax(0, 40rem); }
.detail-photo { width: 100%; background: var(--surface); }
.detail-content { padding-block: 2rem; }
.detail-content h1, .info-page h1 { font-size: clamp(2rem, 4.6vw, 4rem); }
.detail-content .price { margin-top: .95rem; font-size: 1.3rem; }
.prose { max-width: 46rem; }
.prose > * + *, .detail-content .prose { margin-top: 1rem; }
.prose .alignwide, .prose figure { margin-inline: 0; }
.product-status { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.3rem; }
.info-page { margin-block: 3rem 5rem; }
.site-footer { border-top: 1px solid var(--line); padding: 1.4rem 0; color: var(--quiet); font: 650 .86rem/1.6 system-ui, sans-serif; letter-spacing: .075em; }

@media (max-width: 52rem) {
    .shell { width: calc(100% - 2rem); }
    .hero { margin-block: 1rem 3rem; min-height: auto; }
    .hero-content { min-height: 18rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
}

@media (max-width: 38rem) {
    .header-content { flex-wrap: wrap; padding-block: .8rem; }
    nav { gap: .35rem 1rem; }
    .hero, .product-detail { grid-template-columns: minmax(0, 1fr); }
    .hero-content { min-height: auto; }
    .hero .button { margin-top: 1.1rem; }
    .hero-photo { aspect-ratio: 4/3; height: auto; }
    .detail-content { padding-block: 0; }
}

@media (max-width: 22rem) {
    .product-grid { grid-template-columns: minmax(0, 1fr); }
}
