:root {
    --ink: #20201c;
    --ink-soft: #56534a;
    --muted: #7e786b;
    --line: #ded8ca;
    --paper: #ffffff;
    --canvas: #f4f0e7;
    --canvas-deep: #e9e2d2;
    --brand: #2d2922;
    --brand-2: #7b4b2b;
    --accent: #b35f2d;
    --accent-soft: #f1dfcf;
    --danger: #a33b2e;
    --success: #4f6b45;
    --shadow: 0 8px 28px rgba(23, 36, 42, 0.08);
    --shadow-soft: 0 4px 16px rgba(23, 36, 42, 0.06);
    --radius: 8px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: 0;
}

body.admin-body {
    background: var(--canvas);
}

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

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

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

button {
    cursor: pointer;
}

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

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.topbar {
    background: var(--brand);
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.topbar-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar a {
    color: #fff;
}

.topbar a:hover {
    color: #f4c3a5;
}

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

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 168px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    flex: 0 0 auto;
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
}

.main-nav a {
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-size: 14px;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--brand);
    background: var(--canvas-deep);
}

.header-search {
    width: 230px;
    height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--canvas);
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 4px 0 14px;
    color: var(--ink);
}

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 8px;
    color: var(--ink);
    font-size: 14px;
}

.cart-link svg {
    width: 21px;
    height: 21px;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: inline-grid;
    place-items: center;
    background: #fff;
    color: var(--ink-soft);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
    border-color: var(--brand-2);
    color: var(--brand);
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

.icon-button.accent {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.icon-button.accent:hover {
    background: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
}

.icon-button.muted {
    border: 0;
    background: transparent;
    color: var(--muted);
}

.icon-button.danger {
    color: var(--danger);
}

.mobile-menu-button {
    display: none;
}

.flash-bar {
    min-height: 44px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 9px;
}

.flash-bar svg {
    width: 18px;
    height: 18px;
}

.flash-bar.success {
    background: #e7ead9;
    color: #486038;
}

.flash-bar.error {
    background: #fae9e7;
    color: #9e372f;
}

.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--brand);
    color: #fff;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
}

.hero-overlay {
    background: rgba(10, 25, 29, 0.52);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 64px 0;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.hero-eyebrow::before,
.section-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--accent);
}

.hero h1 {
    margin: 14px 0 16px;
    font-size: clamp(36px, 7vw, 68px);
    line-height: 1.08;
    font-weight: 800;
}

.hero p {
    max-width: 600px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.button svg {
    width: 18px;
    height: 18px;
}

.button-primary {
    background: var(--accent);
    color: #fff;
}

.button-primary:hover {
    background: #c96432;
}

.button-primary:disabled {
    cursor: not-allowed;
    background: #b9c0bd;
    transform: none;
}

.button-ghost {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.button-ghost-dark {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.button-ghost-dark:hover {
    background: var(--canvas-deep);
}

.button-block {
    width: 100%;
}

.button-large {
    min-height: 52px;
}

.button-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--brand-2);
    font-size: 13px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--brand-2);
    font-weight: 700;
}

.text-link svg {
    width: 16px;
    height: 16px;
}

.section {
    padding: 70px 0;
}

.section-soft {
    background: #eae5d9;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 5px 0 0;
    font-size: 30px;
    line-height: 1.2;
}

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

.category-card {
    min-height: 112px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover {
    border-color: var(--brand-2);
    box-shadow: var(--shadow-soft);
}

.category-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    flex: 0 0 auto;
}

.category-icon svg {
    width: 24px;
    height: 24px;
}

.category-card strong,
.category-card small {
    display: block;
}

.category-card small {
    color: var(--muted);
    margin-top: 2px;
}

.category-arrow {
    width: 18px;
    height: 18px;
    margin-left: auto;
    color: var(--muted);
}

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

.product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--canvas-deep);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.product-info {
    padding: 15px;
}

.product-category {
    display: block;
    color: var(--brand-2);
    font-size: 12px;
    font-weight: 700;
}

.product-info h3 {
    margin: 5px 0 3px;
    font-size: 16px;
    line-height: 1.35;
}

