*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --purple: #6c5ce7;
      --purple-dark: #5b4bd5;
      --charcoal: #1a1a2e;
      --gray-100: #f8f9fa;
      --gray-200: #e9ecef;
      --gray-400: #ced4da;
      --gray-600: #6c757d;
      --white: #ffffff;
      --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    }
    body { font-family: var(--font); background: var(--gray-100); color: var(--charcoal); min-height: 100vh; }

    /* --- NAV --- */
    .nav { position: sticky; top: 0; width: 100%; background: rgba(255,255,255,0.97); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gray-200); z-index: 100; padding: 0.8rem 2rem; display: flex; align-items: center; justify-content: space-between; }
    .nav-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.3px; color: var(--charcoal); text-decoration: none; }
    .nav-logo span { color: var(--purple); }
    @media (max-width: 375px) { .nav-logo { font-size: 1.25rem; } }
    .nav-links { display: flex; gap: 1.5rem; align-items: center; }
    .nav-links a { text-decoration: none; color: var(--gray-600); font-weight: 500; font-size: 0.85rem; transition: color 0.15s; }
    .nav-links a:hover { color: var(--charcoal); }
    .nav-cta { background: var(--purple) !important; color: var(--white) !important; padding: 0.5rem 1.4rem; border-radius: 8px; font-weight: 600; }
    .nav-cta:hover { background: #5b4bd5 !important; }

    /* --- CUSTOMIZER PANEL --- */
    .customizer {
      max-width: 1400px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 360px 1fr;
      min-height: calc(100vh - 57px);
    }

    .sidebar {
      background: var(--white);
      border-right: 1px solid var(--gray-200);
      padding: 2rem;
      overflow-y: auto;
      max-height: calc(100vh - 57px);
      position: sticky;
      top: 57px;
    }
    .sidebar h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
    .sidebar .subtitle { color: var(--gray-600); font-size: 0.85rem; margin-bottom: 2rem; }

    .form-section { margin-bottom: 2rem; }
    .form-section h3 {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--gray-600);
      margin-bottom: 0.8rem;
      padding-bottom: 0.4rem;
      border-bottom: 1px solid var(--gray-200);
    }

    .field { margin-bottom: 1rem; }
    .field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; }
    .field input, .field select, .field textarea {
      width: 100%;
      padding: 0.6rem 0.8rem;
      border: 2px solid var(--gray-200);
      border-radius: 8px;
      font-size: 0.9rem;
      font-family: var(--font);
      outline: none;
      transition: border-color 0.15s;
    }
    .field input:focus, .field select:focus { border-color: var(--purple); }
    .field textarea { resize: vertical; min-height: 60px; }

    .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

    .color-field {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .color-field input[type="color"] {
      width: 40px;
      height: 36px;
      padding: 2px;
      border: 2px solid var(--gray-200);
      border-radius: 6px;
      cursor: pointer;
    }
    .color-field input[type="text"] { flex: 1; }

    .scrape-section {
      background: #f0f0ff;
      border-radius: 12px;
      padding: 1.2rem;
      margin-bottom: 2rem;
    }
    .scrape-section h3 { border: none; color: var(--purple); padding: 0; margin-bottom: 0.5rem; }
    .scrape-section p { font-size: 0.8rem; color: var(--gray-600); margin-bottom: 0.8rem; }
    .scrape-row { display: flex; gap: 0.5rem; }
    .scrape-row input {
      flex: 1;
      padding: 0.6rem 0.8rem;
      border: 2px solid var(--gray-200);
      border-radius: 8px;
      font-size: 0.9rem;
      font-family: var(--font);
      outline: none;
      transition: border-color 0.15s;
    }
    .scrape-row input:focus { border-color: var(--purple); }
    .scrape-divider { text-align: center; font-size: 0.75rem; color: var(--gray-600); margin: 0.8rem 0 0.6rem; }

    .btn {
      padding: 0.6rem 1.2rem;
      border: none;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
      font-family: var(--font);
    }
    .btn-purple { background: var(--purple); color: var(--white); }
    .btn-purple:hover { background: var(--purple-dark); }
    .btn-purple:disabled { background: #aaa; cursor: wait; }
    .btn-outline { background: var(--white); border: 2px solid var(--gray-200); color: var(--charcoal); }
    .btn-outline:hover { border-color: var(--purple); color: var(--purple); }
    .btn-full { width: 100%; justify-content: center; display: flex; align-items: center; gap: 0.4rem; }

    /* Extracted colors display */
    .extracted-colors {
      display: flex;
      gap: 0.4rem;
      margin-top: 0.8rem;
      flex-wrap: wrap;
    }
    .color-swatch {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all 0.15s;
      position: relative;
    }
    .color-swatch:hover { border-color: var(--charcoal); transform: scale(1.1); }
    .color-swatch.selected { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(108,92,231,0.3); }

    .logo-preview {
      margin-top: 0.8rem;
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
    }
    .logo-option {
      width: 60px;
      height: 60px;
      border: 2px solid var(--gray-200);
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.15s;
    }
    .logo-option:hover { border-color: var(--purple); }
    .logo-option.selected { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(108,92,231,0.3); }
    .logo-option img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

    /* --- PREVIEW PANEL --- */
    .preview-panel { padding: 1.5rem; overflow-y: auto; }
    .preview-frame {
      background: var(--white);
      border-radius: 12px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.08);
      overflow: hidden;
      min-height: 600px;
    }

    /* Preview store styles (injected dynamically) */
    .preview-header {
      padding: 0.8rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .preview-logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: 700;
      font-size: 1.2rem;
    }
    .preview-logo img { height: 32px; width: auto; }
    .preview-logo .name-highlight { color: var(--purple); }
    .preview-nav { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--gray-600); }

    .preview-hero {
      padding: 4rem 2rem;
      text-align: center;
    }
    .preview-hero h1 {
      font-family: 'Playfair Display', Georgia, serif;
      font-size: 2.2rem;
      line-height: 1.2;
      margin-bottom: 0.8rem;
    }
    .preview-hero h1 em { font-style: italic; }
    .preview-hero p { color: var(--gray-600); max-width: 480px; margin: 0 auto 1.5rem; font-size: 1rem; }
    .preview-hero .cta {
      display: inline-block;
      color: var(--white);
      padding: 0.8rem 2rem;
      border-radius: 30px;
      font-weight: 600;
      font-size: 0.95rem;
    }

    .preview-badges {
      display: flex;
      justify-content: center;
      gap: 2rem;
      margin-top: 2rem;
      font-size: 0.8rem;
      color: var(--gray-600);
    }

    .preview-products {
      padding: 2rem;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 1rem;
    }
    .preview-product {
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .preview-product-img {
      height: 160px;
      background-size: cover;
      background-position: center;
    }
    .preview-product-body { padding: 0.8rem; }
    .preview-product-body h4 { font-size: 0.85rem; margin-bottom: 0.3rem; }
    .preview-product-body .price { font-weight: 700; }
    .preview-product-body .add-btn {
      display: block;
      width: 100%;
      margin-top: 0.5rem;
      padding: 0.4rem;
      border: none;
      border-radius: 6px;
      color: var(--white);
      font-weight: 600;
      font-size: 0.8rem;
      cursor: pointer;
    }

    .preview-section-title {
      text-align: center;
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      padding: 1.5rem 2rem 0;
    }

    /* Status */
    .status-msg {
      padding: 0.5rem 0.8rem;
      border-radius: 6px;
      font-size: 0.8rem;
      margin-top: 0.5rem;
      display: none;
    }
    .status-msg.show { display: block; }
    .status-msg.loading { background: #fff3cd; color: #856404; }
    .status-msg.success { background: #d4edda; color: #155724; }
    .status-msg.error { background: #f8d7da; color: #721c24; }

    /* Responsive */
    @media (max-width: 900px) {
      .customizer { grid-template-columns: 1fr; }
      .sidebar { max-height: none; position: static; }
    }
