:root {
    color-scheme: light;
    --bg: #f7f4ee;
    --card: #fffaf2;
    --text: #1f2933;
    --muted: #667085;
    --primary: #d35400;
    --primary-dark: #a84200;
    --line: #eadfce;
    --shadow: 0 24px 60px rgba(99, 56, 20, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.hero {
    min-height: 580px;
    padding: 24px clamp(20px, 5vw, 72px) 88px;
    background:
            radial-gradient(circle at 82% 38%, rgba(211, 84, 0, 0.34), transparent 32%),
            linear-gradient(135deg, #1f2933, #7b3f00);
    color: white;
}

.topbar,
.nav-actions,
.hero-buttons,
.toolbar,
.cart-header,
.cart-total {
    display: flex;
    align-items: center;
}

.topbar {
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: white;
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
}

.nav-actions {
    gap: 18px;
    flex-wrap: wrap;
}

.nav-actions a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-weight: 600;
}

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
}

.hero-content {
    max-width: 760px;
    padding-top: 120px;
}

.eyebrow,
.section-label {
    color: #ffbf85;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.98;
    margin: 14px 0 22px;
}

h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero-copy {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.18rem;
    line-height: 1.8;
}

.hero-buttons {
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.button {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
}

.primary {
    background: var(--primary);
    color: #fff;
}

.primary:hover {
    background: var(--primary-dark);
}

.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.legacy-main {
    width: min(1180px, calc(100% - 32px));
    margin: -54px auto 80px;
    display: grid;
    gap: 24px;
}

.panel {
    background: rgba(255, 250, 242, 0.94);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 36px);
}

.import-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.import-panel p,
.template-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.upload-box {
    border: 2px dashed #e0b98f;
    border-radius: 24px;
    min-height: 190px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 26px;
    cursor: pointer;
    background: #fff7ec;
}

.upload-box input {
    display: none;
}

.upload-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ffe4ca;
    color: var(--primary);
    font-size: 1.7rem;
}

.upload-box small {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px;
    text-align: left;
}

th {
    background: #fff2df;
    color: #7a3b00;
}

