@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Nunito+Sans:opsz,wght@6..12,400;6..12,600;6..12,700;6..12,800&display=swap');

:root {
  --bg: #fbf6f0;
  --surface: #fffdfb;
  --ink: #36261f;
  --muted: #7b675d;
  --line: #ecdfd3;
  --primary: #b4503b;
  --primary-dark: #953f2d;
  --blush: #f6e1da;
  --sage: #5f7f66;
  --sage-soft: #e5ede3;
  --sun: #f2c46d;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(72, 45, 33, .06), 0 10px 30px -14px rgba(72, 45, 33, .22);
  --shadow-lg: 0 30px 70px -25px rgba(72, 45, 33, .45);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* gombok */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border-radius: 99px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; transition: background .18s, transform .18s, border-color .18s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 22px -12px var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-messenger { background: linear-gradient(100deg, #0a7cff, #8a3ffc); color: #fff; }
.btn-sage { background: var(--sage); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 15px; font-size: .875rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); flex: none; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* fejléc */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 240, .88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.logo-mark { width: 44px; height: 44px; }
.logo b { font-family: var(--display); font-size: 1.3rem; display: block; line-height: 1.1; }
.logo small { color: var(--muted); font-size: .76rem; letter-spacing: .06em; }
.search { flex: 1; max-width: 520px; margin-inline: auto; position: relative; }
.search svg { position: absolute; left: 17px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input { width: 100%; padding: 12px 18px 12px 48px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); }
.search input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--blush); }
.list-btn { flex: none; }
.badge { background: #fff; color: var(--primary); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }

/* nyitó rész */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 54px 36px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--sage-soft); color: var(--sage); padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: .83rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); margin: 18px 0; }
.hero h1 em { color: var(--primary); font-style: normal; position: relative; white-space: nowrap; }
.hero h1 em::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10'%3E%3Cpath d='M0 5 Q10 0 20 5 T40 5' fill='none' stroke='%23f2c46d' stroke-width='3'/%3E%3C/svg%3E") repeat-x; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 48ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.collage { position: relative; aspect-ratio: 1.12; }
.polaroid { position: absolute; background: #fff; padding: 10px 10px 12px; border-radius: 16px; box-shadow: var(--shadow-lg); transition: transform .3s; }
.polaroid .pic { aspect-ratio: 1; border-radius: 9px; overflow: hidden; }
.polaroid span { display: block; text-align: center; font-family: var(--display); padding-top: 8px; font-size: .95rem; }
.polaroid:nth-child(1) { width: 52%; left: 2%; top: 4%; rotate: -6deg; }
.polaroid:nth-child(2) { width: 46%; right: 0; top: 0; rotate: 5deg; }
.polaroid:nth-child(3) { width: 45%; left: 33%; bottom: -2%; rotate: 1deg; }
.polaroid:hover { transform: translateY(-6px) scale(1.02); z-index: 2; }
.pic { position: relative; overflow: hidden; background: #efe6dd; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pic .back { object-fit: cover; filter: blur(18px) saturate(1.15); transform: scale(1.25); opacity: .75; }
.pic .front { object-fit: contain; }
.main > .pic, .preview > .pic, .thumbs .pic { width: 100%; height: 100%; }
.pic.none { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: .8rem; }
.price small { font-family: var(--body); font-size: .85rem; font-weight: 600; color: var(--muted); }
.price.ask { font-family: var(--body); font-size: .95rem !important; font-weight: 700; color: var(--muted) !important; }
.desc { white-space: pre-line; overflow-wrap: anywhere; }
.info .eyebrow { align-self: start; }
.shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shot { position: relative; width: 68px; height: 68px; }
.shot > button:first-child { width: 100%; height: 100%; border-radius: 12px; overflow: hidden; border: 2.5px solid transparent; }
.shot:first-child > button:first-child { border-color: var(--primary); }
.shot .pic { width: 100%; height: 100%; }
.shot .del { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; line-height: 1; }
.item.is-hidden .pic, .item.is-hidden b { opacity: .5; }
.flag.public { color: var(--sage); }
.flag.hidden-flag { background: var(--ink); color: #fff; }
.panel-tools select { max-width: 100%; }

/* szűrők */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: 2rem; }
.cats { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.cat { padding: 10px 19px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; white-space: nowrap; }
.cat small { color: var(--muted); margin-left: 5px; }
.cat[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat[aria-pressed="true"] small { color: #e5d6cc; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px; }
.tag { padding: 5px 13px; border-radius: 99px; background: #f3e9df; font-size: .85rem; font-weight: 600; border: 1.5px solid transparent; }
button.tag:hover { border-color: var(--primary); }
.tag[aria-pressed="true"] { background: var(--primary); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; border-block: 1px solid var(--line); padding-block: 12px; margin-bottom: 26px; font-size: .92rem; }
.toolbar-right { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
select, .field input, .field textarea { padding: 10px 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 99px; background: #dccdc1; position: relative; cursor: pointer; transition: .2s; }
.switch input::after { content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; }
.switch input:checked { background: var(--sage); }
.switch input:checked::after { left: 20px; }
.link { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* termékkártyák */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 26px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 2px solid transparent; transition: transform .25s, box-shadow .25s, border-color .2s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card.on { border-color: var(--primary); }
.card-media { position: relative; }
.card-media .open { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; }
.card-media .open .pic { width: 100%; height: 100%; transition: transform .5s; }
.card:hover .card-media .open .pic { transform: scale(1.06); }
.flags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; pointer-events: none; }
.flag { font-size: .73rem; font-weight: 800; padding: 4px 11px; border-radius: 99px; background: #fff; }
.flag.new { background: var(--sun); }
.pick { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center; box-shadow: var(--shadow); }
.pick[aria-pressed="true"] { background: var(--primary); color: #fff; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card h3 { font-size: 1.16rem; }
.card .tags { margin: 0; gap: 5px; }
.card .tag { font-size: .76rem; padding: 2px 10px; color: var(--muted); }
.card .tag[aria-pressed="true"] { color: #fff; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.price { font-family: var(--display); font-size: 1.32rem; font-weight: 600; white-space: nowrap; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1 / -1; }
.empty h3 { color: var(--ink); margin-bottom: 8px; font-size: 1.4rem; }

footer { margin-top: 80px; background: #36261f; color: #f3e6dc; padding-block: 38px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer b { font-family: var(--display); font-size: 1.2rem; }
footer p { color: #cbb7aa; font-size: .9rem; }

/* párbeszédablakok */
dialog { border: 0; background: var(--surface); color: var(--ink); padding: 0; }
dialog::backdrop { background: rgba(45, 28, 20, .5); backdrop-filter: blur(4px); }
.modal { margin: auto; width: min(960px, 100% - 28px); max-height: min(90vh, 100% - 28px); border-radius: 28px; overflow: auto; box-shadow: var(--shadow-lg); }
.product { display: grid; grid-template-columns: 1fr 1fr; }
.gallery { padding: 18px; }
.gallery .main { display: flex; justify-content: center; align-items: start; }
.gallery .main > img { display: block; max-width: 100%; max-height: 70vh; border-radius: 18px; }
.gallery .main > .pic { aspect-ratio: 1; border-radius: 18px; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumbs button { width: 72px; height: 72px; border-radius: 13px; overflow: hidden; border: 2.5px solid transparent; }
.thumbs button[aria-pressed="true"] { border-color: var(--primary); }
.info { padding: 34px 32px 30px 14px; display: flex; flex-direction: column; gap: 14px; }
.info h2 { font-size: 1.9rem; padding-right: 34px; }
.info .price { font-size: 1.9rem; color: var(--primary); }
.info p { color: var(--muted); }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .92rem; border-block: 1px solid var(--line); padding-block: 13px; }
.info dt { color: var(--muted); }
.info dd { font-weight: 600; }
.info .tags { margin: 0; }
.choose { border: 0; padding: 0; margin: 0; min-width: 0; }
.choose legend { font-family: var(--display); font-size: 1.15rem; font-weight: 700; padding: 0; }
.info .choose p { font-size: .85rem; margin: 2px 0 10px; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.piece { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 9px; border-radius: 17px; border: 2.5px solid var(--line); background: var(--surface); text-align: center; font-weight: 700; font-size: .8rem; line-height: 1.25; }
.piece:hover { border-color: var(--primary); }
.piece-pic { position: relative; display: block; aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: #f3e9df; }
.piece-pic > .crop { position: absolute; inset: 0; }
.piece-pic i, .piece-pic em { position: absolute; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #fff; font-style: normal; font-size: .82rem; box-shadow: var(--shadow); }
.piece-pic i { top: 5px; left: 5px; }
.piece-pic em { right: 5px; bottom: 5px; }
.piece-pic em svg.i { width: 17px; height: 17px; }
.piece[aria-pressed="true"] { border-color: var(--sage); background: var(--sage); color: #fff; }
.piece[aria-pressed="true"] .piece-pic i { color: var(--sage); }
.piece[aria-pressed="true"] .piece-pic em { background: var(--sage); color: #fff; }
.pic.crop { display: block; }
.pic.crop img { inset: auto; height: auto; max-width: none; }
.pic.crop img:not([style]) { visibility: hidden; }
.map { position: relative; margin: 0; }
.map img { display: block; width: 100%; border-radius: 18px; cursor: crosshair; }
.pin { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--primary); color: #fff; font-style: normal; font-weight: 800; font-size: .85rem; pointer-events: none; }
.preview.marking { aspect-ratio: auto; border-radius: 0; overflow: visible; }
#spot-help { margin: 8px 0 0; }
#spot-help:empty { display: none; }
.choice { display: block; font-style: normal; font-size: .88rem; font-weight: 700; color: var(--sage); }
.close { position: absolute; top: 14px; right: 14px; z-index: 2; }

.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(470px, 100%); box-shadow: var(--shadow-lg); }
.drawer[open] { display: flex; flex-direction: column; animation: slide .28s ease; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow: auto; padding: 6px 22px 22px; }
.row { display: grid; grid-template-columns: 68px 1fr auto; gap: 13px; padding-block: 14px; border-bottom: 1px solid var(--line); align-items: center; }
.row .pic { width: 68px; height: 68px; border-radius: 14px; overflow: hidden; }
.row b { display: block; line-height: 1.3; }
.row small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; background: #f3e9df; border-radius: 99px; padding: 2px; }
.qty button { width: 28px; height: 28px; border-radius: 50%; background: #fff; font-weight: 800; }
.qty span { min-width: 28px; text-align: center; font-weight: 800; }
.row-end { text-align: right; display: flex; flex-direction: column; align-items: end; gap: 12px; }
.row-end button { color: var(--muted); }
.row-end button:hover { color: var(--primary); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-block: 16px; font-weight: 700; }
.total .price { font-size: 1.7rem; }
.field { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 700; font-size: .88rem; }
.field input, .field textarea, .field select { width: 100%; font-weight: 400; font-size: 1rem; }
.field textarea { resize: vertical; min-height: 76px; }
.field small { color: var(--muted); font-weight: 400; }
.send { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.send .wide { grid-column: 1 / -1; }
.hint { font-size: .83rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* lista megmutatása */
.show { width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: var(--bg); overflow: auto; }
.show-inner { width: min(900px, 100% - 32px); margin: 0 auto; padding-block: 28px 50px; }
.show-head { text-align: center; margin: 14px 0 28px; }
.show-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-block: 10px 6px; }
.show-note { background: var(--blush); border-radius: 16px; padding: 14px 18px; margin: 14px auto 0; max-width: 560px; white-space: pre-wrap; overflow-wrap: anywhere; }
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.show-item { background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.show-item .pic { aspect-ratio: 1; }
.show-item div:last-child { padding: 12px 14px 14px; }
.show-item b { display: block; font-family: var(--display); line-height: 1.25; margin-bottom: 4px; }
.show-item .count { position: absolute; top: 10px; right: 10px; background: var(--ink); color: #fff; border-radius: 99px; padding: 3px 12px; font-weight: 800; }
.show-total { margin-top: 24px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 20px 26px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.show-total .price { font-size: 2rem; }
.show-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.bar { position: fixed; left: 50%; translate: -50% 0; bottom: 18px; z-index: 15; background: var(--ink); color: #fff; border-radius: 99px; padding: 8px 8px 8px 22px; display: flex; align-items: center; gap: 18px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.toast { position: fixed; left: 50%; translate: -50% 0; top: 20px; background: var(--sage); color: #fff; padding: 12px 22px; border-radius: 16px; font-weight: 700; box-shadow: var(--shadow-lg); width: max-content; max-width: calc(100% - 30px); text-align: center; border: 0; margin: 0; }

/* admin */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; max-height: 100vh; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: min(360px, 100%); }
.login-form h1 { font-size: 2rem; margin: 26px 0 6px; }
.login-form p { color: var(--muted); margin-bottom: 24px; }
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: #36261f; color: #f3e6dc; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.side .logo { margin: 0 8px 26px; }
.side .logo small { color: #cbb7aa; }
.side nav { display: grid; gap: 6px; }
.side nav button, .side a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 13px; text-align: left; font-weight: 700; text-decoration: none; }
.side nav button:hover, .side a.nav:hover { background: rgba(255, 255, 255, .08); }
.side nav button[aria-current="true"] { background: var(--primary); color: #fff; }
.side .bottom { margin-top: auto; display: grid; gap: 4px; }
.main-area { padding: 30px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--surface); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel + .panel { margin-top: 18px; }
.panel h3 { margin-bottom: 14px; }
.panel-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.panel-tools .search { margin: 0; min-width: 200px; }
.item { display: grid; grid-template-columns: 24px 58px minmax(150px, 2fr) 1.4fr 100px 110px auto; gap: 14px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.item .pic { width: 58px; height: 58px; border-radius: 12px; overflow: hidden; }
.item small { color: var(--muted); display: block; }
.item .flag { justify-self: start; border: 1px solid var(--line); }
.item .actions { display: flex; gap: 6px; }
.editor { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; padding: 28px; }
.drop { display: grid; place-items: center; text-align: center; border: 2px dashed #d8c1af; border-radius: 18px; padding: 18px; cursor: pointer; color: var(--muted); margin-top: 12px; font-size: .9rem; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--blush); }
.drop b { color: var(--ink); }
.preview { aspect-ratio: 1; border-radius: 18px; overflow: hidden; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
pre { background: #36261f; color: #f5e9df; padding: 16px; border-radius: 14px; overflow: auto; font-size: .8rem; line-height: 1.5; max-height: 360px; }
details { margin-top: 14px; }
summary { cursor: pointer; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.chips-edit { display: flex; flex-wrap: wrap; gap: 8px; }

.btn-ai { background: linear-gradient(100deg, #7a4fc0, #b4503b); color: #fff; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #f1ebf9; border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; }
.ai-box b { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: #5d3a99; }
.ai-pic { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ai-box select { padding: 6px 10px; font-size: .875rem; }
.ai-note { background: #f1ebf9; border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin-bottom: 14px; }
.ai-modal { width: min(620px, 100% - 28px); }
.ai-new { padding: 26px 24px; }
.ai-new h2 { display: flex; align-items: center; gap: 10px; padding-right: 40px; }
.ai-new .hint { margin: 8px 0 12px; text-align: left; }
.ai-new .shots { margin-bottom: 12px; }
.progress { list-style: none; display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.progress li::before { content: '○ '; color: var(--muted); }
.progress li.done::before { content: '✓ '; color: var(--sage); }
.rights { display: grid; gap: 10px; margin-bottom: 14px; }

.item.selected { background: #fbeee8; }
.pick-box { display: grid; place-items: center; align-self: stretch; cursor: pointer; }
.pick-box input, .select-all input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.item-name .flag { display: inline-block; margin-top: 3px; }
.select-all { display: flex; align-items: center; gap: 12px; padding: 8px 2px; font-weight: 700; font-size: .88rem; cursor: pointer; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; top: 8px; z-index: 5; padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: var(--ink); color: #fff; }
.bulk select, .bulk input { padding: 7px 10px; font-size: .875rem; color: var(--ink); border-radius: 11px; border: 1.5px solid var(--line); background: var(--surface); }
.bulk input { width: 100px; }
.bulk .btn-ghost { color: var(--ink); }
.bulk .link { color: #fff; }
.bulk-price { display: flex; gap: 6px; }
.catbar { background: var(--surface); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
#acats { margin-bottom: 12px; }
.cat.off { border-style: dashed; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding-block: 11px; border-top: 1px solid var(--line); }
.cat-row small, .trash-row small { display: block; color: var(--muted); }
.cat-row .switch { margin: 0; }
.trash-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding-block: 12px; border-top: 1px solid var(--line); }
.trash-row .pic { width: 58px; height: 58px; border-radius: 12px; }
.trash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint.left { text-align: left; margin: 0 0 12px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--sun); color: var(--ink); font-size: .75rem; font-weight: 800; text-align: center; }
.nav-count:empty { display: none; }
.flag.soldout { background: var(--ink); color: #fff; }
.flag.preorder { background: var(--sun); color: var(--ink); }
.card.soldout .card-media .pic { filter: grayscale(.75); opacity: .75; }
.price-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.stock-note { display: block; font-style: normal; font-weight: 800; font-size: .8rem; color: var(--primary); }
.btn:disabled, .piece:disabled, .qty button:disabled { opacity: .5; cursor: default; box-shadow: none; }
.piece:disabled:hover { border-color: var(--line); }

@media (max-width: 1200px) {
  .item { grid-template-columns: 24px 58px minmax(0, 1fr) auto; gap: 4px 12px; }
  .item .pick-box { grid-column: 1; grid-row: 1 / span 3; }
  .item > .pic { grid-column: 2; grid-row: 1 / span 2; }
  .item .item-tags { display: none; }
  .item .item-name, .item > .item-price, .item > .flag { grid-column: 3; }
  .item .actions { grid-column: 4; grid-row: 1 / span 3; display: grid; grid-template-columns: auto auto; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .collage { max-width: 500px; width: 100%; justify-self: center; }
  .product, .editor { grid-template-columns: minmax(0, 1fr); }
  .info { padding: 6px 22px 26px; }
  .gallery .main > img { max-height: 46vh; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .admin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { min-width: 0; }
  .side { padding: 14px; }
  .side .logo { margin-bottom: 10px; }
  .side nav, .side .bottom { display: flex; flex-wrap: wrap; margin: 0; }
  .side nav button, .side a.nav { width: auto; white-space: nowrap; font-size: .85rem; padding: 8px 11px; gap: 7px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .top .wrap { flex-wrap: wrap; gap: 10px; padding-block: 10px; justify-content: space-between; }
  .top .search { order: 3; flex-basis: 100%; max-width: none; }
  .panel-tools .search { flex-basis: 100%; max-width: none; }
  .item { grid-template-columns: 24px 58px minmax(0, 1fr); }
  .item .actions { grid-column: 2 / -1; grid-row: auto; display: flex; justify-content: flex-end; }
  .bulk { position: static; }
  .trash-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .list-btn .label { display: none; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { border-radius: 17px; }
  .card-body { padding: 11px 11px 13px; gap: 6px; }
  .card h3 { font-size: .98rem; }
  .card .tags { display: none; }
  .card .price { font-size: 1.08rem; }
  .card-foot .btn { width: 100%; padding-inline: 8px; }
  .pick { width: 36px; height: 36px; top: 7px; right: 7px; }
  .flags { top: 8px; left: 8px; flex-direction: column; align-items: start; gap: 4px; }
  .flag { font-size: .66rem; padding: 3px 8px; }
  .show-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .two, .send { grid-template-columns: 1fr; }
  .editor { padding: 20px 16px; }
  #tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #tags .tag { flex: none; }
}

@media (max-width: 380px) {
  .top .logo { gap: 8px; }
  .top .logo-mark { width: 34px; height: 34px; }
  .top .logo b { font-size: 1.05rem; }
  .top .logo small { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

@media print {
  body > *:not(.show) { display: none !important; }
  .show { position: static; }
  .show-actions, .show .close { display: none !important; }
}

/* éles oldal */
.side .bottom form { display: contents; }
.side button.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 13px; text-align: left; font-weight: 700; }
.side button.nav:hover { background: rgba(255, 255, 255, .08); }
.side a.nav { color: inherit; }
.danger { background: #8f2d1d; color: #fff; padding: 14px 20px; text-align: center; }
.form-error { background: #fbe3de; color: #8f2d1d; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 700; }
#ai-new-key input { font-family: ui-monospace, monospace; font-size: .85rem; }
#ai-help { white-space: pre-wrap; overflow-wrap: anywhere; }
a.btn { text-decoration: none; }
@media (max-width: 900px) {
  .side button.nav { width: auto; white-space: nowrap; font-size: .85rem; padding: 8px 11px; gap: 7px; }
}

/* segéd kulcs nélkül (saját AI-csevegő) */
.ai-chat, .chat-step { background: #f1ebf9; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: .9rem; }
.ai-chat p, .chat-step p { margin: 0 0 10px; }
.chat-step > b { display: block; margin-bottom: 4px; color: #5d3a99; }
.chat-step .btn { margin-right: 12px; }
.chat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.chat-links { display: block; margin: 10px 0 0; }
.ai-chat .chat-links { margin: 0 0 10px; }
.prompt { margin: 10px 0; }
.prompt summary { cursor: pointer; font-weight: 700; }
.prompt textarea { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: .82rem; }
.ai-new .form-actions { flex-wrap: wrap; }

.show-gone { border: 1.5px dashed var(--primary); }
.field small.over { color: var(--primary); font-weight: 700; }