.product-info h3 a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-subtitle {
    min-height: 22px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-meta .price,
.detail-price strong {
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
}

.product-meta del,
.detail-price del {
    margin-left: 6px;
    color: var(--muted);
    font-size: 12px;
}

.out-of-stock {
    color: var(--muted);
    font-size: 13px;
}

.trust-band {
    background: var(--brand);
    color: #fff;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.trust-grid div {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    column-gap: 10px;
}

.trust-grid svg {
    width: 28px;
    height: 28px;
    grid-row: span 2;
    color: #f2bd9d;
}

.trust-grid strong,
.trust-grid span {
    display: block;
}

.trust-grid span {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.page-hero.compact {
    padding: 54px 0;
    background: #eae5d9;
    border-bottom: 1px solid var(--line);
}

.page-hero.compact h1 {
    margin: 7px 0 3px;
    font-size: 34px;
}

.page-hero.compact p {
    margin: 0;
    color: var(--muted);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 94px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.catalog-sidebar h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.catalog-sidebar a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--ink-soft);
}

.catalog-sidebar a:hover,
.catalog-sidebar a.active {
    background: var(--canvas-deep);
    color: var(--brand);
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.catalog-search {
    width: min(100%, 330px);
    height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.catalog-search input {
    min-width: 0;
    flex: 1;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.sort-form select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
}

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

.empty-state {
    min-height: 320px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    color: var(--muted);
}

.empty-state svg {
    width: 52px;
    height: 52px;
    color: #9cb0a8;
}

.empty-state h1,
.empty-state h3 {
    margin: 10px 0 4px;
    color: var(--ink);
}

.empty-state p {
    margin: 0 0 18px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.pagination a {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: #fff;
}

.pagination a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb svg {
    width: 14px;
    height: 14px;
}

.breadcrumb span {
    color: var(--ink);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 44px;
    align-items: start;
}

.product-gallery {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--canvas-deep);
}

.product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    padding-top: 12px;
}

.product-detail-info h1 {
    margin: 8px 0 6px;
    font-size: 34px;
    line-height: 1.2;
}

.product-detail-info .product-subtitle {
    min-height: auto;
    white-space: normal;
    font-size: 16px;
}

.detail-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 18px 0;
}

.detail-price strong {
    font-size: 30px;
}

.detail-price del {
    font-size: 15px;
}

.detail-price span {
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.detail-stock {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--success);
    font-size: 14px;
}

.detail-stock svg {
    width: 18px;
    height: 18px;
}

.purchase-form {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
}

.quantity-picker {
    height: 46px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.quantity-picker button {
    width: 42px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    display: grid;
    place-items: center;
}

.quantity-picker button:hover {
    background: var(--canvas-deep);
}

.quantity-picker button svg {
    width: 15px;
    height: 15px;
}

.quantity-picker input {
    width: 54px;
    height: 100%;
    border: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: center;
    outline: 0;
    -moz-appearance: textfield;
}

.quantity-picker input::-webkit-outer-spin-button,
.quantity-picker input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-picker.small {
    height: 38px;
}

.quantity-picker.small button {
    width: 34px;
}

.quantity-picker.small input {
    width: 42px;
}

.detail-assurance {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.detail-assurance span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.detail-assurance svg {
    width: 16px;
    height: 16px;
    color: var(--brand-2);
}

.description-panel,
.prose-panel {
    max-width: 900px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink-soft);
    white-space: normal;
}

.prose-panel {
    max-width: 820px;
    font-size: 16px;
}

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

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

.cart-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.cart-thumb {
    width: 96px;
    height: 76px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--canvas-deep);
}

.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-info {
    min-width: 0;
}

.cart-info a,
.cart-info span,
.cart-info strong {
    display: block;
}

.cart-info a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.cart-info span {
    color: var(--muted);
    font-size: 12px;
}

.cart-info strong {
    margin-top: 5px;
    color: var(--accent);
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-line-total {
    min-width: 90px;
    text-align: right;
    color: var(--accent);
    font-size: 17px;
}

.cart-summary,
.checkout-summary {
    position: sticky;
    top: 94px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.cart-summary h3,
.checkout-summary h3 {
    margin: 0 0 14px;
    font-size: 17px;
}

.cart-summary > div:not(.summary-total),
.checkout-summary > div:not(.summary-total) {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--ink-soft);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 12px 0 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

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

.cart-summary .button + .button,
.checkout-summary .button + .button {
    margin-top: 10px;
}

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

.form-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.form-panel h2,
.panel-heading h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

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

.form-panel label,
.login-card label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.form-panel label span,
.login-card label span {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.form-panel input,
.form-panel select,
.form-panel textarea,
.login-card input,
.status-form select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: 0;
    background: #fff;
    color: var(--ink);
}

.form-panel textarea {
    resize: vertical;
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus,
.login-card input:focus,
.status-form select:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(45, 111, 104, 0.1);
}

.check-label {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
}

.check-label input {
    width: 18px;
    min-height: 18px;
}

.check-label span {
    font-weight: 400 !important;
}

.checkout-items {
    display: grid;
    gap: 10px;
}

.checkout-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--canvas);
}

.checkout-item img {
    width: 54px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
}

.checkout-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-item small {
    color: var(--muted);
}

.checkout-item strong {
    color: var(--accent);
}

.checkout-summary p {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.checkout-summary p svg {
    width: 16px;
    height: 16px;
    color: var(--brand-2);
}

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

.payment-option {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin: 0 !important;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-option > i {
    width: 24px;
    height: 24px;
    color: var(--brand-2);
    flex: 0 0 auto;
}

.payment-option span {
    flex: 1;
}

.payment-option strong,
.payment-option small {
    display: block;
}

.payment-option small {
    color: var(--muted);
    font-size: 12px;
}

.payment-option b {
    width: 18px;
    height: 18px;
    border: 2px solid var(--line);
    border-radius: 50%;
    position: relative;
}

.payment-option input:checked ~ b {
    border-color: var(--brand-2);
}

.payment-option input:checked ~ b::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--brand-2);
}

.success-section {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.success-card {
    width: min(100%, 620px);
    padding: 46px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}

.success-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e7ead9;
    color: var(--success);
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.success-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.success-card > p {
    margin: 0 0 24px;
    color: var(--muted);
}

.order-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 auto 18px;
}

.order-meta div {
    padding: 12px;
    border-radius: var(--radius);
    background: var(--canvas);
}

.order-meta span,
.order-meta strong {
    display: block;
}

.order-meta span {
    color: var(--muted);
    font-size: 12px;
}

.pickup-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: -6px auto 18px;
}

