* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #f0f2f5;
    --text: #111827;
    --muted: #667085;
    --border: #e4e7ec;
    --primary: #111827;
    --primary-hover: #243041;
    --danger: #b42318;
    --success: #027a48;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
    --radius: 22px;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    padding: 10px 14px;
    color: var(--muted);
    border-radius: 999px;
    font-size: 14px;
}

.nav a:hover {
    color: var(--text);
    background: var(--surface-muted);
}

.hero {
    padding: 76px 0 34px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: stretch;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.hero h1,
.detail-content h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p,
.lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 260px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-panel strong {
    display: block;
    font-size: 76px;
    line-height: 1;
    letter-spacing: -0.08em;
}

.hero-panel span {
    margin-top: 12px;
    color: var(--muted);
}

.section {
    padding: 42px 0 76px;
}

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

.section-title.compact {
    align-items: center;
    margin-bottom: 22px;
}

.section-title h1,
.section-title h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.product-card,
.admin-card,
.login-card,
.empty-state,
.detail-cover,
.detail-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 58px rgba(17, 24, 39, 0.12);
}

.cover-link {
    display: block;
    background: var(--surface-muted);
}

.cover-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.card-body {
    padding: 22px;
}

.card-meta,
.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card-meta span,
.info-row span {
    color: var(--muted);
    font-size: 13px;
}

.card-meta strong {
    font-size: 16px;
}

.product-card h3 {
    margin: 16px 0 8px;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.product-card p {
    min-height: 52px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 15px;
}

.read-more,
.back-link,
.admin-item a {
    color: var(--primary);
    font-weight: 700;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.button:hover {
    background: var(--primary-hover);
}

.button.secondary,
.button.ghost {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.button.secondary:hover,
.button.ghost:hover {
    background: var(--surface-muted);
}

.button.full {
    width: 100%;
}

.empty-state {
    padding: 52px;
    text-align: center;
}

.empty-state.small {
    padding: 32px;
}

.empty-state h1,
.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0 0 22px;
    color: var(--muted);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 28px;
    margin-top: 22px;
}

.detail-cover {
    overflow: hidden;
    align-self: start;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.detail-content {
    padding: 34px;
}

.info-row {
    margin: 28px 0;
    padding: 18px;
    background: var(--surface-muted);
    border-radius: 18px;
}

.info-row div {
    display: flex;
    flex-direction: column;
}

.info-row strong {
    font-size: 18px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.detail-block {
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.detail-block + .detail-block {
    margin-top: 22px;
}

.detail-block h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-block p {
    margin: 0;
    color: var(--muted);
}

.feature-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 13px 14px;
    background: var(--surface-muted);
    border-radius: 14px;
}

.admin-page {
    background: #f4f5f7;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 24px;
    align-items: start;
}

.admin-card {
    padding: 26px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
}

label span {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: #98a2b3;
    box-shadow: 0 0 0 4px rgba(152, 162, 179, 0.16);
}

.span-2 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
}

.alert.error {
    color: var(--danger);
    background: #fff1f0;
    border: 1px solid #fecdca;
}

.alert.success {
    color: var(--success);
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.count-pill {
    padding: 8px 12px;
    color: var(--muted);
    background: var(--surface-muted);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
}

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

.admin-item {
    display: grid;
    grid-template-columns: 86px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--surface-muted);
    border-radius: 18px;
}

.admin-item img {
    width: 86px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.admin-item h3 {
    margin: 0;
    font-size: 16px;
}

.admin-item p {
    margin: 2px 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.danger-button {
    padding: 9px 12px;
    color: var(--danger);
    background: #ffffff;
    border: 1px solid #fecdca;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.danger-button:hover {
    background: #fff1f0;
}

.login-wrap {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(430px, 100%);
    padding: 34px;
}

.login-card h1 {
    margin: 26px 0 8px;
    font-size: 34px;
    letter-spacing: -0.04em;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

.login-card .back-link {
    display: inline-block;
    margin-top: 18px;
}

.site-footer {
    padding: 28px 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

@media (max-width: 960px) {
    .hero-inner,
    .detail-layout,
    .admin-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 680px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .header-inner,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        padding-top: 42px;
    }

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

    .span-2 {
        grid-column: span 1;
    }

    .admin-item {
        grid-template-columns: 72px 1fr;
    }

    .admin-item form {
        grid-column: 1 / -1;
    }

    .admin-item img {
        width: 72px;
        height: 56px;
    }

    .detail-content,
    .admin-card,
    .login-card,
    .empty-state {
        padding: 24px;
    }
}
