:root {
    --bg: #f5efe6;
    --surface: rgba(255, 250, 245, 0.84);
    --surface-strong: #fffaf5;
    --surface-dark: #14352d;
    --ink: #1d2b27;
    --muted: #61726d;
    --line: rgba(29, 43, 39, 0.12);
    --brand: #1f6a50;
    --brand-strong: #0e4d38;
    --accent: #df8f62;
    --shadow: 0 24px 60px rgba(18, 48, 40, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: 'Noto Sans TC', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(223, 143, 98, 0.18), transparent 28%),
        linear-gradient(180deg, #f7f2ea 0%, #f4ede3 100%);
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 18px 0 14px;
    backdrop-filter: blur(18px);
    background: rgba(245, 239, 230, 0.82);
    border-bottom: 1px solid rgba(29, 43, 39, 0.08);
}

.header-top,
.nav-wrap,
.page-intro-grid,
.hero-grid,
.checkout-grid,
.admin-grid,
.footer-grid,
.section-heading,
.shop-actions {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.header-top,
.nav-wrap {
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    gap: 14px;
    align-items: center;
}

.brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand strong,
.hero-panel h1,
.page-intro h1,
.section-heading h2,
.footer-grid h2,
.highlight-card h2,
.article-card h2,
.empty-state h2,
.checkout-panel h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.brand small,
.hero-copy,
.page-intro-grid p,
.info-card p,
.article-excerpt,
.article-date,
.footer-meta p,
.order-item p,
.product-card p,
.highlight-card p,
.clean-list,
.status-pill,
.cart-chip {
    color: var(--muted);
}

.header-status,
.main-nav,
.admin-nav,
.hero-actions,
.hero-metrics,
.product-card-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.status-pill,
.cart-chip,
.main-nav a,
.admin-nav a,
.product-tag,
.card-label,
.eyebrow {
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}

.status-pill,
.cart-chip,
.main-nav a,
.admin-nav a {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(29, 43, 39, 0.08);
}

.main-nav a.is-active,
.admin-nav a.is-active,
.cart-chip {
    color: #fff;
    background: var(--surface-dark);
}

.admin-nav a {
    background: rgba(31, 106, 80, 0.08);
}

.page-main {
    padding-bottom: 72px;
}

.hero-panel,
.page-intro,
.content-band {
    padding: 32px 0;
}

.hero-grid,
.page-intro-grid,
.checkout-grid,
.admin-grid {
    align-items: stretch;
}

.hero-grid {
    padding: 56px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(20, 53, 45, 0.96), rgba(35, 88, 69, 0.92));
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-grid > *,
.page-intro-grid > *,
.checkout-grid > *,
.admin-grid > * {
    flex: 1;
}

.hero-panel h1,
.page-intro h1 {
    margin: 0 0 16px;
    line-height: 1.05;
    font-size: clamp(2.4rem, 4vw, 4.8rem);
}

.hero-copy,
.page-intro-grid p {
    max-width: 620px;
    font-size: 1rem;
    line-height: 1.8;
}

.eyebrow,
.card-label {
    display: inline-flex;
    margin: 0 0 14px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #f7dbca;
}

.page-intro {
    padding-bottom: 12px;
}

.page-intro .eyebrow {
    background: rgba(31, 106, 80, 0.12);
    color: var(--brand);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #d06d3d);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.text-link {
    font-weight: 700;
    color: var(--brand-strong);
}

.hero-metrics {
    margin-top: 28px;
}

.hero-metrics div,
.floating-note,
.highlight-card,
.info-card,
.article-card,
.product-card,
.checkout-panel,
.empty-state {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-metrics div {
    min-width: 140px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metrics strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.8rem;
}

.hero-card-stack {
    position: relative;
    min-height: 100%;
}

.highlight-card {
    padding: 32px;
    background: rgba(255, 250, 245, 0.95);
    color: var(--ink);
}

.highlight-card h2 {
    margin: 0 0 12px;
    font-size: 2rem;
}

.clean-list {
    margin: 18px 0 0;
    padding-left: 18px;
    line-height: 1.8;
}

.floating-note {
    position: absolute;
    right: 24px;
    bottom: -18px;
    min-width: 220px;
    padding: 20px;
    background: linear-gradient(135deg, #f4d6c5, #f9efe8);
}

.floating-note span {
    display: block;
    margin-bottom: 8px;
    color: var(--brand-strong);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.content-band-soft {
    padding-top: 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2,
.footer-grid h2,
.checkout-panel h2 {
    margin: 0;
    font-size: clamp(1.8rem, 2.6vw, 3rem);
}

.product-grid,
.info-grid,
.article-list {
    display: grid;
    gap: 24px;
}

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

.article-list {
    grid-template-columns: 1fr;
}

.product-card,
.info-card,
.article-card,
.checkout-panel,
.empty-state {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #e6ddd1;
}

.product-card-body,
.info-card,
.article-card,
.checkout-panel,
.empty-state {
    padding: 24px;
}

.product-tag,
.card-label {
    display: inline-flex;
    padding: 7px 12px;
    background: rgba(31, 106, 80, 0.12);
    color: var(--brand);
}

.product-card h3,
.info-card h3,
.order-item h3 {
    margin: 10px 0 10px;
    font-size: 1.2rem;
}

.product-card p,
.info-card p,
.article-card p,
.checkout-panel p {
    line-height: 1.75;
}

.product-card-footer {
    justify-content: space-between;
    margin-top: 20px;
}

.product-card-footer strong,
.shop-actions strong,
.order-item strong,
.order-total strong {
    font-size: 1.35rem;
    color: var(--brand-strong);
}

.product-card-detailed .btn {
    width: 100%;
    margin-top: 20px;
}

.shop-actions {
    margin-top: 20px;
    align-items: end;
}

.quantity-group {
    min-width: 110px;
}

.quantity-group label,
.stack-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(29, 43, 39, 0.14);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(31, 106, 80, 0.18);
    border-color: var(--brand);
}

.article-card details {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.article-card summary {
    cursor: pointer;
    font-weight: 700;
}

.details-body {
    margin-top: 14px;
}

.checkout-grid,
.admin-grid {
    gap: 24px;
}

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

.order-item,
.order-total,
.notice-banner {
    display: flex;
    gap: 18px;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(29, 43, 39, 0.08);
}

.order-item h3,
.order-total span,
.notice-banner {
    margin: 0;
}

.order-total {
    margin-top: 18px;
}

.notice-banner {
    justify-content: flex-start;
    margin-bottom: 18px;
    background: rgba(223, 143, 98, 0.12);
    color: var(--brand-strong);
    font-weight: 700;
}

.stack-form > * + * {
    margin-top: 14px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--brand-strong);
    font-size: 0.9rem;
}

.site-footer {
    padding: 0 0 32px;
}

.footer-grid {
    padding: 36px;
    border-radius: var(--radius-xl);
    background: var(--surface-dark);
    color: #fff;
}

.footer-kicker {
    margin: 0 0 10px;
    color: #f4d6c5;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--surface-dark);
    color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 960px) {
    .hero-grid,
    .page-intro-grid,
    .checkout-grid,
    .admin-grid,
    .footer-grid,
    .section-heading,
    .shop-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-grid {
        padding: 28px;
    }

    .floating-note {
        position: static;
        margin-top: 16px;
    }

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

@media (max-width: 640px) {
    .site-header {
        position: static;
    }

    .container {
        width: min(calc(100% - 20px), var(--container));
    }

    .hero-panel,
    .page-intro,
    .content-band {
        padding: 20px 0;
    }

    .hero-panel h1,
    .page-intro h1 {
        font-size: 2.4rem;
    }

    .product-card img {
        height: 190px;
    }

    .order-item,
    .order-total,
    .notice-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}