.pickup-meta div {
    padding: 12px;
    border-radius: var(--radius);
    background: var(--canvas);
    text-align: left;
}

.pickup-meta span,
.pickup-meta strong {
    display: block;
}

.pickup-meta span {
    color: var(--muted);
    font-size: 12px;
}

.success-items {
    margin: 0 auto 22px;
    text-align: left;
    border-top: 1px solid var(--line);
}

.success-items div {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pay-placeholder {
    width: min(100%, 620px);
    margin: 20px auto;
    padding: 44px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}

.pay-placeholder-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.pay-placeholder-icon svg {
    width: 34px;
    height: 34px;
}

.pay-placeholder h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.pay-placeholder > p {
    margin: 0;
    color: var(--muted);
}

.pay-amount {
    margin: 22px 0 16px;
    color: var(--accent);
    font-size: 34px;
    font-weight: 800;
}

.pay-state {
    margin: 0 auto 22px;
    padding: 12px 14px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--canvas);
    color: var(--ink-soft);
}

.pay-state svg {
    width: 18px;
    height: 18px;
    color: var(--brand-2);
}

.pay-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.site-footer {
    background: var(--brand);
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 36px;
    padding: 56px 0 40px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    font-size: 15px;
}

.footer-grid a,
.footer-grid span {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-grid svg {
    width: 16px;
    height: 16px;
}

.footer-brand {
    min-width: 0;
}

.footer-brand strong {
    color: #fff;
}

.footer-grid p {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.footer-bottom {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
}

/* Admin */
.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 14px;
    background: var(--brand);
    color: #fff;
}

.admin-brand {
    min-width: 0;
    padding: 0 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-brand .brand-mark {
    background: rgba(255, 255, 255, 0.14);
}

.admin-sidebar nav {
    display: grid;
    gap: 5px;
    margin-top: 18px;
}

.admin-sidebar nav a {
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar nav a svg {
    width: 18px;
    height: 18px;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    min-height: 68px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 19px;
}

.admin-topbar .mobile-menu-button {
    display: none;
}

.admin-user {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 13px;
}

.admin-user svg {
    width: 20px;
    height: 20px;
    color: var(--brand-2);
}

.admin-content {
    padding: 26px 28px 50px;
}

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--brand);
}

.admin-login {
    width: min(100% - 32px, 410px);
}

.login-card {
    padding: 36px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.login-mark {
    margin-bottom: 18px;
}

.login-card h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

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

.login-card .button {
    margin-top: 6px;
}

.login-back {
    display: block;
    margin-top: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.stat-card span,
.stat-card strong,
.stat-card small {
    display: block;
}

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

.stat-card strong {
    margin: 6px 0;
    color: var(--brand);
    font-size: 28px;
}

.stat-card small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
}

.stat-card small svg {
    width: 15px;
    height: 15px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-heading h2 {
    margin: 0;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

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

.admin-table th {
    background: var(--canvas);
    color: var(--ink-soft);
    font-size: 12px;
}

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

.admin-table tbody tr:hover td {
    background: #f7f3ea;
}

.table-product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.table-product img {
    width: 52px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.table-product strong,
.table-product small {
    display: block;
    max-width: 210px;
}

.table-product strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-product small {
    color: var(--muted);
}

.table-actions {
    display: flex;
    gap: 6px;
}

.table-actions form {
    margin: 0;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: #f1dfcf;
    color: #8e4a22;
}

.status-paid {
    background: #e8eef9;
    color: #315b9d;
}

.status-shipped {
    background: #e7ead9;
    color: #486038;
}

.status-completed {
    background: #e4f0e6;
    color: #3c7441;
}

.status-cancelled {
    background: #fae9e7;
    color: #9e372f;
}

.config-state {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1dfcf;
    color: #8e4a22;
    font-size: 12px;
    font-weight: 700;
}

.config-state.on {
    background: #e7ead9;
    color: #486038;
}

.payment-settings-form textarea {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
}

.status-form label {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
}

.status-form label span {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.quick-panel {
    display: grid;
    gap: 8px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--canvas);
}

.quick-action:hover {
    background: var(--canvas-deep);
}

.quick-action > svg {
    width: 22px;
    height: 22px;
    color: var(--brand-2);
}

.quick-action strong,
.quick-action small {
    display: block;
}

.quick-action small {
    color: var(--muted);
}

.admin-form {
    display: grid;
    gap: 16px;
    max-width: 920px;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.order-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.order-filter a {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: var(--ink-soft);
    font-size: 13px;
}

.order-filter a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.detail-actions {
    margin-bottom: 16px;
}

.detail-list {
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
}

.status-form {
    display: grid;
    gap: 12px;
}

@media (max-width: 1080px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .main-nav {
        gap: 0;
    }

    .header-inner {
        gap: 16px;
    }

    .header-search {
        width: 190px;
    }
}

@media (max-width: 860px) {
    .mobile-menu-button {
        display: inline-grid;
    }

    .header-inner {
        gap: 12px;
    }

    .main-nav {
        position: fixed;
        inset: 68px 0 auto 0;
        z-index: 20;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .header-search {
        width: min(220px, 30vw);
        margin-left: auto;
    }

    .cart-link span {
        display: none;
    }

    .cart-link {
        padding: 0;
    }

    .hero {
        min-height: 480px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        align-items: center;
    }

    .catalog-sidebar h3 {
        width: 100%;
        margin-bottom: 4px;
    }

    .catalog-sidebar a {
        display: inline-flex;
        padding: 8px 10px;
        border: 1px solid var(--line);
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary,
    .checkout-summary {
        position: static;
    }

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

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: 248px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-topbar .mobile-menu-button {
        display: inline-grid;
    }

    .admin-content {
        padding: 20px 16px 40px;
    }

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

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        min-height: 64px;
    }

    .brand {
        min-width: 0;
    }

    .brand strong {
        font-size: 15px;
    }

    .brand small {
        font-size: 10px;
    }

    .header-search {
        display: none;
    }

    .main-nav {
        top: 64px;
    }

    .hero {
        min-height: 460px;
        text-align: left;
    }

    .hero-content {
        padding: 52px 0;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 48px 0;
    }

    .section-heading {
        align-items: start;
    }

    .section-heading h2 {
        font-size: 24px;
    }

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

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-meta .price {
        font-size: 17px;
    }

    .product-subtitle {
        font-size: 12px;
    }

    .trust-grid {
        gap: 16px;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-search {
        width: 100%;
    }

    .sort-form {
        justify-content: space-between;
    }

    .product-detail-info h1 {
        font-size: 28px;
    }

    .purchase-form {
        align-items: stretch;
        flex-direction: column;
    }

    .quantity-picker {
        width: 100%;
    }

    .quantity-picker input {
        flex: 1;
    }

    .cart-item {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .cart-thumb {
        width: 72px;
        height: 58px;
    }

    .cart-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }

    .cart-line-total {
        grid-column: 2 / 3;
        text-align: left;
    }

    .cart-item > form:last-child {
        grid-column: 3;
        grid-row: 1;
    }

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

    .order-meta {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 42px 0 28px;
    }

    .footer-bottom {
        align-items: start;
        flex-direction: column;
        justify-content: center;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    .admin-user span {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-list div {
        grid-template-columns: 86px minmax(0, 1fr);
    }
}
