:root {
    color-scheme: light;
    --ink: #16231f;
    --muted: #6d7773;
    --line: #e6ebe8;
    --paper: #ffffff;
    --canvas: #f7f9f7;
    --brand: #16745a;
    --brand-dark: #0c503d;
    --brand-soft: #e6f4ee;
    --accent: #e59b42;
    --danger: #b74040;
    --shadow: 0 18px 55px rgba(23, 58, 45, .10);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 40px)); }
.page-section { padding: 42px 0 72px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(230, 235, 232, .9);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--brand), var(--brand-dark)); box-shadow: 0 10px 24px rgba(22,116,90,.24); }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { padding: 9px 13px; border-radius: 12px; color: #53605b; font-size: 14px; font-weight: 650; }
.main-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.main-nav .nav-strong { color: #fff; background: var(--brand); }
.main-nav .nav-strong:hover { color: #fff; background: var(--brand-dark); }

.flash { margin-top: 18px; padding: 13px 16px; border: 1px solid; border-radius: 14px; font-size: 14px; }
.flash-success { color: #155d47; border-color: #b9decf; background: #eaf7f1; }
.flash-error { color: #8b3131; border-color: #efcaca; background: #fff0f0; }
.flash-info { color: #365d74; border-color: #c9ddea; background: #eef7fc; }

.hero { overflow: hidden; padding: 68px 0 62px; background: linear-gradient(135deg, #edf7f2 0%, #f9fbf8 52%, #f8efe2 100%); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 70px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0 0 16px; max-width: 680px; font-size: clamp(42px, 6vw, 72px); line-height: 1.08; letter-spacing: -.055em; }
.hero p { margin: 0; max-width: 620px; color: #596660; font-size: 18px; }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { position: relative; min-height: 310px; padding: 42px; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 36px; color: white; background: linear-gradient(150deg, #1b7e62, #0e4939); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-card strong { position: relative; font-size: 30px; }
.hero-card > span:last-child { position: relative; color: rgba(255,255,255,.78); }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.orbit-one { width: 260px; height: 260px; right: -55px; top: -60px; }
.orbit-two { width: 150px; height: 150px; right: 35px; top: 35px; background: rgba(255,255,255,.06); }

.button { min-height: 44px; padding: 10px 19px; border: 1px solid transparent; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 750; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 10px 22px rgba(22,116,90,.2); }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { color: var(--brand-dark); border-color: #c7d9d1; background: #fff; }
.button-wide { width: 100%; }

.feature-strip { position: relative; z-index: 2; margin-top: -26px; padding: 22px 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 15px 45px rgba(23,58,45,.07); }
.feature-strip div { padding: 4px 18px; border-right: 1px solid var(--line); }
.feature-strip div:last-child { border-right: 0; }
.feature-strip strong, .feature-strip span { display: block; }
.feature-strip strong { font-size: 15px; }
.feature-strip span { color: var(--muted); font-size: 12px; }

.section-heading { margin-bottom: 25px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading h2 { margin: 0; font-size: 31px; letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; text-align: right; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-media { height: clamp(180px, 18vw, 220px); display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #edf5f1, #f8f2e8); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease, opacity .2s ease; }
.product-card:hover .product-media:not(.is-placeholder) img { transform: scale(1.025); }
.product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(16, 93, 71, .7); font-size: 25px; font-weight: 850; letter-spacing: .12em; background: radial-gradient(circle at 65% 25%, rgba(229,155,66,.22), transparent 35%), linear-gradient(145deg,#e4f2ec,#f7f0e4); }
.product-placeholder.large { min-height: 490px; font-size: 32px; }
[data-product-visual] {
    position: relative;
    --placeholder-start: #e4f2ec;
    --placeholder-end: #f7f0e4;
    --placeholder-accent: rgba(22, 116, 90, .22);
}
[data-product-visual]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .42;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.72) 48%, transparent 61%);
    background-size: 220% 100%;
    animation: product-image-loading 1.15s linear infinite;
}
[data-product-visual].image-ready::before { opacity: 0; animation: none; transition: opacity .2s ease; }
.shop-product-image { position: relative; z-index: 0; background: linear-gradient(145deg, var(--placeholder-start), var(--placeholder-end)); }
[data-product-visual].is-placeholder { background: radial-gradient(circle at 72% 22%, var(--placeholder-accent), transparent 36%), linear-gradient(145deg, var(--placeholder-start), var(--placeholder-end)); }
[data-product-visual].is-placeholder .shop-product-image { object-fit: contain; background: transparent; filter: drop-shadow(0 12px 20px rgba(28, 55, 45, .12)); }
.product-media.is-placeholder .shop-product-image { padding: 21%; }
.detail-media.is-placeholder .shop-product-image { padding: 22%; }
.item-thumb.is-placeholder .shop-product-image { padding: 19%; }
@keyframes product-image-loading { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) {
    [data-product-visual]::before { animation: none; }
}
.product-body { padding: 20px; }
.product-category { color: var(--brand); font-size: 12px; font-weight: 800; }
.product-body h3 { margin: 6px 0 8px; font-size: 18px; line-height: 1.35; }
.product-body p { height: 44px; margin: 0 0 17px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.7; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.product-footer strong { color: #b56d20; font-size: 21px; }
.product-footer a { color: var(--brand); font-size: 13px; font-weight: 750; }

.breadcrumbs { margin-bottom: 24px; display: flex; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumbs a:hover { color: var(--brand); }
.product-detail { display: grid; grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr); gap: 55px; align-items: start; }
.product-gallery { min-width: 0; }
.detail-media { min-height: 490px; overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: var(--paper); }
.detail-media img { width: 100%; height: 490px; object-fit: cover; }
.product-thumbnails { margin-top: 13px; padding: 2px 1px 7px; display: grid; grid-auto-flow: column; grid-auto-columns: 78px; justify-content: start; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.gallery-thumb { width: 78px; height: 72px; padding: 0; overflow: hidden; display: grid; place-items: center; border: 2px solid transparent; border-radius: 14px; background: #edf3f0; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.gallery-thumb:hover { transform: translateY(-1px); }
.gallery-thumb:focus-visible { outline: 3px solid rgba(22, 116, 90, .2); outline-offset: 2px; }
.gallery-thumb.is-active { border-color: var(--brand); box-shadow: 0 5px 16px rgba(22, 116, 90, .16); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-placeholder img { padding: 18%; object-fit: contain; }
.detail-info { padding: 20px 0; }
.detail-info h1 { margin: 8px 0 5px; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -.045em; }
.sku { margin: 0; color: var(--muted); font-size: 13px; }
.detail-price { margin: 26px 0 20px; color: #b56d20; font-size: 20px; }
.detail-price strong { font-size: 39px; }
.detail-description { padding: 20px 0; border-block: 1px solid var(--line); color: #53605b; }
.notice-box { margin: 22px 0; padding: 14px 16px; border: 1px solid #d4e1db; border-radius: 13px; color: #486257; background: #f2f8f5; }
.buy-form { margin-top: 25px; }
.buy-form > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.shipping-fields { margin: 0 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcfb; }
.shipping-fields legend { padding: 0 7px; color: var(--ink); font-size: 14px; font-weight: 800; }
.shipping-fields > p { margin: -2px 0 14px; color: var(--muted); font-size: 12px; }
.shipping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shipping-grid label { min-width: 0; color: #4e5d57; font-size: 12px; font-weight: 700; }
.shipping-grid input, .shipping-grid textarea { width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid #cfd8d4; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.shipping-grid textarea { display: block; resize: vertical; line-height: 1.55; }
.shipping-grid input:focus, .shipping-grid textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,116,90,.11); }
.shipping-address { grid-column: 1 / -1; }
.quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.quantity-row input { width: 110px; padding: 11px 13px; border: 1px solid #cfd8d4; border-radius: 12px; background: white; }
.quantity-row span { color: var(--muted); }
.quantity-row strong { color: #b56d20; }
.detail-assurances { margin: 20px 0 0; padding-left: 19px; color: var(--muted); font-size: 12px; }
.product-detail-images { margin-top: 64px; padding-top: 42px; border-top: 1px solid var(--line); }
.detail-images-heading { margin-bottom: 24px; text-align: center; }
.detail-images-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.detail-image-list { width: min(940px, 100%); margin-inline: auto; display: grid; gap: 18px; }
.detail-image-list figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.detail-image-list img { width: 100%; height: auto; min-height: 220px; object-fit: contain; }
.detail-image-list figure.is-placeholder img { height: min(520px, 62vw); padding: 18%; }

.auth-section { min-height: calc(100vh - 160px); padding: 55px 20px 75px; display: grid; place-items: center; background: linear-gradient(145deg, #eef6f2, #fbf8f1); }
.auth-card { width: min(500px, 100%); padding: 38px; border: 1px solid rgba(222,230,226,.95); border-radius: 28px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.auth-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.auth-heading p { margin: 5px 0 23px; color: var(--muted); }
.auth-card label { display: block; margin-bottom: 15px; font-size: 13px; font-weight: 700; }
.auth-card label span { color: var(--danger); }
.auth-card input { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #cfd8d4; border-radius: 12px; color: var(--ink); background: white; outline: none; }
.auth-card input:focus, .quantity-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,116,90,.11); }
.auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.auth-switch a { color: var(--brand); font-weight: 750; }
.form-errors { margin-bottom: 18px; padding: 13px 15px; border: 1px solid #efcaca; border-radius: 12px; color: #8b3131; background: #fff0f0; font-size: 13px; }
.form-errors ul { margin: 0; padding-left: 19px; }

.empty-state { padding: 65px 30px; border: 1px dashed #cfd8d4; border-radius: 24px; background: white; text-align: center; }
.empty-state.compact { padding-block: 45px; }
.empty-state h1, .empty-state h3 { margin: 10px 0 5px; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; margin: 0 auto; display: grid; place-items: center; border-radius: 18px; color: white; background: var(--brand); font-weight: 850; }
.empty-state .inline-actions { justify-content: center; }

.account-hero { padding: 34px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-radius: 25px; color: white; background: linear-gradient(140deg, #176e56, #0d4638); }
.account-hero h1 { margin: 0; font-size: 34px; }
.account-hero p { margin: 4px 0 0; color: rgba(255,255,255,.72); }
.account-hero .eyebrow { color: #aee3ce; }
.account-meta { min-width: 185px; padding: 16px; border: 1px solid rgba(255,255,255,.17); border-radius: 16px; background: rgba(255,255,255,.07); }
.account-meta span, .account-meta strong { display: block; }
.account-meta span { color: rgba(255,255,255,.65); font-size: 12px; }
.order-heading { margin-top: 43px; }
.order-list { display: grid; gap: 13px; }
.order-card { padding: 21px 23px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.order-number { color: var(--muted); font-size: 12px; }
.order-main h3 { margin: 5px 0 3px; font-size: 17px; }
.order-main p { margin: 0; color: var(--muted); font-size: 12px; }
.order-side { min-width: 135px; display: grid; justify-items: end; gap: 5px; }
.order-side > strong { font-size: 20px; }
.order-side a { color: var(--brand); font-size: 12px; font-weight: 750; }
.status { display: inline-flex; align-items: center; width: max-content; padding: 4px 9px; border-radius: 999px; color: #496159; background: #edf3f0; font-size: 11px; font-weight: 750; }
.status-paid { color: #146248; background: #dff4eb; }
.status-pending_payment, .status-matched { color: #9b5c18; background: #fff0d8; }
.status-closed, .status-refunded { color: #6d7773; background: #edf0ef; }
.status-match_failed, .status-payment_exception { color: #9a3939; background: #fde8e8; }

.order-detail-head { padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border: 1px solid var(--line); border-radius: 22px; background: white; }
.order-detail-head h1 { margin: 2px 0 4px; font-size: 29px; }
.order-detail-head p { margin: 0; color: var(--muted); font-size: 13px; }
.order-total { display: grid; justify-items: end; gap: 8px; }
.order-total > strong { font-size: 29px; }
.detail-grid { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr); gap: 20px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; }
.panel-heading { min-height: 61px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading span { color: var(--muted); font-size: 12px; }
.item-list { padding: 2px 20px; }
.order-item { padding: 18px 0; display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 15px; align-items: center; border-bottom: 1px solid var(--line); }
.order-item:last-child { border-bottom: 0; }
.item-thumb { width: 64px; height: 64px; overflow: hidden; display: grid; place-items: center; border-radius: 14px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 750; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-info strong, .item-info span { display: block; }
.item-info span { color: var(--muted); font-size: 11px; }
.item-price { text-align: right; }
.item-price span, .item-price strong { display: block; }
.item-price span { color: var(--muted); font-size: 12px; }
.order-facts dl { margin: 0; padding: 10px 20px; }
.order-facts dl div { padding: 10px 0; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.order-facts dl div:last-child { border-bottom: 0; }
.order-facts dt { color: var(--muted); font-size: 12px; }
.order-facts dd { margin: 0; max-width: 62%; overflow-wrap: anywhere; text-align: right; font-size: 12px; font-weight: 650; }
.shipping-panel { margin-top: 20px; }
.shipping-facts { margin: 0; padding: 10px 20px; }
.shipping-facts div { padding: 11px 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--line); }
.shipping-facts div:last-child { border-bottom: 0; }
.shipping-facts dt { color: var(--muted); font-size: 12px; }
.shipping-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650; }
.timeline-panel { margin-top: 20px; }
.timeline { margin: 0; padding: 22px 25px 25px; list-style: none; }
.timeline li { position: relative; min-height: 56px; padding-left: 27px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 17px; bottom: 0; width: 1px; background: #cddbd5; }
.timeline-dot { position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border: 3px solid #c9e5d9; border-radius: 50%; background: var(--brand); }
.timeline strong { font-size: 13px; }
.timeline p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }

.site-footer { padding: 35px 0; border-top: 1px solid var(--line); color: #5e6965; background: #f0f4f2; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; }
.footer-grid p { margin: 3px 0; font-size: 12px; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; }
.footer-meta a:hover { color: var(--brand); }

@media (max-width: 980px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero-grid { grid-template-columns: 1fr 330px; gap: 35px; }
    .feature-strip { grid-template-columns: repeat(2, 1fr); }
    .feature-strip div:nth-child(2) { border-right: 0; }
    .product-detail { grid-template-columns: 1fr 1fr; gap: 32px; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 740px) {
    .shell, .narrow { width: min(100% - 24px, 1180px); }
    .header-inner { min-height: 64px; }
    .brand { font-size: 16px; }
    .brand-mark { width: 34px; height: 34px; }
    .main-nav { gap: 0; }
    .main-nav a { padding: 8px; font-size: 12px; }
    .main-nav a:first-child { display: none; }
    .hero { padding: 46px 0 55px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-card { min-height: 210px; }
    .feature-strip { margin-top: -20px; grid-template-columns: 1fr 1fr; padding: 16px 10px; gap: 0; }
    .feature-strip div { padding: 10px; }
    .feature-strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-media { height: 165px; }
    .product-body { padding: 14px; }
    .product-body h3 { font-size: 15px; }
    .product-footer strong { font-size: 17px; }
    .section-heading { align-items: start; }
    .section-heading p { max-width: 48%; }
    .product-detail { grid-template-columns: 1fr; }
    .detail-media, .detail-media img, .product-placeholder.large { min-height: 330px; height: 330px; }
    .product-thumbnails { grid-auto-columns: 68px; }
    .gallery-thumb { width: 68px; height: 64px; border-radius: 12px; }
    .detail-info { padding-top: 0; }
    .shipping-grid { grid-template-columns: 1fr; }
    .shipping-address { grid-column: auto; }
    .product-detail-images { margin-top: 44px; padding-top: 32px; }
    .detail-image-list { gap: 12px; }
    .detail-image-list figure { border-radius: 16px; }
    .detail-image-list img { min-height: 160px; }
    .auth-card { padding: 27px 20px; }
    .account-hero, .order-detail-head, .order-card { align-items: flex-start; flex-direction: column; }
    .account-meta { width: 100%; }
    .order-side, .order-total { width: 100%; justify-items: start; }
    .order-side { grid-template-columns: auto auto 1fr; align-items: center; }
    .order-side a { justify-self: end; }
    .order-item { grid-template-columns: 50px minmax(0,1fr); }
    .item-thumb { width: 50px; height: 50px; }
    .item-price { grid-column: 2; display: flex; justify-content: space-between; text-align: left; }
    .shipping-facts div { grid-template-columns: 1fr; gap: 4px; }
    .footer-grid { flex-direction: column; gap: 18px; }
    .footer-meta { align-items: flex-start; }
}

@media (max-width: 420px) {
    .main-nav a { padding-inline: 6px; font-size: 11px; }
    .product-grid { grid-template-columns: 1fr; }
    .product-media { height: 230px; }
    .feature-strip { grid-template-columns: 1fr; }
    .feature-strip div { border-right: 0; border-top: 1px solid var(--line); }
    .feature-strip div:first-child { border-top: 0; }
}