.toolbar {
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.search-field,
.sort-field {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: var(--muted);
}

.search-field {
    flex: 1 1 360px;
}

.sort-field {
    flex: 0 1 240px;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    background: #fff;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.product-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(99, 56, 20, 0.1);
    display: flex;
    flex-direction: column;
}

.product-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    padding: clamp(8px, 1.3vw, 16px);
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.product-info {
    padding: 18px;
    display: grid;
    gap: 10px;
    flex: 1;
}

.product-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.price {
    color: var(--primary);
    font-size: 1.45rem;
    font-weight: 900;
}

.add-cart {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: #1f2933;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.add-cart:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cart {
    position: sticky;
    bottom: 20px;
}

.cart-header,
.cart-total {
    justify-content: space-between;
    gap: 16px;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
}

.cart-items {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.cart-total {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    font-size: 1.2rem;
}

.checkout {
    width: 100%;
    margin-top: 18px;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 36px;
    border: 1px dashed var(--line);
    border-radius: 22px;
    background: #fff;
}

.quotation-panel {
    display: grid;
    gap: 18px;
}

.quotation-wrap {
    max-height: 420px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
}

.quotation-table {
    min-width: 980px;
    font-size: 0.92rem;
}

.quotation-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.quotation-table td:nth-child(5),
.quotation-table th:nth-child(5) {
    color: #6f17c5;
    font-weight: 800;
}

.note {
    border-left: 3px solid var(--primary);
    padding-left: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Procurement storefront and order management */

.site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand-dark {
    color: var(--text);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.site-header nav a {
    color: var(--muted);
    font-weight: 750;
    text-decoration: none;
}

.site-header nav a.active {
    color: var(--primary);
}

.site-header .admin-link {
    border-left: 1px solid var(--line);
    padding-left: 16px;
}

.home-hero,
.category-hero,
.page-intro {
    padding: clamp(48px, 8vw, 100px) clamp(20px, 7vw, 84px);
    background: linear-gradient(120deg, #25313a, #725029);
    color: #fff;
}

.home-hero {
    min-height: 420px;
    background:
            radial-gradient(circle at 82% 42%, rgba(211, 84, 0, 0.34), transparent 34%),
            linear-gradient(100deg, #1b252b, #483016);
}

.home-hero h1,
.category-hero h1,
.page-intro h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin: 10px 0 18px;
}

.home-hero p:not(.section-label),
.category-hero p:not(.section-label),
.page-intro p:not(.section-label) {
    max-width: 690px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.home-hero .section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin: 0;
    color: #ffb476;

    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-hero .section-label::before {
    content: "";
    width: 30px;
    height: 2px;
    background: currentColor;
}

.category-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 46px auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.category-card {
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(99, 56, 20, 0.1);
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card div {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.category-card p {
    color: var(--primary);
    font-weight: 800;
    margin: 0;
}

.category-card h2 {
    font-size: 1.5rem;
    margin: 0;
}

.category-card span {
    color: var(--muted);
    min-height: 45px;
}

.category-card strong {
    margin-top: 7px;
    color: var(--primary);
}

.workflow {
    width: min(1000px, calc(100% - 32px));
    margin: 70px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.workflow div {
    border-top: 2px solid var(--primary);
    padding-top: 16px;
}

.workflow b {
    color: var(--primary);
}

.workflow h3 {
    margin-bottom: 5px;
}

.workflow p {
    color: var(--muted);
    line-height: 1.6;
}

.category-hero {
    max-width: 1180px;
    margin: 20px auto 30px;
    border-radius: 28px;
    padding-block: 50px;
}

.buy-layout {
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
}

/* 商品图片轮播 */
.product-gallery {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.gallery-main {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: #ffffff;
}

.detail-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    padding: clamp(14px, 4vw, 28px);
    border-radius: 25px;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.gallery-button {
    position: absolute;
    top: 50%;
    z-index: 2;

    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;

    color: #ffffff;
    background: rgba(20, 29, 36, 0.12);

    font-size: 28px;
    line-height: 1;
    cursor: pointer;

    transform: translateY(-50%);
    transition:
            background 0.2s ease,
            opacity 0.2s ease;
}

.gallery-button:hover {
    background: rgba(20, 29, 36, 0.55);
}

.gallery-button:active {
    background: rgba(211, 84, 0, 0.65);
}

.gallery-button--previous {
    left: 10px;
}

.gallery-button--next {
    right: 10px;
}

.gallery-button[hidden] {
    display: none;
}

.gallery-status {
    margin-top: 12px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.buy-card,
.checkout-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 25px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.buy-card h2 {
    margin: 10px 0;
}

.detail-parameter {
    line-height: 1.8;
    color: var(--muted);
}

.detail-price {
    display: block;
    font-size: 2rem;
    color: var(--primary);
    margin: 0;
}

.detail-price small {
    font-size: 1rem;
}

.detail-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0;
}

.price-info-button {
    position: relative;
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 0;
    place-items: center;
    border: 1px solid #c8b9a8;
    border-radius: 50%;
    color: var(--muted);
    background: #ffffff;
    font: 700 14px/1 Georgia, serif;
    cursor: help;
}

.price-info-button:hover,
.price-info-button:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
    outline: none;
}

.price-info-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 5;
    width: max-content;
    max-width: min(260px, 72vw);
    padding: 9px 12px;
    border-radius: 9px;
    color: #ffffff;
    background: #25313a;
    box-shadow: 0 8px 22px rgba(20, 29, 36, 0.2);
    font: 600 13px/1.45 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 5px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.price-info-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 6px solid transparent;
    border-top-color: #25313a;
    transform: translateX(-50%);
}

.price-info-button:hover .price-info-tooltip,
.price-info-button:focus-visible .price-info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.tier-price-panel {
    width: 92%;
    margin: 14px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.tier-price-title {
    padding: 9px 12px;
    color: var(--text);
    font-weight: 800;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.tier-price-header,
.tier-price-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(150px, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.tier-price-header {
    color: var(--muted);
    background: #f8f4ee;
    font-size: 13px;
    font-weight: 700;
}

.tier-price-header span:last-child,
.tier-price-value {
    text-align: right;
}

.tier-price-value {
    display: block;
    min-width: 0;
    color: var(--primary);
    font-weight: 800;
    white-space: nowrap;
}

.tier-price-amount {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.tier-price-unit {
    margin-left: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.tier-price-row:last-child {
    border-bottom: 0;
}

.tier-price-row.is-active {
    color: var(--primary);
    background: #fff1e7;
    font-weight: 800;
}

.tier-price-row.is-active .tier-price-unit {
    color: var(--primary);
}

@media (max-width: 430px) {
    .tier-price-header,
    .tier-price-row {
        grid-template-columns: minmax(70px, 0.8fr) minmax(125px, 1.2fr);
        padding-inline: 10px;
    }
}

.purchase-form,
#checkoutForm {
    display: grid;
    gap: 13px;
}

.purchase-form label,
#checkoutForm label,
.order-line label,
.admin-order label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
}

.purchase-form small {
    color: var(--muted);
}

.line-total {
    display: flex;
    justify-content: space-between;
}

.form-message {
    color: var(--primary);
    min-height: 1.3em;
    font-weight: 700;
}

textarea {
    min-height: 90px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    font: inherit;
    resize: vertical;
}

#cartPage,
.admin-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 80px;
}

.admin-topbar {
    display: flex;
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.admin-topbar .brand,
.admin-login-brand {
    color: var(--text);
    text-decoration: none;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
}

.admin-logout {
    padding: 10px 16px;
}

.admin-login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(211, 90, 14, 0.12), transparent 30%),
        linear-gradient(145deg, #f8f4ee, #eee4d7);
}

.admin-login-shell {
    display: grid;
    width: min(460px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 36px 0;
    align-content: center;
    gap: 22px;
}

.admin-login-brand {
    justify-self: center;
}

.admin-login-card {
    padding: clamp(28px, 7vw, 44px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 60px rgba(65, 43, 24, 0.14);
}

.admin-login-card h1 {
    margin: 8px 0 12px;
    color: var(--text);
    font-size: clamp(30px, 8vw, 42px);
}

.admin-login-card > p:not(.section-label) {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.7;
}

.admin-login-form {
    display: grid;
    gap: 16px;
}

.admin-login-form label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 750;
}

.admin-login-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    font: inherit;
}

.admin-login-form input:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(211, 90, 14, 0.13);
}

.admin-login-form .button {
    width: 100%;
    margin-top: 4px;
}

.admin-back-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.admin-login-form small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.admin-link-button {
    margin-top: 12px;
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.admin-link-button:hover,
.admin-link-button:focus-visible {
    color: var(--primary);
    text-decoration: underline;
}

.page-intro {
    width: 100%;
    margin: 20px 0 30px;
    border-radius: 28px;
    padding-block: 42px;
}

.cart-page-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 28px;
    align-items: start;
}

.order-lines {
    display: grid;
    gap: 14px;
}

.order-line {
    display: grid;
    grid-template-columns: 72px 1fr 120px auto auto;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 13px;
}

.order-line img {
    width: 72px;
    height: 72px;
    border-radius: 13px;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.order-line small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.remove-line {
    border: 0;
    background: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
}

.checkout-total strong {
    color: var(--primary);
}

.admin-orders {
    display: grid;
    gap: 16px;
}

.admin-order {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
}

.admin-order h2,
.admin-order p {
    margin: 5px 0;
}

.admin-order p,
.admin-order small {
    color: var(--muted);
}

.admin-order label {
    min-width: 140px;
}

.admin-panel {
    margin-bottom: 28px;
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.admin-panel__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.admin-panel__heading h2,
.admin-panel__heading p {
    margin: 5px 0 0;
}

.admin-panel__heading > p {
    max-width: 620px;
    color: var(--muted);
    line-height: 1.6;
}

.import-form {
    display: flex;
    align-items: end;
    gap: 16px;
}

.file-picker {
    display: grid;
    flex: 1;
    gap: 8px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: #fff;
}

.file-picker input {
    padding: 8px 0;
}

.file-picker small,
.import-actions span,
.import-preview > p {
    color: var(--muted);
}

.import-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.import-summary div {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 14px;
    background: #f4eee6;
}

.import-summary strong {
    color: var(--primary);
    font-size: 24px;
}

.import-summary span {
    color: var(--muted);
    font-size: 13px;
}

.import-warning {
    margin: 12px 0;
    padding: 14px 16px;
    color: #704200;
    background: #fff3d8;
    border: 1px solid #efd39b;
    border-radius: 12px;
    line-height: 1.6;
}

.admin-product-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.admin-product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-product-table th,
.admin-product-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.admin-product-table th {
    color: var(--muted);
    background: #f8f4ee;
    white-space: nowrap;
}

.admin-product-table tr:last-child td {
    border-bottom: 0;
}

.admin-product-table img {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.admin-product-table tr.is-disabled {
    color: var(--muted);
    background: #faf8f5;
}

.admin-product-table tr.is-disabled img {
    opacity: 0.55;
}

.product-status-badge {
    display: inline-flex;
    align-items: center;
    min-width: 58px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.product-status-badge.is-active {
    color: #226b43;
    background: #e6f5ec;
}

.product-status-badge.is-inactive {
    color: #6d6a66;
    background: #ece9e5;
}

.product-availability-button {
    min-width: 82px;
    padding: 8px 11px;
    border: 1px solid currentColor;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.product-availability-button.is-delist {
    color: #b23b2a;
}

.product-availability-button.is-relist {
    color: #24764a;
}

.product-availability-button:disabled {
    cursor: wait;
    opacity: 0.5;
}

.import-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.super-admin-only[hidden] {
    display: none !important;
}

.administrator-create-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 16px;
}

.administrator-create-form label {
    display: grid;
    gap: 8px;
}

.administrator-create-form .button {
    min-height: 49px;
}

.admin-mail-status {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.administrator-table-wrap {
    margin-top: 18px;
}

.administrator-role {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #4f5966;
    background: #ece9e5;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.administrator-role.is-super {
    color: #8a3b00;
    background: #fff0df;
}

@media (max-width: 850px) {
    .site-header {
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .buy-layout,
    .cart-page-grid {
        grid-template-columns: 1fr;
    }

    .order-line {
        grid-template-columns: 60px 1fr;
    }

    .order-line img {
        width: 60px;
        height: 60px;
    }

    .order-line label,
    .order-line > strong,
    .remove-line {
        grid-column: 2;
    }

    .admin-order {
        flex-direction: column;
    }

    .admin-topbar {
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-account {
        width: 100%;
        justify-content: space-between;
    }

    .admin-panel__heading,
    .import-form,
    .import-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .import-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .administrator-create-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    .import-panel {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-content {
        padding-top: 70px;
    }
}

@media (max-width: 520px) {
    .category-grid,
    .workflow {
        grid-template-columns: 1fr;
    }

    .site-header nav {
        gap: 10px;
        font-size: 0.9rem;
    }

    .home-hero h1,
    .category-hero h1,
    .page-intro h1 {
        font-size: 2.5rem;
    }
}

.site-footer {
    padding: 28px 20px;
    color: #aab4c4;
    text-align: center;
    background: #101827;
}

.site-footer p {
    margin: 0;
}

/* =========================
   首页整体
   ========================= */

#homePage {
    width: 100%;
    overflow: hidden;
}

.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 620px;
    padding: 90px max(24px, calc((100% - 1180px) / 2));
    color: #ffffff;
    background:
            radial-gradient(
                    circle at 82% 42%,
                    rgba(224, 126, 52, 0.4) 0%,
                    rgba(146, 87, 31, 0.2) 24%,
                    transparent 42%
            ),
            linear-gradient(
                    100deg,
                    #141d24 0%,
                    #2d261d 58%,
                    #5c3816 100%
            );
}

.home-hero__content {
    position: relative;
    z-index: 1;

    width: min(1180px, 100%);
    max-width: none;
}

.home-hero h1 {
    width: 100%;
    max-width: none;
    margin: 28px 0 24px;

    color: #ffffff;
    font-size: clamp(42px, 4.2vw, 64px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;

    white-space: nowrap;
}

.home-hero h1 span {
    display: inline;
    margin: 0;

    color: #ff9f68;
    font: inherit;
}

.home-hero__description {
    width: 100%;
    max-width: 960px;
    margin: 0;

    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.7;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.home-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 64px;

    max-width: 720px;
    margin-top: 60px;
    padding-top: 30px;

    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.home-hero__stats div {
    display: grid;
    gap: 6px;
    min-width: 120px;
}

.home-hero__stats strong {
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
}

.home-hero__stats span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
}


/* =========================
   首页通用标题
   ========================= */

.home-categories,
.workflow-section,
.home-cta {
    width: min(1180px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}

.home-categories {
    padding: 86px 0 50px;
}

.home-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 34px;
}

.home-section-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 4vw, 42px);
}

.home-section-heading > p {
    max-width: 500px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}


/* =========================
   商品分类卡片
   ========================= */

.category-grid {
    width: 100%;
    margin: 0;
}

.category-card {
    position: relative;
    background: #ffffff;
    transition:
            transform 0.25s ease,
            box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 46px rgba(74, 45, 19, 0.16);
}

/* Image-fit v2: keep intrinsic image dimensions out of the card layout.
   A ratio box sizes the cover; the absolutely positioned image fits inside it.
   Do not put the image back into an auto-height grid with height: 100%. */
.category-card .category-card__image {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 4 / 3;
    padding: 0;
    gap: 0;
    overflow: hidden;
    background: #ffffff;
}

.category-card .category-card__image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    padding: clamp(8px, 1.3vw, 16px);
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.category-card:hover .category-card__image img {
    transform: none;
}

.category-card__count {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(20, 29, 36, 0.75);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.category-card__content {
    padding: 22px;
}

.category-card__name {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.category-card__description {
    display: block;
    min-height: 74px;
    color: var(--muted);
    line-height: 1.6;
}

.category-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.category-card__footer strong {
    margin: 0;
    color: var(--primary);
}

.category-card__arrow {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}


/* =========================
   采购流程
   ========================= */

.workflow-section {
    padding: 60px 0 90px;
}

.workflow {
    width: 100%;
    margin: 0;
}

.workflow-card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(99, 56, 20, 0.08);
}

.workflow-number {
    position: absolute;
    top: 22px;
    right: 24px;
    color: #e4d5c3;
    font-size: 34px;
    font-weight: 900;
}

.workflow-icon {
    display: grid;
    width: 50px;
    height: 50px;
    margin-bottom: 22px;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: var(--primary);
    font-size: 24px;
    font-weight: 800;
}

.workflow-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.workflow-card p {
    margin: 0;
}


/* =========================
   首页底部引导
   ========================= */

.home-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 90px;
    padding: 42px;
    border-radius: 28px;
    color: #ffffff;
    background:
            linear-gradient(120deg, #202c35, #725029);
}

.home-cta h2 {
    margin: 4px 0 10px;
    color: #ffffff;
    font-size: 32px;
}

.home-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.home-cta .button {
    flex-shrink: 0;
}


/* =========================
   手机端
   ========================= */

@media (max-width: 760px) {
    .home-hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .home-hero h1 {
        font-size: 42px;
        letter-spacing: -1px;
    }

    .home-hero__stats {
        gap: 26px;
    }

    .home-section-heading,
    .home-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-categories {
        padding-top: 60px;
    }

    .category-card__description {
        min-height: auto;
    }

    .home-cta {
        padding: 30px 24px;
    }
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.language-switcher select {
    width: auto;
    min-width: 110px;
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background-color: #ffffff;
    cursor: pointer;
}

@media (max-width: 850px) {
    .language-switcher {
        width: 100%;
    }

    .language-switcher select {
        flex: 1;
    }
}

/* 桌面端导航栏保持一行 */
.site-header {
    width: min(1400px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-header .brand {
    flex-shrink: 0;
    white-space: nowrap;
}

.site-header nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    white-space: nowrap;
}

.site-header nav a {
    flex-shrink: 0;
}

.nav-more {
    position: relative;
    flex-shrink: 0;
}

.nav-more summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-weight: 750;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nav-more summary::-webkit-details-marker {
    display: none;
}

.nav-more.active summary,
.nav-more[open] summary,
.nav-more summary:hover {
    color: var(--primary);
}

.nav-more__arrow {
    display: inline-block;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.nav-more[open] .nav-more__arrow {
    transform: rotate(180deg);
}

.nav-more__menu {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 12px);
    right: 0;
    display: grid;
    min-width: 210px;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(45, 31, 18, 0.16);
}

.site-header nav .nav-more__link {
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
}

.site-header nav .nav-more__link:hover,
.site-header nav .nav-more__link.active {
    color: var(--primary);
    background: rgba(211, 91, 18, 0.08);
}

.language-switcher {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    width: auto;
    white-space: nowrap;
}

.language-switcher select {
    width: 140px;
    min-width: 140px;
}

@media (max-width: 1050px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 16px 0;
    }

    .site-header nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-more__menu {
        right: auto;
        left: 0;
    }
}

@media (max-width: 600px) {
    .site-header nav {
        gap: 12px;
    }

    .language-switcher {
        width: 100%;
    }

    .language-switcher select {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 1000px) {
    .home-hero h1 {
        font-size: clamp(38px, 6vw, 56px);
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .home-hero h1 {
        font-size: 42px;
        line-height: 1.05;
    }

    .home-hero h1 span {
        display: inline;
    }
}

/* ==============================
   RFQ提交成功页面
   ============================== */

.success-page {
    min-height: calc(100vh - 90px);
    padding: 80px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
            radial-gradient(
                    circle at 50% 10%,
                    rgba(226, 90, 0, 0.08),
                    transparent 38%
            ),
            #f7f4ef;
}

.success-card {
    width: min(680px, 100%);
    padding: 64px 72px;
    text-align: center;
    background: rgba(255, 252, 247, 0.96);
    border: 1px solid #eadbca;
    border-radius: 30px;
    box-shadow:
            0 30px 80px rgba(20, 29, 36, 0.11),
            0 8px 24px rgba(20, 29, 36, 0.05);
}

.success-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #d94d00, #f47a19);
    border-radius: 50%;
    box-shadow: 0 14px 32px rgba(217, 77, 0, 0.25);
}

.success-icon svg {
    width: 42px;
    height: 42px;
}

.success-label {
    margin: 0 0 14px;
    color: #d94d00;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.success-card h1 {
    margin: 0;
    color: #162333;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.success-description {
    max-width: 540px;
    margin: 22px auto 0;
    color: #617086;
    font-size: 17px;
    line-height: 1.75;
}

.success-reference {
    margin: 34px 0;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #617086;
    background: #f4eee6;
    border: 1px solid #eadbca;
    border-radius: 16px;
}

.success-reference strong {
    color: #162333;
    font-size: 17px;
    letter-spacing: 0.03em;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.success-actions .button {
    min-width: 180px;
    padding: 15px 24px;
}

.success-secondary {
    color: #162333;
    background: transparent;
    border: 1px solid #b9b1a8;
}

.success-secondary:hover {
    color: #ffffff;
    background: #162333;
    border-color: #162333;
}

.success-note {
    margin: 30px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #7a8491;
    font-size: 13px;
}

.success-note-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: #35a36f;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(53, 163, 111, 0.12);
}

@media (max-width: 640px) {
    .success-page {
        padding: 40px 16px;
    }

    .success-card {
        padding: 46px 24px;
        border-radius: 22px;
    }

    .success-card h1 {
        font-size: 34px;
    }

    .success-reference {
        flex-direction: column;
        gap: 8px;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .button {
        width: 100%;
    }
}

[data-cart-count][hidden] {
    display: none !important;
}

/* ==============================
   商品联系页面
   ============================== */

.contact-page {
    width: min(1180px, calc(100% - 32px));
    margin: 20px auto 80px;
}

.contact-hero {
    padding: clamp(38px, 6vw, 68px);
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(120deg, #25313a, #725029);
}

.contact-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
}

.contact-hero > p:not(.section-label) {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.7;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
    margin-top: 30px;
}

.contact-method-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-method-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.contact-method-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    color: #25313a;
    background: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.contact-method-card span:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.contact-method-card small {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.contact-method-card strong {
    overflow-wrap: anywhere;
    font-size: 16px;
}

.contact-content {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    margin-top: 28px;
    align-items: start;
}

.contact-product-card,
.contact-inquiry-form,
.contact-empty {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.contact-product-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    padding: 26px;
}

.contact-product-card > .section-label {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--primary);
    font-size: 13px;
}

.contact-product-card img {
    display: block;
    width: 150px;
    height: 150px;
    padding: 10px;
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
}

.contact-product-card h2 {
    margin: 8px 0 16px;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.contact-product-card p {
    margin: 8px 0;
    color: var(--muted);
}

.contact-reference-price {
    color: var(--primary) !important;
    font-size: 1.5rem;
    font-weight: 800;
}

.contact-reference-price small {
    font-size: 0.9rem;
}

.contact-inquiry-form {
    display: grid;
    gap: 16px;
    padding: 30px;
}

.contact-inquiry-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.contact-inquiry-form textarea {
    min-height: 150px;
}

.contact-send-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.whatsapp-button {
    color: #ffffff;
    background: #168a53;
}

.whatsapp-button:hover {
    background: #117141;
}

.contact-send-actions .button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.contact-send-note {
    color: var(--muted);
    line-height: 1.5;
}

.contact-empty {
    max-width: 720px;
    margin: 90px auto;
    padding: 50px;
    text-align: center;
}

.contact-empty p {
    margin: 18px 0 26px;
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 800px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .contact-methods,
    .contact-send-actions {
        grid-template-columns: 1fr;
    }

    .contact-product-card {
        grid-template-columns: 96px minmax(0, 1fr);
        padding: 20px;
    }

    .contact-product-card img {
        width: 96px;
        height: 96px;
    }

    .contact-inquiry-form {
        padding: 22px;
    }
}

/* ==============================
   全站图片自适应
   ============================== */

img {
    max-width: 100%;
    image-rendering: auto;
}

/* 采购单、后台列表及联系页缩略图均保持原始比例 */
.order-line img,
.admin-product-table img,
.contact-product-card img {
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

@media (max-width: 600px) {
    .detail-image {
        padding: 14px;
    }
}
