/* CreaNext Sites: landing page and website editor. */
[hidden] { display: none !important; }
body.sb { background: var(--paper); color: var(--ink); }
body.sb footer { margin-top: 0; }
body.sb.editing { overflow: hidden; height: 100dvh; }

.sb input, .sb select, .sb textarea {
    width: 100%; min-height: 46px; padding: 0.6rem 0.75rem; font: 400 16px/1.4 var(--font-main);
    color: var(--ink); background: #fff; border: 1px solid #B6BFC6; border-radius: 6px;
}
.sb textarea { resize: vertical; min-height: 92px; }
.sb input:focus, .sb select:focus, .sb textarea:focus { outline: 2px solid var(--saffron); outline-offset: 0; border-color: var(--saffron); }
.sb input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--saffron-deep); }
.sb input[type="color"] { padding: 2px; width: 46px; }
button.primary { min-height: 48px; padding: 0.6rem 1.25rem; border: 0; border-radius: 6px; background: var(--saffron); color: var(--ink-deep); font: 700 1.0625rem var(--font-main); cursor: pointer; }
button.primary:hover:not(:disabled) { background: var(--marigold); }
button.primary:disabled { opacity: 0.55; cursor: progress; }
button.ghost { min-height: 46px; padding: 0.5rem 1rem; border: 1px solid var(--ink); border-radius: 6px; background: transparent; color: var(--ink); font: 600 1rem var(--font-main); cursor: pointer; white-space: nowrap; }
button.ghost:hover { background: var(--ink); color: var(--cream); }
.row { display: flex; gap: 0.5rem; }
.err { color: #B3202A; font-weight: 600; margin-top: 0.5rem; }

/* Landing */
.lp-hero { background: var(--ink); color: var(--cream); padding: calc(var(--header-height) + 3.5rem) 0 4rem; }
.lp-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; }
.lp-offer { display: inline-block; margin-bottom: 1.25rem; padding: 0.3rem 0.75rem; border-radius: 4px; background: var(--marigold); color: var(--ink-deep); font-weight: 600; }
.lp-hero h1 { font-size: clamp(3rem, 6vw, 5.25rem); line-height: 1.02; margin-bottom: 1.25rem; }
.lp-sub { font-size: 1.25rem; line-height: 1.5; max-width: 31rem; color: #E4E9EC; margin-bottom: 1.5rem; }
.lp-points { list-style: none; }
.lp-points li { padding-left: 1.75rem; position: relative; margin-bottom: 0.4rem; font-size: 1.125rem; }
.lp-points li::before { content: '\f00c'; font: 900 0.95rem 'Font Awesome 6 Free'; position: absolute; left: 0; top: 0.3rem; color: var(--marigold); }
.lp-resume { margin-top: 1.25rem; } .lp-resume a { color: var(--marigold); font-weight: 600; text-decoration: underline; }

.start-card { background: var(--paper); color: var(--ink); padding: 1.75rem; border-radius: 10px; scroll-margin-top: 100px; }
.start-card h2 { font-size: 1.875rem; margin-bottom: 0.75rem; }
.start-card label { display: block; font-weight: 600; margin: 0.8rem 0 0.25rem; } .start-card label span { font-weight: 400; color: #4C5C69; }
.start-card .hint { font-size: 0.9375rem; color: #4C5C69; margin-top: 0.3rem; }
.start-card .hint.ok { color: #1F6B3B; font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.start-card .primary { width: 100%; margin-top: 1.1rem; min-height: 54px; font-size: 1.125rem; }

.lp-band, .lp-price, .lp-faq { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.sb main h2 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); line-height: 1.08; }
.start-card h2 { font-size: 1.875rem !important; }
.lp-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin-top: 2.5rem; }
.lp-features h3 { font-size: 1.25rem; margin-bottom: 0.4rem; } .lp-features p { color: #41515F; }
.lp-price { background: var(--cream); }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.price-grid > div > p { font-size: 1.1875rem; color: #41515F; margin-top: 0.75rem; }
.price-card { background: var(--ink); color: var(--cream); padding: 2rem; border-radius: 10px; }
.price-card p.pr-now { font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--cream); margin: 0; }
.price-card .pr-now small { font: 500 1.125rem var(--font-main); margin-left: 0.4rem; }
.price-card p.pr-coupon { color: var(--marigold); margin: 0.75rem 0 1.25rem; }
.price-card ul { list-style: none; margin-bottom: 1.5rem; } .price-card li { padding: 0.4rem 0; border-top: 1px solid rgba(251,239,223,.16); }
.lp-faq .container { max-width: 800px; }
.lp-faq h2 { margin-bottom: 1.5rem; }
.lp-faq details { border-top: 1px solid rgba(6,38,61,.22); padding: 1rem 0; }
.lp-faq summary { font-size: 1.1875rem; font-weight: 600; cursor: pointer; }
.lp-faq details p { margin-top: 0.5rem; color: #41515F; } .lp-faq form { margin-top: 0.75rem; }

/* Editor */
#editor { position: fixed; inset: 0; display: flex; flex-direction: column; background: #E9E5DD; z-index: 50; }
.ed-top { display: flex; align-items: center; gap: 0.9rem; height: 60px; padding: 0 1rem; background: var(--ink); color: var(--cream); flex: none; }
.ed-logo { width: 43px; height: 28px; background: no-repeat center / contain url("../images/logo-mark.png?v=20261108"); flex: none; }
#edName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
#saveState { font-size: 0.9375rem; color: #BCC8D1; margin-right: auto; white-space: nowrap; }
.ed-device { display: flex; border: 1px solid rgba(251,239,223,.35); border-radius: 6px; overflow: hidden; }
.ed-device button { width: 44px; height: 40px; border: 0; background: transparent; color: var(--cream); cursor: pointer; }
.ed-device button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.ed-top .primary { min-height: 42px; padding: 0.3rem 1.1rem; }
.ed-tabs { display: none; }
.ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); }
#panel { overflow-y: auto; background: var(--paper); border-right: 1px solid #D5D0C6; padding-bottom: 3rem; }
.ed-view { display: flex; justify-content: center; padding: 1rem; min-height: 0; }
.frame { width: 100%; height: 100%; background: #fff; box-shadow: 0 2px 14px rgba(6,38,61,.16); border-radius: 8px; overflow: hidden; transition: width 0.2s; }
.frame.phone { width: 390px; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.plan-note { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 1rem; background: var(--marigold); color: var(--ink-deep); font-weight: 600; }
.plan-note .ghost { min-height: 42px; }
.pn-switch { display: grid; grid-template-columns: 1fr 1fr; position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid #D5D0C6; }
.pn-switch button { min-height: 50px; border: 0; background: none; font: 600 1rem var(--font-main); color: #4C5C69; cursor: pointer; border-bottom: 3px solid transparent; }
.pn-switch button.on { color: var(--ink); border-bottom-color: var(--saffron); }

.acc { border-bottom: 1px solid #DDD8CD; }
.acc-head { display: flex; align-items: center; gap: 0.4rem; padding: 0 0.6rem 0 1rem; min-height: 54px; }
.acc-title { flex: 1; background: none; border: 0; text-align: left; font: 600 1.0625rem var(--font-main); color: var(--ink); cursor: pointer; min-height: 54px; display: flex; align-items: center; gap: 0.5rem; }
.acc-title::after { content: '\f078'; font: 900 0.7rem 'Font Awesome 6 Free'; margin-left: auto; color: #6B7884; transition: transform 0.15s; }
.acc.open .acc-title::after { transform: rotate(180deg); }
.acc.off .acc-title { color: #76838E; }
.icon-btn { width: 36px; height: 36px; border: 0; background: none; color: #4C5C69; border-radius: 4px; cursor: pointer; }
.icon-btn:hover { background: rgba(6,38,61,.08); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.acc-body { display: none; padding: 0.25rem 1rem 1.25rem; }
.acc.open .acc-body { display: block; }
.toggle { position: relative; width: 44px; height: 26px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; background: #A9B3BB; border-radius: 99px; pointer-events: none; transition: background 0.15s; }
.toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.15s; }
.toggle input:checked + span { background: var(--saffron-deep); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.fld { margin-bottom: 0.8rem; } .fld > label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.fld .tip { font-size: 0.875rem; color: #4C5C69; margin-top: 0.2rem; }
.img-fld { display: flex; align-items: center; gap: 0.6rem; }
.img-fld .thumb { width: 64px; height: 64px; border-radius: 6px; background: #E6E1D7 center / cover no-repeat; flex: none; }
.img-fld label.up { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem; border: 1px solid var(--ink); border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.9375rem; }
.img-fld label.up:focus-within { outline: 2px solid var(--saffron); }
.img-fld input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.stock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-top: 0.5rem; }
.stock { aspect-ratio: 3/2; min-height: 44px; border: 2px solid transparent; border-radius: 6px; background: #E6E1D7 center / cover no-repeat; cursor: pointer; }
.stock.on { border-color: var(--saffron-deep); box-shadow: 0 0 0 1px var(--saffron-deep); }
.link-btn { background: none; border: 0; color: #B3202A; font: 600 0.9375rem var(--font-main); cursor: pointer; min-height: 40px; padding: 0 0.3rem; }
.list-card { padding: 0.75rem; background: #fff; border: 1px solid #DDD8CD; border-radius: 6px; margin-bottom: 0.6rem; }
.list-card .rm { text-align: right; }
.add { width: 100%; }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.6rem; }
.gal-grid div { position: relative; aspect-ratio: 1; background: center / cover no-repeat; border-radius: 4px; }
.gal-grid button { position: absolute; top: 3px; right: 3px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.hrs { display: grid; grid-template-columns: 2.5rem 1fr 1fr auto; gap: 0.3rem; align-items: center; margin-bottom: 0.3rem; font-size: 0.9375rem; }
.hrs input[type=time] { padding: 0.3rem; font-size: 16px; min-height: 42px; }
.hrs label { display: flex; align-items: center; gap: 0.2rem; }

.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; padding: 1rem; }
.style-opt { min-height: 88px; padding: 0.75rem; text-align: left; background: #fff; border: 2px solid #DDD8CD; border-radius: 8px; cursor: pointer; color: var(--ink); }
.style-opt.on { border-color: var(--saffron-deep); }
.style-opt b { display: block; font-size: 1.375rem; line-height: 1.1; } .style-opt small { color: #4C5C69; font-size: 0.875rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0 1rem 1rem; }
.swatches button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #B6BFC6; cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.pn-h { padding: 1rem 1rem 0.5rem; font-weight: 700; font-size: 1.0625rem; }
.pad { padding: 0 1rem 1rem; }

/* Publish dialog and success screen */
#publishDlg { width: min(460px, calc(100vw - 24px)); max-height: 92dvh; padding: 1.5rem; border: 0; border-radius: 10px; color: var(--ink); background: var(--paper); margin: auto; }
#publishDlg::backdrop { background: rgba(4,26,43,.65); }
#publishDlg h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.slug { display: flex; align-items: center; background: #fff; border: 1px solid #B6BFC6; border-radius: 6px; }
.slug input { border: 0; min-width: 0; flex: 1; background: none; }
.slug span { padding-right: 0.75rem; color: #4C5C69; white-space: nowrap; }
.name-step > label { font-size: 1.125rem; }
.slug-big { border: 2px solid var(--ink); margin-top: 0.4rem; }
.slug-big input { font-size: 1.125rem !important; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.chip { min-height: 40px; padding: 0.2rem 0.7rem; border: 1px solid #B6BFC6; border-radius: 99px; background: #fff; color: var(--ink); font: 500 0.9375rem var(--font-main); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip:hover { border-color: var(--ink); }
.check { font-size: 0.9375rem; font-weight: 600; min-height: 1.5em; margin-top: 0.2rem; }
.check.good { color: #1F6B3B; } .check.bad { color: #B3202A; }
.or { text-align: center; margin: 0.6rem 0; color: #4C5C69; }
.auth-switch { margin-top: 0.8rem; text-align: center; }
.text-btn { background: none; border: 0; padding: 0.5rem 0.2rem; font: 600 0.9375rem var(--font-main); color: var(--saffron-deep); text-decoration: underline; cursor: pointer; min-height: 44px; }
.mine-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid #DDD8CD; }
.mine-row small { color: #4C5C69; word-break: break-all; }
.ghost-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--ink); border-radius: 6px; font-weight: 600; }
.totals { margin: 0.9rem 0; padding: 0.75rem 0; border-block: 1px solid #DDD8CD; }
.totals div { display: flex; justify-content: space-between; } .totals .sum { font-size: 1.375rem; font-weight: 700; margin-top: 0.25rem; }
.agree { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.6rem 0 1rem; font-size: 0.9375rem; } .agree a { text-decoration: underline; }
.agree input { flex: none; }
.dlg-acts { display: flex; gap: 0.5rem; } .dlg-acts .primary { flex: 1; }

#doneScreen { position: fixed; inset: 0; z-index: 60; background: var(--ink); color: var(--cream); display: grid; place-items: center; padding: 1.25rem; overflow-y: auto; }
.done-box { width: min(560px, 100%); }
.done-box h1 { font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.05; margin-bottom: 0.75rem; }
.done-url { display: block; padding: 0.9rem 1rem; margin: 1rem 0; background: var(--ink-raised); border-radius: 6px; font-size: 1.25rem; font-weight: 600; color: var(--marigold); word-break: break-all; }
.done-box p { color: #E4E9EC; margin-bottom: 0.75rem; }
.done-acts { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.done-acts .ghost { border-color: var(--cream); color: var(--cream); text-decoration: none; display: inline-flex; align-items: center; }
.done-acts .ghost:hover { background: var(--cream); color: var(--ink); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; padding: 0.75rem 1.1rem; background: var(--ink-deep); color: #fff; border-radius: 6px; max-width: calc(100vw - 32px); }

@media (max-width: 960px) {
    .lp-grid, .price-grid { grid-template-columns: 1fr; gap: 2.25rem; }
    .lp-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .lp-features { grid-template-columns: 1fr; }
    #saveState, .ed-device { display: none; }
    #edName { margin-right: auto; max-width: 45vw; }
    .ed-tabs { display: grid; grid-template-columns: 1fr 1fr; flex: none; background: var(--paper); }
    .ed-tabs button { min-height: 46px; border: 0; background: none; font: 600 1rem var(--font-main); color: #4C5C69; border-bottom: 3px solid transparent; }
    .ed-tabs button.on { color: var(--ink); border-bottom-color: var(--saffron); }
    .ed-body { grid-template-columns: 1fr; }
    .ed-view { display: none; padding: 0; }
    .ed-body.show-view #panel { display: none; }
    .ed-body.show-view .ed-view { display: flex; }
    .frame { border-radius: 0; box-shadow: none; }
    #panel { border-right: 0; }
}
