/* Diyar Shop — pastel lavender, soft pink and milky white theme */
@font-face {
  font-family: Vazirmatn;
  src: url("https://cdn.jsdelivr.net/npm/vazirmatn@33.0.3/fonts/webfonts/Vazirmatn%5Bwght%5D.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fffafd;
  --surface: #fffefe;
  --surface-soft: #f8f1fb;
  --ink: #29233a;
  --muted: #716a7e;
  --line: #eee3f1;
  --accent: #d84591;
  --accent-dark: #bb347c;
  --accent-soft: #fbe2f0;
  --lavender: #c79be3;
  --lavender-soft: #eee3f8;
  --success: #276247;
  --danger: #a23c55;
  --warning: #8b5a16;
  --radius-sm: 11px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 14px rgb(75 44 87 / .07);
  --shadow: 0 14px 38px rgb(75 44 87 / .12);
  --store-header-height: 76px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-tap-highlight-color: transparent; }
body {
  min-width: 320px;
  margin: 0;
  padding-top: var(--store-header-height);
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.7 Vazirmatn, Tahoma, sans-serif;
}
body, button, input, select, textarea { font-family: Vazirmatn, Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-block-start: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; }
::selection { color: var(--ink); background: var(--accent-soft); }
.shell { width: min(calc(100% - 32px), 1280px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.skip { position: fixed; z-index: 20; top: -5rem; inset-inline-start: 1rem; padding: .65rem 1rem; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); }
.skip:focus { top: .75rem; }

/* Shared buttons and form controls */
.button, #admin-editor button, #admin-login button, #admin-category-form button {
  min-height: 44px;
  padding: .58rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: linear-gradient(135deg, #f66aa8, var(--accent));
  color: #fff;
  font-weight: 650;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.button:hover, #admin-editor button:hover, #admin-login button:hover, #admin-category-form button:hover {
  border-color: var(--accent-dark);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 5px 16px rgb(216 69 145 / .2);
}
.button:active, #admin-editor button:active { transform: translateY(1px); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--lavender); outline: 3px solid rgb(199 155 227 / .2); }
input[type="file"] { padding: .5rem; }
label { font-weight: 600; }
label input, label select, label textarea { margin-top: .35rem; }
small { color: var(--muted); }
[role="status"]:not(.sr-only):not(:empty) { color: var(--muted); }
.field-error { display: block; min-height: 1.4em; color: var(--danger); font-size: .85rem; }
[aria-invalid="true"] { border-color: var(--danger) !important; }

/* Store header and managed collection banner */
.header {
  position: fixed; z-index: 10; inset-block-start: 0; inset-inline: 0;
  border-bottom: 1px solid rgb(127 91 146 / .12);
  background: rgb(255 250 253 / .92); backdrop-filter: blur(16px);
}
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner { min-height: var(--store-header-height); }
.brand { display: inline-flex; flex-direction: column; gap: .1rem; color: var(--ink); font-size: 1.2rem; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.brand span { font: 500 .64rem/1.3 Georgia, serif; letter-spacing: .2em; }
.header-support { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--lavender-soft); color: var(--ink); }
.header-support:hover { background: var(--accent-soft); }
.header-support svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.collection { margin-block: clamp(24px, 5vw, 58px) 100px; scroll-margin-top: calc(var(--store-header-height) + 18px); }
.collection-header {
  position: relative; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center;
  gap: 1rem; min-height: clamp(170px, 31vw, 330px); margin-bottom: clamp(24px, 5vw, 48px);
  overflow: hidden; border: 1px solid #f3e5f4; border-radius: var(--radius-lg);
  background: linear-gradient(270deg, rgb(255 250 253 / .98) 0%, rgb(255 250 253 / .92) 28%, rgb(255 250 253 / .58) 57%, rgb(255 250 253 / .12) 100%),
    var(--storefront-banner, url("../assets/shirt.jpg")) left center / cover no-repeat,
    linear-gradient(120deg, var(--lavender-soft), var(--accent-soft));
  text-align: start; box-shadow: var(--shadow-sm);
}
.collection-intro { max-width: 62%; padding: clamp(1rem, 4vw, 3rem); }
.collection-intro h1 { margin: 0; color: var(--ink); font-size: clamp(1.7rem, 5vw, 4.1rem); font-weight: 650; line-height: 1.25; letter-spacing: -.03em; }
.collection-intro p { margin: .55rem 0 0; color: var(--muted); font-size: .95rem; }
.collection-header h2 { font-size: clamp(1.7rem, 3.2vw, 2.8rem); }
.catalog-category { display: flex; align-items: center; gap: .55rem; }
.catalog-category label { white-space: nowrap; }
.catalog-category select { min-width: 150px; }
.catalog-category[hidden] { display: none; }

/* Search, category controls and product cards */
.catalog-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; max-width: 700px; margin: 0 auto clamp(20px, 4vw, 36px); padding-inline: .85rem .3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent-dark); box-shadow: var(--shadow-sm); }
.catalog-search:focus-within { border-color: var(--lavender); box-shadow: 0 0 0 4px rgb(199 155 227 / .16); }
.catalog-search svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.catalog-search input { min-width: 0; min-height: 48px; padding: .35rem 0; border: 0; outline: 0; background: transparent; font: inherit; }
.catalog-search input:focus { outline: 0; }
.catalog-search input::-webkit-search-cancel-button { display: none; }
#clear-search { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 1.35rem; }
#clear-search:hover { background: var(--lavender-soft); }
.catalog-chips { display: flex; gap: .5rem; margin-bottom: 1.4rem; padding: .3rem .1rem .7rem; overflow-x: auto; scrollbar-width: thin; }
.catalog-chips button { flex: 0 0 auto; min-height: 42px; padding: .45rem 1rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--muted); white-space: nowrap; }
.catalog-chips button[aria-pressed="true"] { border-color: var(--lavender); background: var(--lavender-soft); color: var(--ink); }
.catalog-empty { margin: 1rem 0; padding: 1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 3vw, 28px) clamp(10px, 2vw, 20px); }
.product-card { position: relative; display: grid; align-content: start; gap: .45rem; min-width: 0; overflow: hidden; padding-bottom: .85rem; border: 1px solid #f1e7f2; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card > button:first-child { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; border-radius: 23px 23px 17px 17px; background: var(--lavender-soft); }
.product-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .28s ease; }
.product-card > button:first-child:hover img { transform: scale(1.035); }
.product-card .catalog-product-title { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: baseline; gap: .35rem; min-height: 2.6em; margin: .35rem .8rem 0; font-size: clamp(.85rem, 2vw, 1.03rem); line-height: 1.45; }
.catalog-product-title > span { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.catalog-code { display: inline-block; padding-inline: .35rem; border-radius: 5px; background: var(--lavender-soft); color: var(--muted); font-size: .76rem; font-weight: 600; }
.product-card .catalog-code { padding: 0; background: transparent; font-size: .68rem; white-space: nowrap; }
.catalog-product-title mark { border-radius: 3px; background: var(--accent-soft); color: var(--ink); }
.product-card p { margin: 0 .8rem; color: var(--accent-dark); font-size: .9rem; font-weight: 700; }
.product-price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.stock-status { display: inline-flex; align-items: center; width: fit-content; padding: .15rem .55rem; border-radius: 999px; background: #fff1d9; color: var(--warning); font-size: .76rem; font-weight: 650; }
.product-card .product-save { position: absolute; z-index: 1; inset-block-start: .65rem; inset-inline-end: .65rem; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgb(255 255 255 / .9); border-radius: 50%; background: rgb(255 254 254 / .9); color: var(--ink); backdrop-filter: blur(8px); }
.product-save svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.product-save[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-dark); }
.product-save[aria-pressed="true"] svg { fill: var(--accent); }

/* Bottom navigation, dialogs and customer checkout */
.shop-dock { position: fixed; z-index: 9; inset-inline: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(calc(100% - 24px), 430px); margin-inline: auto; padding: .4rem; border: 1px solid #f0e2f1; border-radius: 999px; background: rgb(255 254 254 / .94); box-shadow: 0 9px 30px rgb(77 42 88 / .13); backdrop-filter: blur(18px); }
.shop-dock button { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .12rem; min-height: 54px; padding: .3rem .1rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-size: .77rem; font-weight: 650; line-height: 1.25; }
.shop-dock button:hover, .shop-dock button:focus-visible { background: var(--lavender-soft); }
.shop-dock svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dock-count[hidden] { display: none; }
.dock-count { position: absolute; top: .1rem; inset-inline-start: calc(50% + 13px); display: grid; place-items: center; min-width: 20px; min-height: 20px; padding-inline: .25rem; border: 1px solid var(--surface); border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; line-height: 1; }
body:has(#cart-dialog[open]) #open-cart, body:has(#saved-dialog[open]) #open-saved, body:has(#orders-dialog[open]) #open-orders { background: var(--accent); color: #fff; }
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { padding-block: 1.25rem; }
.footer p { margin: 0; color: var(--muted); font-size: .9rem; }
html:has(dialog:modal) { overflow: hidden; overscroll-behavior: none; scroll-behavior: auto; }
dialog { width: min(600px, calc(100% - 24px)); max-height: min(88dvh, 900px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px rgb(55 32 65 / .24); }
dialog::backdrop { background: rgb(42 31 51 / .48); backdrop-filter: blur(3px); }
.dialog-body { position: relative; padding: 3.4rem clamp(1rem, 4vw, 1.5rem) 1.5rem; }
.dialog-body > h2 { margin-bottom: .8rem; font-size: clamp(1.4rem, 4vw, 2rem); }
.dialog-close { position: absolute; z-index: 2; inset-inline-end: .7rem; top: .6rem; }
.dialog-close button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 1.55rem; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.product-photo { position: relative; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius); background: var(--lavender-soft); cursor: zoom-in; }
.product-photo img { width: 100%; height: clamp(180px, 38dvh, 350px); object-fit: contain; }
.product-photo > span { position: absolute; inset-block-end: .55rem; inset-inline-start: .55rem; padding: .2rem .55rem; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .75rem; }
.product-info { min-width: 0; }
.product-info h2 { margin-bottom: .3rem; font-size: 1.55rem; }
#product-price { margin-block: .4rem .9rem; color: var(--accent-dark); font-weight: 750; }
#product-form { display: grid; gap: .75rem; }
.product-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.product-options > div:last-child { grid-column: 1 / -1; }
.product-options label { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .88rem; }
.product-options select { min-height: 46px; }
#product-form > .button, #add-confirmation > .button { width: 100%; }
#variant-message { margin: 0; color: var(--danger); }
.add-summary { margin-bottom: .85rem; }
.add-success { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; color: var(--success); font-weight: 750; }
.add-success > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e4efe8; }
.add-variants { display: grid; gap: .35rem; margin: 0; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.add-variants > div { display: flex; justify-content: space-between; gap: .5rem; }
.add-variants dt { color: var(--muted); }
.add-variants dd { margin: 0; font-weight: 650; }
#add-confirmation .button, .continue-shopping { width: 100%; }
.continue-shopping { min-height: 44px; margin-top: .55rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 650; }
.cart-items, .saved-list, .orders-list, .transfer-items { display: grid; gap: .5rem; margin: .85rem 0; padding: 0; list-style: none; }
.cart-items li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-items li > button, .saved-remove, .order-copy { min-height: 40px; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.cart-product { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.cart-thumbnail { flex: 0 0 48px; width: 48px; height: 60px; border-radius: 8px; object-fit: cover; background: var(--lavender-soft); }
#cart-total { font-weight: 750; }
#open-checkout { width: 100%; }
.support-links { display: grid; gap: .55rem; margin-block: 1rem .25rem; }
.support-links a { display: flex; align-items: center; gap: .7rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.support-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--lavender-soft); }
.support-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.support-copy { display: grid; line-height: 1.35; }
.support-copy bdi { font-size: .9rem; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%; min-height: 50px; padding: .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-align: start; overflow-wrap: anywhere; }
.order-status { color: var(--ink); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.order-details { display: grid; gap: .55rem; margin: 0; }
.order-details > div { padding: .65rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.order-details dt { color: var(--muted); font-size: .85rem; }
.order-details dd { margin: .12rem 0 0; overflow-wrap: anywhere; }
.order-product { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.order-reference, .order-reference-line { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.order-reference-line { display: flex; align-items: center; gap: .5rem; padding: .4rem .65rem; color: var(--muted); }
.transfer-items li { display: grid; gap: .15rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.checkout-amount-row, .checkout-card-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.checkout-amount-row, .checkout-card-panel { padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.checkout-amount-row > div { display: grid; }
.checkout-amount-row button, .checkout-card-row button { min-height: 40px; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--lavender-soft); }
.checkout-card-row bdi { font-weight: 750; letter-spacing: .08em; }
.checkout-card-label { margin-bottom: .35rem; color: var(--muted); font-size: .85rem; }
.checkout-rules { margin-block: .8rem; }
#product-photo-dialog { width: min(940px, calc(100% - 24px)); max-height: 94dvh; overflow: hidden; border-color: #3b342e; background: #29233a; color: #fff; }
.photo-toolbar, .photo-gallery-nav { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem .75rem; }
.photo-toolbar button, .photo-gallery-nav button { min-height: 42px; padding: .3rem .75rem; border: 1px solid rgb(255 255 255 / .25); border-radius: var(--radius-sm); background: #443950; color: #fff; }
.photo-close { min-width: 44px; font-size: 1.4rem; }
.photo-viewport { height: min(74dvh, 760px); max-height: calc(94dvh - 110px); overflow: auto; overscroll-behavior: contain; touch-action: none; }
.photo-viewport img { width: var(--photo-size, 100%); height: var(--photo-size, 100%); object-fit: contain; }
.save-toast { position: fixed; z-index: 12; inset-inline: 0; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: .5rem; width: fit-content; max-width: calc(100% - 24px); margin-inline: auto; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); pointer-events: none; font-size: .85rem; }
.save-toast:empty { width: 1px; height: 1px; padding: 0; border: 0; clip-path: inset(50%); }
.saved-product { display: flex; align-items: center; gap: .7rem; padding: .45rem; border: 0; border-radius: var(--radius-sm); background: transparent; text-align: start; }
.saved-product img { width: 48px; height: 60px; border-radius: 8px; object-fit: cover; }
.saved-product > span { display: grid; }
.saved-summary { color: var(--muted); font-size: .88rem; }

/* Admin login and section navigation */
body.is-admin { min-height: 100vh; padding: 0; background: #faf6fb; }
body.is-admin .header { position: relative; background: var(--surface); backdrop-filter: none; }
body.is-admin .header-inner { min-height: 64px; }
body.is-admin .header-support, body.is-admin main, body.is-admin .shop-dock, body.is-admin .save-toast, body.is-admin > footer { display: none !important; }
.admin-panel { width: min(calc(100% - 28px), 1180px); min-height: calc(100vh - 64px); padding-block: clamp(1.25rem, 4vw, 3rem); }
#admin-title { margin: 0 0 .35rem; font-size: clamp(1.65rem, 4vw, 2.4rem); font-weight: 750; letter-spacing: -.025em; }
#admin-status { min-height: 1.5rem; margin: .25rem 0 1rem; color: var(--muted); }
#admin-login { display: grid; gap: .8rem; width: min(100%, 430px); margin: clamp(2rem, 8vh, 6rem) auto; padding: clamp(1.25rem, 5vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
#admin-login::before { content: "ورود امن به مدیریت فروشگاه"; display: block; margin-bottom: .25rem; color: var(--muted); font-size: .93rem; }
#admin-login label { display: grid; gap: .25rem; }
#admin-login .button { width: 100%; margin-top: .3rem; }
#admin-editor { display: grid; gap: 1rem; }
.admin-actions { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-actions a { color: var(--accent-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.admin-actions button { min-height: 40px !important; padding: .35rem .85rem !important; border-color: var(--line) !important; background: var(--surface) !important; color: var(--danger) !important; }
.admin-section-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.admin-section-menu button { display: flex; justify-content: space-between; align-items: center; min-height: 70px !important; padding: .8rem 1rem !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; background: var(--surface) !important; color: var(--ink) !important; box-shadow: var(--shadow-sm); text-align: start; }
.admin-section-menu button:hover { border-color: var(--lavender) !important; background: var(--lavender-soft) !important; box-shadow: var(--shadow); }
.admin-section-heading { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; }
.admin-section-heading button { width: fit-content; border-color: var(--line) !important; background: var(--surface) !important; color: var(--ink) !important; }
.admin-section-heading h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.admin-form, #admin-editor > details, #admin-editor > #admin-product-form { min-width: 0; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
#admin-editor > details > summary { display: none; }
.admin-form form, #admin-product-form { display: grid; gap: .85rem; }
.admin-form label, #admin-product-form label { display: grid; gap: .2rem; }
.admin-form h2, #admin-product-form h2 { margin: 0; font-size: 1.3rem; }
.admin-form p { margin-block: .4rem; }
.admin-form > img, #admin-banner-preview { width: min(100%, 520px); max-height: 260px; margin-bottom: .6rem; border-radius: var(--radius); object-fit: cover; background: var(--lavender-soft); }
.admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
#admin-editor fieldset { min-width: 0; margin: .35rem 0; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); }
#admin-editor legend { padding-inline: .35rem; color: var(--ink); font-weight: 700; }
.admin-checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin-checks > label { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: .4rem !important; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .9rem; }
.admin-checks input, .admin-gallery input { accent-color: var(--accent); }
#admin-variants { display: grid; gap: .6rem; }
.admin-variant { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: .55rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fffafd; }
.admin-variant label { font-size: .88rem; }
.admin-variant .admin-remove { width: 44px; min-width: 44px; min-height: 44px; padding: 0 !important; border-color: #ead0da !important; background: #fff7fa !important; color: var(--danger) !important; font-size: 1.3rem; }
#admin-add-variant, #admin-delete-product, #admin-categories button, #admin-inventory button, #admin-alerts button, .transfer-actions button { min-height: 40px !important; padding: .42rem .75rem !important; border: 1px solid var(--line) !important; background: var(--surface) !important; color: var(--ink) !important; font-size: .88rem; }
#admin-product-form > .button { width: 100%; }
.admin-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .65rem; margin-block: .65rem; }
.admin-gallery > div { display: grid; gap: .4rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fffafd; }
.admin-gallery img { width: 100%; aspect-ratio: 4 / 5; border-radius: 8px; object-fit: cover; }
.admin-gallery label { display: flex; align-items: center; gap: .35rem; font-size: .8rem; }
.admin-gallery button { min-height: 38px !important; padding: .3rem .5rem !important; border-color: #ead0da !important; background: #fff7fa !important; color: var(--danger) !important; font-size: .82rem; }
#admin-categories, #admin-alerts, #admin-inventory { display: grid; gap: .55rem; margin: .75rem 0 0; padding: 0; list-style: none; }
#admin-categories li, #admin-alerts li, #admin-inventory li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fffafd; }
#admin-categories li > span, #admin-inventory li > strong { flex: 1 1 100%; }
#admin-categories li:first-child { color: var(--muted); }
#admin-category-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
#admin-category-form label { display: grid; }
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.admin-stats dl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .4rem .7rem; margin: 0; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fffafd; }
.admin-stats dt { color: var(--muted); font-size: .84rem; }
.admin-stats dd { margin: 0; color: var(--accent-dark); font-size: 1.12rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.admin-new-count { display: inline-grid; place-items: center; min-width: 1.55rem; min-height: 1.55rem; margin-inline-start: .4rem; padding-inline: .35rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .8rem; }
.admin-transfer { margin-block: .6rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fffafd; }
.admin-transfer > summary { cursor: pointer; font-weight: 700; }
.admin-transfer > div { display: grid; gap: .8rem; padding-top: .8rem; }
.admin-transfer img { width: min(100%, 320px); max-height: 360px; border-radius: var(--radius); object-fit: contain; background: var(--lavender-soft); }
.admin-transfer .order-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.transfer-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.transfer-actions button { flex: 1 1 auto; }
.transfer-actions button:first-child { border-color: #c7dfd0 !important; background: #edf5ef !important; color: var(--success) !important; }
.transfer-actions button:last-child { border-color: #ead0da !important; color: var(--danger) !important; }
.receipt-sms-status { margin: 0; color: var(--warning); font-size: .88rem; }
.receipt-sms-status[data-matched="true"] { color: var(--success); }
#deposit-list { display: grid; gap: .5rem; max-height: 50vh; overflow: auto; }
#deposit-list > p { margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fffafd; overflow-wrap: anywhere; }
#deposit-form { margin-top: 1rem; }

@media (min-width: 600px) {
  .product-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
  .product-photo img { height: clamp(320px, 55dvh, 460px); }
  .admin-section-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .shell { width: min(calc(100% - 64px), 1280px); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-section-menu { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
  .admin-section-menu { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 24px); }
  .brand { font-size: 1.05rem; }
  .brand span { font-size: .58rem; }
  .collection-intro { max-width: 76%; padding: .9rem; }
  .collection-header { min-height: 160px; background-position: center, 35% center; }
  .product-options { grid-template-columns: 1fr; }
  .product-options > div:last-child { grid-column: auto; }
  .admin-panel { width: calc(100% - 20px); }
  .admin-section-menu { grid-template-columns: 1fr; }
  .admin-fields, .admin-stats { grid-template-columns: 1fr; }
  .admin-variant { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-variant .admin-remove { grid-column: 1 / -1; width: 100%; }
  .admin-transfer .order-details { grid-template-columns: 1fr; }
  #admin-category-form { grid-template-columns: 1fr; }
  .order-row { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .product-card:hover { transform: none; }
}
