*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#eef2f7;color:#1f2937}
a{cursor:pointer}
button,input,textarea{font:inherit}

/* Builder shell */
body.builder-body{height:100vh;overflow:hidden}
.app-shell{height:100vh;display:grid;grid-template-columns:360px minmax(0,1fr);overflow:hidden}
.left-panel{height:100vh;background:#fff;border-right:1px solid #d8dee8;padding:18px;display:flex;flex-direction:column;overflow:hidden}
.preview-area{height:100vh;min-width:0;padding:20px;display:flex;flex-direction:column;overflow:hidden}

.brand-row{display:flex;gap:12px;align-items:center;margin-bottom:14px;flex:0 0 auto}
.brand-mark{width:42px;height:42px;border-radius:14px;background:#4f46e5;color:#fff;font-weight:900;display:grid;place-items:center}
.brand-row h1{font-size:23px;margin:0;color:#111827}
.brand-row p,.small-note{font-size:13px;color:#64748b;line-height:1.45;margin:4px 0}
.action-box{border:1px solid #e5e7eb;border-radius:16px;padding:12px;background:#f8fafc;margin-bottom:16px;flex:0 0 auto}
.btn{display:block;width:100%;border:0;border-radius:12px;padding:12px 14px;margin:8px 0;text-align:center;font-weight:800;cursor:pointer;text-decoration:none}
.btn-primary{background:#4f46e5;color:#fff}
.btn-dark{background:#111827;color:#fff}
.btn:hover{filter:brightness(.94)}

.editor-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:14px 0;flex:0 0 auto}
.tab{border:1px solid #e5e7eb;background:#fff;padding:11px 8px;border-radius:12px;font-weight:800;cursor:pointer;color:#111827}
.tab.active{background:#4f46e5;color:#fff;border-color:#4f46e5}
.editor-panel{display:none;min-height:0}
.editor-panel.active{display:block;overflow-y:auto;max-height:calc(100vh - 250px);padding-right:6px}
.editor-panel h2{font-size:18px;margin:16px 0 4px;color:#111827}
.widget-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.block-template{cursor:grab;border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:14px;box-shadow:0 2px 8px rgba(15,23,42,.05);min-height:86px;transition:.18s ease}
.block-template:hover{border-color:#4f46e5;transform:translateY(-1px)}
.block-template span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;margin-bottom:7px}
.block-template strong{display:block;font-size:15px;color:#111827}

.topbar{height:54px;flex:0 0 auto;border:1px solid #d8dee8;border-radius:16px;background:#fff;margin-bottom:18px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;box-shadow:0 6px 18px rgba(15,23,42,.06)}
.topbar span{color:#64748b;font-size:14px}
.page-preview{flex:1;width:100%;max-width:none;margin:0;background:#f8fafc;border:1px solid #d8dee8;border-radius:20px;padding:18px;box-shadow:0 10px 28px rgba(15,23,42,.08);overflow-y:auto;overflow-x:hidden;min-height:0}
.editor-zone{margin-bottom:18px}
.zone-title{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px;font-size:13px;color:#475569;text-transform:uppercase;letter-spacing:.08em;font-weight:900}
.zone-title button{border:1px solid #d8dee8;background:#fff;border-radius:999px;padding:6px 12px;cursor:pointer;color:#475569}
.canvas{width:100%;min-height:120px;background:#fff;border:2px dashed #cbd5e1;border-radius:16px;overflow:visible}
.editor-zone[data-zone=header] .canvas{min-height:220px;max-height:none}
.editor-zone[data-zone=content] .canvas{min-height:850px;max-height:none}
.editor-zone[data-zone=footer] .canvas{min-height:220px;max-height:none}
.empty{color:#94a3b8;text-align:center;padding:48px 20px}
.section-block{position:relative;background:#fff;width:100%}
.section-block:hover{outline:2px solid #4f46e5;z-index:2}
.tools{position:absolute;right:10px;top:10px;display:none;gap:6px;z-index:20;flex-wrap:wrap}
.section-block:hover .tools{display:flex}
.tools button{background:#111827;color:#fff;border:0;font-size:12px;border-radius:999px;padding:6px 10px;cursor:pointer}
.sortable-ghost{opacity:.35}
.sortable-chosen{outline:2px solid #4f46e5}

/* Page content */
.container{width:100%;max-width:1400px;margin:0 auto;padding-left:24px;padding-right:24px}
.clean-header{padding:18px 0;background:#fff}
.nav-row{display:flex;align-items:center;justify-content:space-between;gap:22px}
.logo{font-size:22px;font-weight:900;text-decoration:none;color:#111827;white-space:nowrap}
.nav-row nav,.footer-row nav{display:flex;gap:18px;flex-wrap:wrap;align-items:center}
.nav-row a,.footer-row a,.footer-grid a{color:#475569;text-decoration:none}
.announcement{background:#111827;color:#fff;padding:12px 0}
.announcement-row{display:flex;justify-content:center;align-items:center;gap:16px;text-align:center}
.announcement strong{color:#fbbf24}
.hero-header{padding:56px 0;background:linear-gradient(135deg,#eef2ff,#fdf2f8)}
.page-section{padding:72px 0}
.soft-bg{background:#f8fafc}
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:42px;align-items:center}
.hero h2,.section-title{font-size:44px;line-height:1.05;margin:0 0 20px;color:#111827}
.hero p,.section-lead{font-size:18px;line-height:1.7;color:#4b5563}
.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:13px!important;font-weight:800;color:#4f46e5!important}
.button-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:28px}
.site-btn{border:0;border-radius:9px;padding:12px 20px;font-size:16px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;line-height:1.2}
.site-btn.primary{background:#4f46e5;color:#fff}
.site-btn.secondary{background:#eef2ff;color:#312e81}
.site-btn.tiny{padding:8px 13px;font-size:13px;background:#fff;color:#111827}
.site-btn.light{background:#fff;color:#0f172a}
.site-btn.outline-light{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.7)}
.placeholder{min-height:300px;border-radius:18px;background:linear-gradient(135deg,#c7d2fe,#fbcfe8);display:grid;place-items:center;color:#312e81;font-weight:800}
.cards,.pricing-grid,.gallery-grid{display:grid;gap:22px}
.cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.card,.price-card{border:1px solid #e5e7eb;border-radius:18px;padding:28px;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.05)}
.card h3{margin-top:0;color:#111827}
.quote p{font-size:22px;line-height:1.5;color:#111827}
.gallery-head{display:grid;grid-template-columns:1fr 2fr;gap:22px;align-items:start;margin-bottom:26px}
.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.gallery-item{height:190px;border-radius:16px;background:linear-gradient(135deg,#e0f2fe,#ede9fe);display:grid;place-items:center;color:#475569;font-weight:700}
.pricing-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.price-card h3{text-transform:uppercase;letter-spacing:.12em;font-size:13px;color:#64748b}
.price-card.featured{border-color:#4f46e5;transform:translateY(-8px)}
.price{font-size:46px;font-weight:800;border-bottom:1px solid #e5e7eb;padding-bottom:18px;margin-bottom:18px;color:#111827}
.contact-form{max-width:900px;margin:28px auto 0;display:grid;grid-template-columns:1fr 1fr;gap:14px}
.contact-form textarea{grid-column:1/-1;min-height:140px}
.contact-form input,.contact-form textarea,.footer-newsletter input{width:100%;border:1px solid #d1d5db;border-radius:10px;padding:12px;background:#f9fafb;color:#111827}
.contact-form button{grid-column:1/-1;justify-self:center}
.center{text-align:center}
.footer-simple{padding:26px 0;background:#fff}
.footer-row{display:flex;align-items:center;justify-content:space-between;gap:18px;color:#64748b}
.footer-dark{background:#111827;color:#fff;padding:56px 0}
.footer-dark p,.footer-dark a{color:#cbd5e1}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px}
.footer-grid h3,.footer-grid h4{margin-top:0;color:#fff}
.footer-grid a{display:block;margin:10px 0}
.footer-newsletter{padding:45px 0;background:#eef2ff}
.newsletter-row{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:30px}
.newsletter-row h2{margin:0 0 10px;font-size:34px}
.newsletter-row form{display:flex;gap:10px}
.saved-page{background:#fff;overflow:auto;height:auto}

/* Header choices */
.header-with-topbar{background:#fff;padding-bottom:18px}
.top-strip{background:#111827;color:#fff;font-size:13px;padding:9px 0}
.top-strip-row{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}
.header-with-topbar .nav-row{padding-top:18px}
.header-centered{padding:24px 0;text-align:center;background:#fff}
.big-logo{display:inline-block;font-size:30px;margin-bottom:16px}
.header-centered nav,.header-stacked nav{display:flex;justify-content:center;gap:24px;flex-wrap:wrap}
.header-centered nav a,.header-stacked nav a,.header-split a,.header-shop a{color:#475569;text-decoration:none}
.header-split{padding:22px 0;background:#fff}
.split-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px}
.split-nav nav{display:flex;gap:20px}
.split-nav nav:last-child{justify-content:flex-end}
.header-dark{background:#0f172a;padding:20px 0;color:#fff}
.header-dark .logo,.header-dark nav a{color:#fff}
.header-transparent{padding:24px 0 70px;background:linear-gradient(135deg,#0f172a,#4f46e5);color:#fff}
.header-transparent .logo,.header-transparent nav a{color:#fff}
.transparent-hero-copy{padding-top:64px;text-align:center}
.transparent-hero-copy h2{font-size:48px;line-height:1.05;margin:0 0 14px;color:#fff}
.transparent-hero-copy p{font-size:18px;color:#e0e7ff;margin:0}
.header-shop{background:#fff;padding:18px 0;border-bottom:1px solid #e5e7eb}
.shop-row{display:grid;grid-template-columns:auto minmax(160px,1fr) auto;align-items:center;gap:22px}
.fake-search{border:1px solid #d1d5db;background:#f8fafc;border-radius:999px;padding:12px 18px;color:#64748b}
.fake-search.wide{max-width:520px;width:100%}
.shop-row nav,.category-row{display:flex;gap:18px;flex-wrap:wrap;align-items:center}
.category-row{padding-top:16px;justify-content:center}
.header-minimal{padding:20px 0;background:#fff}
.header-stacked{padding:24px 0;background:#f8fafc;text-align:center}
.stacked-logo p{color:#64748b;margin:0 0 18px}
.header-search{padding:20px 0;background:#fff;border-bottom:1px solid #e5e7eb}

@media(max-width:900px){
  body.builder-body{height:auto;overflow:auto}
  .app-shell{grid-template-columns:1fr;height:auto;overflow:visible}
  .left-panel,.preview-area{height:auto;overflow:visible}
  .editor-panel.active,.page-preview{max-height:none;overflow:visible}
  .widget-grid{grid-template-columns:1fr}
  .topbar{height:auto;align-items:flex-start;flex-direction:column;padding:14px}
  .hero,.gallery-head,.cards,.cards.three,.pricing-grid,.gallery-grid,.contact-form,.footer-grid,.newsletter-row{grid-template-columns:1fr}
  .nav-row,.footer-row,.announcement-row{flex-direction:column;text-align:center}
  .hero h2,.section-title{font-size:34px}
  .page-section,.hero-header{padding-top:50px;padding-bottom:50px}
  .newsletter-row form{flex-direction:column}
  .price-card.featured{transform:none}
  .split-nav,.shop-row{grid-template-columns:1fr;text-align:center}
  .split-nav nav,.split-nav nav:last-child,.shop-row nav{justify-content:center}
  .top-strip-row{justify-content:center;text-align:center}
}
