:root {
  --coral: #f46f5d;
  --coral-dark: #d95343;
  --ink: #1f2933;
  --muted: #6f7782;
  --line: #e6e8eb;
  --surface: #ffffff;
  --canvas: #f4f6f7;
  --teal: #218b87;
  --gold: #d69a29;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.store-body { min-height: 100vh; background: var(--canvas); }
.store-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.header-top { display: flex; align-items: center; justify-content: space-between; width: min(1160px, calc(100% - 32px)); min-height: 76px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--coral); color: #fff; font-size: 20px; font-weight: 900; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark b { font-size: inherit; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 20px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.desktop-nav { display: flex; align-items: center; gap: 8px; }
.desktop-nav a { padding: 10px 13px; color: #3f4750; font-size: 14px; }
.desktop-nav a:hover { color: var(--coral-dark); }
.desktop-nav b, .mobile-nav b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 10px; }
.site-search { display: flex; width: min(1160px, calc(100% - 32px)); margin: 0 auto 14px; }
.site-search input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-right: 0; outline: 0; background: #f8f9fa; }
.site-search input:focus { border-color: var(--coral); background: #fff; }
.site-search button { width: 84px; border: 0; background: var(--ink); color: #fff; font-weight: 800; }

.store-main { width: min(1160px, calc(100% - 32px)); min-height: calc(100vh - 190px); margin: 20px auto 50px; }
.store-hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 330px; overflow: hidden; padding: 52px clamp(24px, 6vw, 80px); background: linear-gradient(125deg, #f48674 0%, #ef6f7f 55%, #f7a5b3 100%); background-position: center; background-size: cover; color: #fff; }
.store-hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,24,28,.55), rgba(20,24,28,.06)); }
.hero-copy, .hero-placeholder { position: relative; z-index: 1; }
.hero-copy { max-width: 600px; }
.hero-copy > span, .section-head > div > span, .page-heading > span { font-size: 12px; font-weight: 900; letter-spacing: 0; opacity: .86; }
.hero-copy h1 { margin: 10px 0 8px; font-size: clamp(38px, 6vw, 72px); line-height: 1; }
.hero-copy p { margin: 0; font-size: clamp(18px, 2.5vw, 28px); font-weight: 700; }
.hero-placeholder { display: grid; place-items: center; width: 210px; height: 260px; border-radius: 110px 110px 0 0; background: rgba(255,255,255,.94); color: var(--coral); font-size: 34px; font-weight: 900; }
.poster-dots { position: absolute; right: 28px; bottom: 22px; z-index: 2; display: flex; gap: 8px; }
.poster-dots button { width: 10px; height: 10px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: rgba(255,255,255,.45); }
.poster-dots button.active { background: #fff; }

.notice-band { display: grid; grid-template-columns: 120px 1fr; align-items: center; margin-top: 16px; border: 1px solid var(--line); background: #fff; }
.notice-band strong { align-self: stretch; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 14px; }
.notice-band p { margin: 0; padding: 16px 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.category-section, .product-section { margin-top: 34px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { margin: 3px 0 0; font-size: 25px; }
.section-head span { color: var(--coral-dark); }
.section-head > a, .section-head > p { margin: 0; color: var(--muted); font-size: 13px; }
.category-links { display: flex; flex-wrap: wrap; gap: 8px; }
.category-links a { min-height: 42px; padding: 11px 16px; border: 1px solid var(--line); background: #fff; color: #4e5660; font-size: 14px; }
.category-links a.active, .category-links a:hover { border-color: var(--coral); background: #fff4f1; color: var(--coral-dark); font-weight: 800; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.product-media { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #edf0f2; }
.product-media img, .detail-media img, .cart-line img { width: 100%; height: 100%; object-fit: cover; }
.product-image-fallback { display: grid; place-items: center; width: 100%; height: 100%; padding: 16px; color: #fff; font-size: 17px; font-weight: 900; text-align: center; }
.product-card-body { padding: 14px; }
.product-category { color: var(--teal); font-size: 11px; font-weight: 900; }
.product-name { display: block; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.4; }
.product-card .product-name { min-height: 45px; margin-top: 5px; }
.product-card p, .cart-line p { margin: 5px 0 12px; color: var(--muted); font-size: 12px; }
.product-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price strong { color: var(--coral-dark); font-size: 20px; }
.product-actions, .detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.product-actions button, .detail-actions button { min-height: 38px; padding: 0 10px; border-radius: 4px; font-size: 12px; font-weight: 900; }
.secondary-action { border: 1px solid var(--coral); background: #fff; color: var(--coral-dark); }
.buy-action { border: 1px solid var(--coral); background: var(--coral); color: #fff; }
.product-actions button:disabled, .detail-actions button:disabled, .primary-action:disabled { cursor: not-allowed; opacity: .45; }
.empty-state { grid-column: 1 / -1; display: flex; min-height: 240px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 20px; }
.empty-state a { color: var(--coral-dark); font-weight: 800; }

.content-view, #productView { max-width: 1040px; margin: 0 auto; }
.page-heading { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-heading span { color: var(--coral-dark); }
.page-heading h1 { margin: 4px 0 0; font-size: 30px; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--coral-dark); font-weight: 800; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); border: 1px solid var(--line); background: #fff; }
.detail-media { min-height: 500px; overflow: hidden; background: #edf0f2; }
.detail-info { padding: clamp(24px, 5vw, 58px); }
.detail-info > span { color: var(--teal); font-size: 13px; font-weight: 900; }
.detail-info h1 { margin: 10px 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.2; }
.detail-info > strong { color: var(--coral-dark); font-size: 30px; }
.detail-info > p { margin: 22px 0; color: var(--muted); line-height: 1.8; }
.detail-info dl { margin: 0 0 24px; border-top: 1px solid var(--line); }
.detail-info dl div { display: grid; grid-template-columns: 100px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-info dt { color: var(--muted); }
.detail-info dd { margin: 0; font-weight: 700; }
.primary-action { min-height: 44px; padding: 0 22px; border: 0; border-radius: 4px; background: var(--coral); color: #fff; font-weight: 900; }
.primary-action:hover { background: var(--coral-dark); }

.cart-layout { display: grid; grid-template-columns: 1fr 300px; align-items: start; gap: 20px; }
.cart-lines { display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto 110px; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.cart-line > a:first-child { width: 90px; height: 90px; overflow: hidden; }
.cart-line > strong { color: var(--coral-dark); text-align: right; }
.quantity-control { display: grid; grid-template-columns: 34px 42px 34px; }
.quantity-control button, .quantity-control span { height: 34px; border: 1px solid var(--line); background: #fff; line-height: 32px; text-align: center; }
.quantity-control span { border-left: 0; border-right: 0; }
.checkout-side { position: sticky; top: 145px; padding: 20px; border: 1px solid var(--line); background: #fff; }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 20px; }
.cart-total strong { color: var(--coral-dark); font-size: 22px; }
.checkout-side .primary-action { width: 100%; }
.checkout-form, .account-form, .address-form { margin-top: 22px; padding: 24px; border: 1px solid var(--line); background: #fff; }
.checkout-form h2, .account-form h2, .address-form h2 { margin: 0 0 16px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.checkout-form input, .account-form input, .address-form input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); outline: 0; }
.checkout-form input:focus, .account-form input:focus, .address-form input:focus { border-color: var(--coral); }
.field-label { display: grid; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 800; }
.field-label input { font-weight: 400; }
.form-message { min-height: 20px; margin: 10px 0; color: #c0392b; font-size: 13px; font-weight: 700; }
.form-message.success { color: var(--teal); }
.payment-options { display: flex; gap: 10px; margin-bottom: 18px; }
.payment-options label { padding: 11px 15px; border: 1px solid var(--line); background: #f9fafb; }
.payment-qr-panel { display: grid; justify-items: center; gap: 9px; margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); background: #f9fafb; text-align: center; }
.payment-qr-panel strong { font-size: 18px; }
.payment-qr-panel > span, .payment-qr-panel small, .payment-qr-panel p { margin: 0; color: var(--muted); }
.payment-qr-panel .payment-submit-note { width: min(360px, 100%); padding: 10px 12px; border-left: 3px solid var(--coral); background: #fff3ef; color: var(--ink); line-height: 1.55; text-align: left; }
.payment-qr-panel img { width: min(260px, 78vw); aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.status-tabs { display: flex; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.status-tabs button { flex: 1; min-width: 90px; height: 48px; border: 0; border-bottom: 3px solid transparent; background: #fff; }
.status-tabs button.active { border-color: var(--coral); color: var(--coral-dark); font-weight: 900; }
.order-lookup { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(260px, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.order-lookup-copy { display: grid; gap: 3px; }
.order-lookup-copy span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.order-lookup input { height: 44px; padding: 0 12px; border: 1px solid var(--line); }
.order-lookup .form-message { grid-column: 1 / -1; margin: 0; }
.order-lookup button:disabled { cursor: wait; opacity: .65; }
.order-list { display: grid; gap: 12px; }
.lookup-results { display: grid; gap: 10px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); background: #fff; }
.lookup-results-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lookup-results-head span { color: var(--muted); font-size: 13px; }
.lookup-order-card { padding: 16px; border: 1px solid var(--line); background: #fbfcfc; }
.pay-order-number { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pay-order-number button { min-height: 32px; padding: 0 11px; border: 1px solid var(--coral); background: #fff; color: var(--coral-dark); font-weight: 800; }
.order-lookup-reminder { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.order-card { padding: 20px; border: 1px solid var(--line); background: #fff; }
.order-head, .order-items div, .order-total { display: flex; align-items: center; justify-content: space-between; }
.order-head span { color: var(--coral-dark); font-weight: 900; }
.order-card > p { margin: 8px 0; color: var(--muted); font-size: 13px; }
.order-items { margin: 14px 0; padding: 12px; background: #f7f8f9; }
.order-items div { padding: 5px 0; font-size: 13px; }
.buyer-payment-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; padding: 10px 12px; border-left: 4px solid var(--gold); background: #fff8e8; }
.buyer-payment-status a { padding: 7px 12px; background: var(--coral); color: #fff; font-weight: 900; }
.buyer-logistics { display: grid; gap: 7px; margin: 12px 0; padding: 13px; border-left: 4px solid var(--teal); background: #eef8f7; font-size: 13px; }
.buyer-logistics strong { color: var(--teal); }
.pay-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); align-items: start; gap: 20px; }
.pay-order-summary { padding: 22px; border: 1px solid var(--line); background: #fff; }
.pay-order-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay-order-summary div:last-child { border-bottom: 0; }
.pay-order-summary span { color: var(--muted); }
.pay-total { color: var(--coral-dark); font-size: 24px; }
.payment-result { display: grid; gap: 10px; padding: 32px; border: 1px solid var(--line); background: #fff; text-align: center; }
.payment-result strong { font-size: 21px; }
.payment-result span { color: var(--muted); }
.payment-result.success { border-top: 4px solid var(--teal); }
.payment-result.pending { border-top: 4px solid var(--gold); }
.order-total { justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.order-total strong { color: var(--coral-dark); font-size: 20px; }

.account-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.account-form { margin-top: 0; }
.account-form input { margin-bottom: 12px; }
.account-form .primary-action { width: 100%; }
.member-summary { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 18px; padding: 22px; background: var(--ink); color: #fff; }
.member-avatar { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--coral); font-size: 27px; font-weight: 900; }
.member-summary span { font-size: 12px; opacity: .7; }
.member-summary h2, .member-summary p { margin: 3px 0; }
.member-summary button { padding: 8px 12px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; }
.address-form .primary-action { margin-top: 14px; }

.store-footer { display: flex; justify-content: space-between; width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 90px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.store-footer strong { color: var(--ink); }
.announcement-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(20, 27, 34, .62); }
.announcement-dialog { position: relative; width: min(480px, 100%); padding: 34px; border-top: 6px solid var(--coral); background: #fff; box-shadow: 0 18px 55px rgba(0,0,0,.24); }
.announcement-dialog > span { color: var(--coral-dark); font-size: 12px; font-weight: 900; }
.announcement-dialog h2 { margin: 8px 0 14px; font-size: 28px; }
.announcement-dialog p { margin: 0 0 24px; color: var(--muted); line-height: 1.8; white-space: pre-wrap; }
.announcement-dialog .primary-action { width: 100%; }
.announcement-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; background: #f0f1f2; color: var(--ink); font-size: 24px; line-height: 1; }
.mobile-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 84px; z-index: 80; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 4px; background: rgba(24,29,35,.94); color: #fff; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Merchant admin */
.admin-shell { width: min(1120px, 100%); min-height: 100vh; margin: 0 auto; background: var(--canvas); }
.admin-login { width: min(390px, calc(100% - 32px)); margin: 12vh auto 0; padding: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.admin-login .admin-brand { color: var(--coral-dark); font-weight: 900; }
.admin-login h1 { margin: 8px 0 4px; }
.admin-login p, .admin-login small, .admin-hint { color: var(--muted); }
.admin-login input { width: 100%; height: 44px; margin: 20px 0 12px; padding: 0 12px; border: 1px solid var(--line); }
.admin-login small { display: block; margin-top: 12px; text-align: center; }
.submit { width: 100%; height: 42px; border: 0; border-radius: 4px; background: var(--coral); color: #fff; font-weight: 900; }
.admin-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; background: var(--ink); color: #fff; }
.admin-header span { font-size: 12px; opacity: .72; }
.admin-header h1 { margin: 2px 0 0; font-size: 24px; }
.admin-header button { padding: 8px 14px; border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; }
.admin-tabs { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(8, 1fr); border-bottom: 1px solid var(--line); background: #fff; }
.admin-tabs button { min-height: 50px; border: 0; border-bottom: 3px solid transparent; background: #fff; }
.admin-tabs button.active { border-color: var(--coral); color: var(--coral-dark); font-weight: 900; }
.admin-page { display: none; padding: 20px; }
.admin-page.active { display: block; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.admin-stats div { display: grid; gap: 4px; padding: 22px; text-align: center; }
.admin-stats b { color: var(--coral-dark); font-size: 25px; }
.admin-stats span { color: var(--muted); font-size: 13px; }
.admin-list, .poster-list, .admin-order-list { display: grid; gap: 10px; }
.admin-product { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.admin-thumb { display: grid; place-items: center; width: 84px; height: 84px; overflow: hidden; background: #edf0f2; color: #fff; font-size: 12px; text-align: center; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-product h3 { margin: 0 0 5px; font-size: 16px; }
.admin-product p { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.admin-product b { color: var(--coral-dark); }
.admin-product-actions, .poster-actions { display: grid; gap: 6px; }
.admin-product-actions button, .poster-actions button, .category-row button { padding: 7px 10px; border: 0; border-radius: 4px; background: #f0f1f2; color: var(--muted); }
.admin-product-actions button:first-child { background: #fff0ed; color: var(--coral-dark); }
.admin-empty { display: grid; gap: 8px; padding: 70px 20px; border: 1px solid var(--line); background: #fff; color: var(--muted); text-align: center; }
.admin-empty b { color: var(--ink); font-size: 19px; }
.panel { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.admin-form { max-width: 680px; margin: 0 auto; padding: 22px; }
.security-form { margin-top: 16px; }
.admin-form h2 { margin: 0 0 14px; font-size: 21px; }
.admin-form-head { display: flex; align-items: center; justify-content: space-between; }
.admin-form-head button { margin-bottom: 14px; padding: 7px 10px; border: 0; background: #f0f1f2; color: var(--muted); }
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; margin: 6px 0; padding: 10px; border: 1px solid var(--line); background: #fff; }
.admin-form textarea { min-height: 90px; }
.toggle-control { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); background: #f9fafb; font-weight: 800; }
.admin-form .toggle-control input { width: 20px; height: 20px; margin: 0; }
.category-binding { margin: 8px 0; padding: 12px; border: 1px solid #ffd0c8; background: #fff8f6; }
.category-binding > label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 900; }
.category-binding-row { display: grid; grid-template-columns: 1fr 96px; gap: 8px; }
.category-binding-row select { margin: 0; }
.category-binding-row button { border: 0; background: var(--coral); color: #fff; }
.category-binding small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.inline-category-manager { margin: 8px 0 14px; padding: 12px; border: 1px solid var(--line); background: #fafafa; }
.inline-category-manager h3 { margin: 0 0 10px; }
.category-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.category-row input { flex: 1; min-width: 0; margin: 0; }
.category-add { display: grid; grid-template-columns: 1fr 100px; align-items: center; gap: 8px; }
.category-add .submit { height: 38px; font-size: 12px; }
.file-button { display: grid; place-items: center; min-height: 44px; margin-top: 10px; border: 1px solid var(--coral); color: var(--coral-dark); cursor: pointer; }
.file-input { display: none !important; }
.image-preview { width: 120px; height: 120px; margin: 10px 0; object-fit: cover; background: #edf0f2; }
.shop-avatar-preview { width: 112px; height: 112px; margin: 12px auto; object-fit: cover; border: 1px solid var(--line); background: #edf0f2; }
.poster-preview { width: 100%; aspect-ratio: 2.5 / 1; margin: 10px 0; object-fit: cover; background: #edf0f2; }
.payment-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0; }
.payment-upload { padding: 14px; border: 1px solid var(--line); background: #f9fafb; }
.payment-upload h3 { margin: 0 0 8px; font-size: 16px; }
.qr-preview { display: block; width: min(220px, 100%); aspect-ratio: 1; margin: 12px auto 0; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.quiet-button { width: 100%; margin-top: 8px; padding: 8px; border: 0; background: #eceff1; color: var(--muted); }
.poster-item { display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.poster-item img, .poster-placeholder { width: 160px; aspect-ratio: 2.5 / 1; object-fit: cover; }
.poster-placeholder { display: grid; place-items: center; background: #ef8b9a; color: #fff; font-size: 12px; }
.poster-item h3, .poster-item p { margin: 0 0 5px; }
.poster-item p { color: var(--muted); font-size: 12px; }
.admin-order { padding: 18px; border: 1px solid var(--line); background: #fff; }
.admin-order-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; margin-bottom: 8px; }
.admin-order-head strong { min-width: 0; overflow-wrap: anywhere; }
.admin-order-state { padding: 5px 8px; border-left: 3px solid var(--coral); background: #fff3f0; color: var(--coral-dark); font-size: 12px; font-weight: 900; white-space: nowrap; }
.admin-order p { margin: 6px 0; color: var(--muted); font-size: 13px; }
.admin-order select { height: 38px; margin-top: 8px; border: 1px solid var(--line); }
.admin-payment-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; padding: 10px 12px; background: #f7f8f9; }
.admin-payment-line select { min-width: 120px; margin-top: 0; }
.admin-payment-filters { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; border: 1px solid var(--line); }
.admin-payment-filters button { min-height: 40px; border: 0; border-right: 1px solid var(--line); background: #fff; }
.admin-payment-filters button:last-child { border-right: 0; }
.admin-payment-filters button.active { background: var(--ink); color: #fff; font-weight: 900; }
.admin-order-search { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); background: #f8f9fa; }
.admin-order-search label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-order-search label > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.admin-order-search input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); background: #fff; }
.admin-order-search label button { min-width: 60px; border: 0; background: var(--ink); color: #fff; font-weight: 800; }
.order-search-actions { display: grid; grid-template-columns: auto auto; gap: 8px; }
.order-search-actions .quiet-button { width: auto; min-height: 40px; margin: 0; padding: 0 12px; }
.refresh-orders { min-height: 40px; padding: 0 14px; border: 1px solid var(--teal); background: #fff; color: var(--teal); font-weight: 900; }
.admin-shipping-filters { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; border: 1px solid var(--line); }
.admin-shipping-filters button { min-height: 40px; border: 0; border-right: 1px solid var(--line); background: #fff; }
.admin-shipping-filters button:last-child { border-right: 0; }
.admin-shipping-filters button.active { background: var(--teal); color: #fff; font-weight: 900; }
.admin-shipping-filters span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 3px; border-radius: 10px; background: #eceff1; color: var(--ink); font-size: 11px; }
.order-toolbar { display: flex; align-items: stretch; justify-content: space-between; gap: 10px; margin-top: 14px; }
.admin-date-filters { display: grid; flex: 1; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.admin-date-filters button { min-height: 40px; border: 0; border-right: 1px solid var(--line); background: #fff; }
.admin-date-filters button:last-child { border-right: 0; }
.admin-date-filters button.active { background: var(--ink); color: #fff; font-weight: 900; }
.admin-date-filters span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 3px; border-radius: 10px; background: #eceff1; color: var(--ink); font-size: 11px; }
.export-orders { padding: 0 14px; border: 1px solid var(--teal); background: #fff; color: var(--teal); font-weight: 900; }
.shipping-editor { margin-top: 12px; padding: 14px; border: 1px solid var(--line); background: #fbfcfc; }
.shipping-editor h3 { margin: 0 0 10px; font-size: 15px; }
.shipping-editor div { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.shipping-editor input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); }
.shipping-editor button { padding: 0 14px; border: 0; background: var(--teal); color: #fff; font-weight: 900; }
.shipping-editor button:disabled { cursor: wait; opacity: .65; }
.admin-toast { position: fixed; z-index: 1000; top: 18px; left: 50%; min-width: 220px; max-width: calc(100vw - 32px); padding: 12px 18px; transform: translate(-50%, -16px); border: 1px solid #178e90; background: #fff; color: #126f71; font-weight: 800; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; box-shadow: 0 8px 24px rgba(22, 37, 51, .18); }
.admin-toast.error { border-color: #f46c5e; color: #c94135; }
.admin-toast.visible { transform: translate(-50%, 0); opacity: 1; }
.payment-alert-modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 18px; background: rgba(20, 27, 34, .68); }
.payment-alert-modal[hidden] { display: none; }
.payment-alert-dialog { width: min(460px, 100%); padding: 28px; border-top: 6px solid var(--coral); background: #fff; box-shadow: 0 18px 55px rgba(0, 0, 0, .28); }
.payment-alert-dialog > span { color: var(--coral-dark); font-size: 12px; font-weight: 900; }
.payment-alert-dialog h2 { margin: 7px 0 18px; font-size: 25px; }
.payment-alert-queue { margin: -8px 0 18px; padding: 9px 11px; border-left: 3px solid var(--coral); background: #fff5f2; color: var(--coral-dark); font-size: 13px; font-weight: 800; }
.payment-alert-details { display: grid; gap: 10px; }
.payment-alert-details > div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.payment-alert-details span, .payment-alert-details p { color: var(--muted); }
.payment-alert-details strong { text-align: right; overflow-wrap: anywhere; }
.payment-alert-details p { margin: 2px 0 0; line-height: 1.6; }
.payment-alert-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 22px; }
.payment-alert-actions button { min-height: 44px; }
.orders-tab-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.order-alert-badge { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e5483f; color: #fff; font-size: 11px; font-weight: 900; line-height: 20px; text-align: center; }
.workflow-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.workflow-action { min-height: 42px; padding: 0 20px; border: 0; background: var(--coral); color: #fff; font-weight: 900; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-side { position: static; }
}

@media (max-width: 680px) {
  .store-header { position: static; }
  .header-top { min-height: 68px; }
  .desktop-nav { display: none; }
  .brand strong { font-size: 18px; }
  .store-main { width: 100%; margin-top: 0; padding-bottom: 64px; }
  .store-hero { min-height: 240px; padding: 32px 18px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy p { font-size: 18px; }
  .hero-placeholder { width: 120px; height: 160px; font-size: 22px; }
  .notice-band { grid-template-columns: 86px 1fr; margin: 10px; }
  .category-section, .product-section, .content-view, #productView { margin: 26px 10px 0; }
  .section-head h2 { font-size: 22px; }
  .category-links { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .category-links a { flex: 0 0 auto; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card-body { padding: 10px; }
  .product-card .product-name { min-height: 42px; font-size: 14px; }
  .product-price { align-items: stretch; flex-direction: column; }
  .product-actions { grid-template-columns: 1fr; }
  .pay-page { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .detail-media { min-height: 340px; }
  .detail-info { padding: 22px; }
  .cart-line { grid-template-columns: 68px 1fr auto; gap: 10px; }
  .cart-line > a:first-child { width: 68px; height: 68px; }
  .cart-line > strong { grid-column: 2 / -1; }
  .quantity-control { grid-template-columns: 30px 36px 30px; }
  .form-grid, .account-columns { grid-template-columns: 1fr; }
  .order-lookup { grid-template-columns: 1fr; }
  .order-lookup .form-message { grid-column: 1; }
  .member-summary { grid-template-columns: 56px 1fr auto; padding: 16px; }
  .member-avatar { width: 56px; height: 56px; }
  .store-footer { padding-bottom: 86px; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(3, 1fr); min-height: 58px; border-top: 1px solid var(--line); background: #fff; }
  .mobile-nav a { display: grid; place-items: center; padding: 8px 4px; color: #505861; font-size: 12px; }
  .admin-tabs { grid-template-columns: repeat(8, minmax(90px, 1fr)); overflow-x: auto; }
  .payment-upload-grid { grid-template-columns: 1fr; }
  .admin-order-search { grid-template-columns: 1fr; }
  .order-search-actions { grid-template-columns: 1fr 1fr; }
  .order-toolbar { flex-direction: column; }
  .export-orders { min-height: 42px; }
  .shipping-editor div { grid-template-columns: 1fr; }
  .shipping-editor button { min-height: 40px; }
  .admin-product { grid-template-columns: 68px 1fr auto; gap: 9px; }
  .admin-thumb { width: 68px; height: 68px; }
  .poster-item { grid-template-columns: 105px 1fr auto; gap: 8px; }
  .poster-item img, .poster-placeholder { width: 105px; }
  .admin-order-head { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-order-state { grid-column: 1; grid-row: 2; justify-self: start; }
  .admin-order-head > b { grid-column: 2; grid-row: 1 / span 2; }
}
