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

.app-shell{min-height:100vh;display:grid;grid-template-columns:360px 1fr;height:100vh;overflow:hidden}

.left-panel{background:#fff;border-right:1px solid #d8dee8;overflow:hidden;padding:18px;height:100vh;display:flex;flex-direction:column}

.brand-row{display:flex;gap:12px;align-items:center;margin-bottom:14px}
.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}
.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}

.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}
.tab{border:1px solid #e5e7eb;background:#fff;padding:11px 8px;border-radius:12px;font-weight:800;cursor:pointer}
.tab.active{background:#4f46e5;color:#fff;border-color:#4f46e5}

.editor-panel{display:none}
.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}

.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}
.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}

.preview-area{height:100vh;overflow:hidden;display:flex;flex-direction:column;padding:20px}

.topbar{height:54px;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;
  overflow-y:auto;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  background:#f8fafc;
  border:1px solid #d8dee8;
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 28px rgba(15,23,42,.08);
}

.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{
  min-height:120px;
  background:#fff;
  border:2px dashed #cbd5e1;
  border-radius:16px;
  overflow:visible;
  width:100%;
}

.editor-zone[data-zone=header] .canvas{
  min-height:220px;
  max-height:none !important;
}

.editor-zone[data-zone=content] .canvas{
  min-height:850px;
  max-height:none !important;
}

.editor-zone[data-zone=footer] .canvas{
  min-height:220px;
  max-height:none !important;
}

.empty{color:#94a3b8;text-align:center;padding:48px 20px}

.section-block{position:relative;background:#fff}
.section-block:hover{outline:2px solid #4f46e5;z-index:2}

.tools{position:absolute;right:10px;top:10px;display:none;gap:6px;z-index:5}
.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}

.container{
  width:100%;
  max-width:1400px;
  margin:auto;
}

.clean-header{padding:18px 30px}

.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}

.nav-row nav,.footer-row nav{display:flex;gap:18px;flex-wrap:wrap}
.nav-row a,.footer-row a,.footer-grid a{color:#475569;text-decoration:none}

.announcement{background:#111827;color:#fff;padding:12px 20px}
.announcement-row{display:flex;justify-content:center;align-items:center;gap:16px;text-align:center}
.announcement strong{color:#fbbf24}

.hero-header{padding:56px 36px;background:linear-gradient(135deg,#eef2ff,#fdf2f8)}

.page-section{padding:72px 36px}
.soft-bg{background:#f8fafc}

.hero{display:grid;grid-template-columns:1fr 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}
.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}

.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,1fr)}
.cards.three{grid-template-columns:repeat(3,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,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,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;font:inherit;background:#f9fafb}
.contact-form button{grid-column:1/-1;justify-self:center}

.center{text-align:center}

.footer-simple{padding:26px 30px;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 36px}
.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}
.footer-grid a{display:block;margin:10px 0}

.footer-newsletter{padding:45px 36px;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}

/* Extra header layout choices */
.header-with-topbar{background:#fff;padding-bottom:18px}
.top-strip{background:#111827;color:#fff;font-size:13px;padding:9px 24px}
.top-strip-row{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}
.header-with-topbar .nav-row{padding:18px 30px 0}

.header-centered{padding:24px 30px;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 30px;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 30px;color:#fff}
.header-dark .logo,.header-dark nav a{color:#fff}

.site-btn.light{background:#fff;color:#0f172a}

.header-transparent{padding:24px 30px 70px;background:linear-gradient(135deg,#0f172a,#4f46e5);color:#fff}
.header-transparent .logo,.header-transparent nav a{color:#fff}

.site-btn.outline-light{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.7)}

.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 30px;border-bottom:1px solid #e5e7eb}
.shop-row{display:grid;grid-template-columns:auto 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}
.category-row{padding-top:16px;justify-content:center}

.header-minimal{padding:20px 30px;background:#fff}

.header-stacked{padding:24px 30px;background:#f8fafc;text-align:center}
.stacked-logo p{color:#64748b;margin:0 0 18px}

.header-search{padding:20px 30px;background:#fff;border-bottom:1px solid #e5e7eb}

/* Mobile responsive */
@media(max-width:900px){
  body.builder-body,body:not(.saved-page){height:auto;overflow:auto}

  .app-shell{
    grid-template-columns:1fr;
    height:auto;
    overflow:visible;
  }

  .left-panel{
    height:auto;
    overflow:visible;
  }

  .preview-area{
    height:auto;
    overflow:visible;
  }

  .editor-panel.active{
    max-height:none;
    overflow:visible;
  }

  .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;
  }

  .hero h2,
  .section-title{
    font-size:34px;
  }

  .page-section,
  .hero-header{
    padding:50px 20px;
  }

  .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;
  }
}