/* Choco Toni admin: the site's colours and font, the leafy background of the cart page, a side menu on the left */
@font-face {
  font-family: 'Montserrat Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/montserrat-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/fonts/montserrat-ro-wght-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0150-0151, U+015E-015F, U+0162-0163, U+0170-0171, U+0218-021B;
}
:root {
  --choco: #331f16; --choco-deep: #1a0d07; --gold: #e0a23a; --gold-soft: #f3c77a; --cream: #f6ece2;
  --ink: #f4ede7; --ink-soft: #d9cbbf; --muted: #b49f90; --red: #e02b20; --green: #7cc28a;
  --line: rgba(224, 162, 58, .24); --sans: 'Montserrat Variable', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --glass: linear-gradient(180deg, rgba(52, 24, 12, .82), rgba(20, 8, 3, .9));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--choco-deep); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
.bg { position: fixed; inset: 0; z-index: -1; background: #1c0b05 url('/img/fundal-frunze-choco-toni.webp') 72% 50% / cover no-repeat; }
.bg::after { content: ''; position: absolute; inset: 0; background: rgba(12, 5, 2, .35); }
a { color: var(--gold-soft); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--cream); }
h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 22px; border-radius: 999px; border: 2px solid transparent; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: #c4231a; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn--ghost { background: transparent; border-color: var(--gold); color: var(--gold-soft); }
.btn--ghost:hover { background: var(--gold); color: var(--choco-deep); }
.btn--danger { background: transparent; border-color: #ff8a80; color: #ffb3ab; }
.btn--danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn--small { min-height: 34px; padding: 5px 14px; font-size: 11.5px; }
.link { background: none; border: 0; padding: 0; color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; }
.link--danger { color: #ffb3ab; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login__card { width: min(420px, 100%); padding: 34px 28px 28px; }
.login__brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; text-align: center; }
.login__brand img { width: 74px; }
.login__brand span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.login .field { margin-bottom: 14px; }
.login .btn { width: 100%; margin-top: 6px; }

/* shell: side menu + content */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .38); }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
/* phones: the crown and "Ieșire" on top, the menu under them (scrolls sideways if it must) */
.side { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'brand . foot' 'nav nav nav'; align-items: center; gap: 6px 12px; padding: 8px 12px; background: rgba(20, 8, 3, .94); border-bottom: 1px solid var(--line); }
.side__brand { grid-area: brand; display: flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; font-weight: 800; white-space: nowrap; }
.side__brand img { width: 40px; }
.side__brand span { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.side__foot { grid-area: foot; }
.side nav { grid-area: nav; display: flex; gap: 4px; overflow-x: auto; }
.side nav a, .side__out { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.side nav a:hover, .side__out:hover { color: #fff; background: rgba(224, 162, 58, .14); }
.side nav a[aria-current='page'] { color: var(--choco-deep); background: var(--gold); }
.side__user { display: none; }
.content { padding: 22px 14px 120px; min-width: 0; }
@media (min-width: 900px) {
  .shell { grid-template-columns: 250px 1fr; }
  .side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 26px 16px; border-bottom: 0; border-right: 1px solid var(--line); }
  .side__brand { flex-direction: column; gap: 6px; margin-bottom: 22px; text-align: center; }
  .side__brand img { width: 72px; }
  .side__brand span { display: block; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
  .side nav { flex-direction: column; margin: 0; }
  .side nav a, .side__out { padding: 11px 14px; font-size: 14.5px; }
  .side__foot { margin-top: auto; }
  .side__user { display: block; padding: 0 14px 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
  .content { padding: 38px 40px 140px; }
}
.content__inner { max-width: 1040px; margin: 0 auto; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.head h1 { margin: 0; }
.head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.note { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--ink-soft); font-size: 13px; }

/* the product list */
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 8, 3, .6); color: var(--ink-soft); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--gold); border-color: var(--gold); color: var(--choco-deep); }
.search { flex: 1 1 200px; max-width: 320px; min-height: 38px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 8, 3, .7); color: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 64px 1fr; gap: 12px 14px; align-items: center; padding: 12px 14px; }
.row__img { width: 64px; height: 64px; border-radius: 12px; background: #f6ece2; object-fit: contain; padding: 4px; }
.row__name { font-weight: 700; color: var(--cream); text-decoration: none; font-size: 15px; }
.row__name:hover { color: var(--gold-soft); }
.row__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.row__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
@media (min-width: 760px) { .row { grid-template-columns: 64px 1fr auto; } .row__actions { grid-column: auto; justify-content: flex-end; } }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid; }
.pill--on { color: var(--green); border-color: rgba(124, 194, 138, .5); }
.pill--off { color: #ffb3ab; border-color: rgba(255, 138, 128, .5); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* switch (available / unavailable) */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--ink-soft); user-select: none; }
.switch input { appearance: none; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: #6b4430; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: #3f9b52; }
.switch input:checked::after { transform: translateX(18px); }

/* forms */
.section { padding: 20px 18px; margin-bottom: 16px; }
@media (min-width: 760px) { .section { padding: 24px 26px; } }
.section > h2 { margin-bottom: 4px; }
.section > .help { margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: 2fr 1fr 1fr; } .span-2 { grid-column: span 2; } }
.field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--cream); }
.field label small { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid #ead8c2; background: #fbf4ec; color: #2a160b; font-size: 15px; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(224, 162, 58, .3); }
.field input[readonly] { background: #e9ddd0; color: #6b4a36; }
.field .invalid { border-color: #ff8a80; box-shadow: 0 0 0 3px rgba(255, 138, 128, .25); }
.help { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.error { margin: 5px 0 0; font-size: 12.5px; color: #ffb3ab; font-weight: 600; }
.count { float: right; font-weight: 600; font-size: 12px; color: var(--muted); }
.count--warn { color: #ffcf8a; }
.prefix, .suffix { display: flex; align-items: stretch; }
.prefix span, .suffix span { display: flex; align-items: center; padding: 0 10px; background: #e9ddd0; color: #6b4a36; font-size: 13px; border: 1px solid #ead8c2; }
.prefix span { border-radius: 12px 0 0 12px; border-right: 0; }
.prefix input { border-radius: 0 12px 12px 0; }
.suffix span { border-radius: 0 12px 12px 0; border-left: 0; }
.suffix input { border-radius: 12px 0 0 12px; }
.nutri { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .nutri { grid-template-columns: repeat(4, 1fr); } }
.nutri .field label { font-size: 12px; font-weight: 600; }

/* picture slots */
.slots { display: grid; gap: 14px 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1000px) { .slots { grid-template-columns: repeat(4, 1fr); } }
.nutri-title { margin-top: 22px; }
.slot { display: flex; flex-direction: column; gap: 8px; }
.slot__title { font-size: 13px; font-weight: 700; color: var(--cream); }
.slot__box { position: relative; aspect-ratio: 1; border-radius: 14px; border: 2px dashed rgba(224, 162, 58, .45); background: rgba(246, 236, 226, .06); display: grid; place-items: center; overflow: hidden; }
.slot__box img { width: 100%; height: 100%; object-fit: contain; background: #f6ece2; }
.slot__box--photo img { object-fit: cover; }
.slot__pick { display: grid; place-items: center; gap: 4px; width: 100%; height: 100%; padding: 14px; border: 0; background: none; color: var(--gold-soft); font-weight: 700; font-size: 13px; text-align: center; cursor: pointer; }
.slot__pick small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.slot__busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 8, 3, .75); font-size: 13px; color: var(--cream); }
.slot__name { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.4; }
.slot__actions { display: flex; flex-wrap: wrap; gap: 6px 12px; }

/* Google preview */
.serp { padding: 16px 18px; border-radius: 12px; background: #fff; color: #202124; font-family: Arial, sans-serif; max-width: 640px; }
.serp__site { font-size: 12px; color: #4d5156; margin-bottom: 4px; }
.serp__title { font-size: 19px; line-height: 1.3; color: #1a0dab; margin-bottom: 4px; overflow-wrap: anywhere; }
.serp__desc { font-size: 13.5px; line-height: 1.55; color: #4d5156; overflow-wrap: anywhere; }

/* the save bar under the form */
.bar { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; margin-top: 8px; border-radius: 16px 16px 0 0; background: rgba(20, 8, 3, .95); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .4); }
.bar__status { font-size: 13px; color: var(--ink-soft); }
.bar__right { margin-left: auto; display: flex; gap: 10px; }

/* dialogs */
.dialog { width: min(460px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #24120a; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.dialog--wide { width: min(820px, calc(100% - 24px)); }
.dialog::backdrop { background: rgba(8, 3, 1, .72); }
.dialog form { padding: 24px 22px 20px; }
.dialog__text { color: var(--ink-soft); }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.settings { display: grid; gap: 18px; }
@media (min-width: 700px) { .settings { grid-template-columns: 300px 1fr; } }
.settings__preview { margin: 0; }
.settings__preview img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: #f6ece2; }
.settings__preview figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }
.settings__fields { display: grid; gap: 14px; align-content: start; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; translate: -50% 0; width: max-content; max-width: calc(100% - 24px); margin: 0; padding: 12px 20px; border-radius: 999px; background: #f6ece2; color: #2a160b; font-weight: 700; font-size: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.toast--error { background: #ffd9d4; color: #6b0e08; }
