:root {
  --ai-ink: #10213a;
  --ai-muted: #657189;
  --ai-blue: #2d6cdf;
  --ai-blue-dark: #163d84;
  --ai-gold: #c59b5b;
  --ai-cream: #f8f4ed;
  --ai-panel: rgba(255, 255, 255, 0.88);
  --ai-border: rgba(22, 61, 132, 0.13);
  --ai-shadow: 0 26px 80px rgba(16, 33, 58, 0.14);
}

.ai-studio-page {
  background:
    radial-gradient(circle at 10% 8%, rgba(45, 108, 223, 0.12), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(197, 155, 91, 0.14), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 36%, #f8f4ed 100%);
  color: var(--ai-ink);
  overflow: hidden;
}

.ai-studio-page .container {
  position: relative;
  z-index: 2;
}

.ai-studio-hero {
  position: relative;
  padding: 92px 0 62px;
  min-height: 680px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(110deg, rgba(9, 26, 52, 0.9), rgba(16, 51, 96, 0.76)),
    url('../images/designs/hero-slide-2.jpg') center/cover no-repeat;
  color: #fff;
}

.ai-studio-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .75;
}

.ai-studio-orb-one {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(197, 155, 91, .35), transparent 68%);
  right: -120px;
  top: 70px;
}

.ai-studio-orb-two {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(45, 108, 223, .32), transparent 70%);
  left: -80px;
  bottom: 10px;
}

.ai-studio-hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 54px;
  align-items: center;
}

.ai-studio-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ai-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ai-studio-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}

.ai-studio-hero-copy h1 {
  max-width: 720px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .96;
  margin: 0 0 24px;
  letter-spacing: -.035em;
}

.ai-studio-hero-copy p {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .86);
  margin: 0 0 30px;
}

.ai-studio-hero-actions,
.ai-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.ai-studio-primary-btn,
.ai-studio-secondary-btn,
.ai-studio-light-btn,
.ai-studio-small-btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  font-family: inherit;
}

.ai-studio-primary-btn {
  background: linear-gradient(135deg, #d9b16f, #a97833);
  color: #fff;
  box-shadow: 0 16px 36px rgba(197, 155, 91, .28);
}

.ai-studio-secondary-btn {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(18px);
}

.ai-studio-light-btn,
.ai-studio-small-btn {
  background: #eef4ff;
  color: var(--ai-blue-dark);
}

.ai-studio-primary-btn:hover,
.ai-studio-secondary-btn:hover,
.ai-studio-light-btn:hover,
.ai-studio-small-btn:hover {
  transform: translateY(-2px);
}

.ai-studio-primary-btn.full {
  width: 100%;
  margin-top: 18px;
}

.ai-studio-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.ai-studio-trust-row span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  font-weight: 700;
}

.ai-studio-hero-card {
  position: relative;
  min-height: 540px;
}

.ai-studio-preview-frame {
  position: absolute;
  inset: 0 0 34px 42px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 36px 100px rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.22);
}

.ai-studio-preview-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.46));
}

.ai-studio-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.ai-studio-preview-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: var(--ai-ink);
  font-weight: 900;
  font-size: 12px;
}

.ai-studio-floating-card {
  position: absolute;
  z-index: 3;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.88);
  color: var(--ai-ink);
  border: 1px solid rgba(255,255,255,.48);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(18px);
}

.ai-studio-floating-card strong,
.ai-studio-floating-card span {
  display: block;
}

.ai-studio-floating-card strong { font-size: 18px; }
.ai-studio-floating-card span { color: var(--ai-muted); font-size: 13px; margin-top: 4px; }
.ai-card-one { left: 0; bottom: 96px; }
.ai-card-two { right: 0; bottom: 0; }

.ai-studio-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: -94px;
  position: relative;
  z-index: 5;
}

.ai-studio-mode-card,
.ai-step-card,
.ai-summary-card,
.ai-result-content,
.ai-result-visual {
  background: var(--ai-panel);
  border: 1px solid var(--ai-border);
  box-shadow: var(--ai-shadow);
  backdrop-filter: blur(18px);
}

.ai-studio-mode-card {
  padding: 30px;
  border-radius: 28px;
}

.ai-mode-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f366f, #2d6cdf);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 25px;
  margin-bottom: 18px;
}

.ai-studio-mode-card h2,
.ai-studio-section-heading h2,
.ai-result-content h2 {
  font-family: 'Playfair Display', serif;
  color: var(--ai-ink);
}

.ai-studio-mode-card h2 { font-size: 30px; margin: 0 0 12px; }
.ai-studio-mode-card p { color: var(--ai-muted); line-height: 1.7; margin-bottom: 20px; }

.ai-mode-select {
  border: 0;
  background: var(--ai-ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.ai-studio-section-heading {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 34px;
}

.ai-studio-section-heading h2,
.ai-result-content h2 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.04;
  margin: 0 0 16px;
}

.ai-studio-section-heading p,
.ai-result-content p {
  color: var(--ai-muted);
  line-height: 1.75;
}

.ai-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.ai-builder-panel {
  display: grid;
  gap: 18px;
}

.ai-step-card,
.ai-summary-card {
  border-radius: 28px;
  padding: 24px;
}

.ai-step-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.ai-step-title span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf1ff;
  color: var(--ai-blue-dark);
  font-weight: 900;
}

.ai-step-title h3 { margin: 0; font-size: 20px; color: var(--ai-ink); }

.ai-segmented,
.ai-theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-segmented button,
.ai-theme-grid button {
  border: 1px solid var(--ai-border);
  background: #fff;
  color: var(--ai-ink);
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
}

.ai-segmented button.active,
.ai-theme-grid button.active {
  background: var(--ai-blue-dark);
  color: #fff;
  border-color: var(--ai-blue-dark);
}

.ai-size-grid,
.ai-layout-row,
.ai-product-tools,
.ai-lead-form {
  display: grid;
  gap: 14px;
}

.ai-size-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ai-layout-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-product-tools { grid-template-columns: 1fr 220px; }
.ai-lead-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ai-step-card label {
  color: var(--ai-muted);
  font-weight: 800;
  font-size: 13px;
}

.ai-step-card input,
.ai-step-card select,
.ai-lead-form input,
.ai-lead-form textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--ai-border);
  background: #fff;
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ai-ink);
  outline: none;
}

.ai-lead-form textarea {
  grid-column: 1 / -1;
  min-height: 110px;
  resize: vertical;
}

.ai-upload-zone {
  min-height: 150px;
  border: 1px dashed rgba(22,61,132,.32);
  border-radius: 22px;
  background: #f7faff;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  padding: 20px;
}

.ai-upload-zone input { display: none; }
.ai-upload-zone span { font-size: 18px; color: var(--ai-ink); }
.ai-upload-zone small { color: var(--ai-muted); }
.ai-uploaded-preview { margin-top: 16px; }
.ai-uploaded-preview img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 22px; }

.ai-product-status { color: var(--ai-muted); font-size: 13px; margin-bottom: 14px; }

.ai-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ai-product-card {
  border: 1px solid var(--ai-border);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ai-product-card.selected {
  outline: 3px solid rgba(197,155,91,.45);
  border-color: rgba(197,155,91,.95);
}

.ai-product-image {
  height: 136px;
  background: #f5f7fb;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ai-product-image img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }

.ai-product-info { padding: 13px; display: grid; gap: 6px; flex: 1; }
.ai-product-info strong { font-size: 14px; line-height: 1.35; color: var(--ai-ink); }
.ai-product-info span { font-size: 12px; color: var(--ai-muted); }
.ai-product-info button { margin-top: auto; border: 0; border-radius: 999px; padding: 10px 12px; background: #eef4ff; color: var(--ai-blue-dark); font-weight: 900; cursor: pointer; }
.ai-product-card.selected .ai-product-info button { background: var(--ai-gold); color: #fff; }

.ai-summary-card.sticky { position: sticky; top: 110px; }
.ai-summary-card h3 { font-family: 'Playfair Display', serif; font-size: 30px; margin: 0 0 16px; }
.ai-summary-image { border-radius: 22px; overflow: hidden; height: 230px; margin-bottom: 18px; }
.ai-summary-image img { width: 100%; height: 100%; object-fit: cover; }
.ai-summary-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; color: var(--ai-muted); }
.ai-summary-list strong { color: var(--ai-ink); }

.ai-selected-products { display: grid; gap: 8px; margin-top: 16px; max-height: 240px; overflow: auto; padding-right: 4px; }
.ai-selected-pill { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #f7faff; border: 1px solid var(--ai-border); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.ai-selected-pill button { border: 0; background: transparent; color: #b44545; cursor: pointer; font-weight: 900; }
.ai-disclaimer-mini, .ai-disclaimer { color: var(--ai-muted); font-size: 12px; line-height: 1.6; }

.ai-result-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  align-items: stretch;
}

.ai-result-visual,
.ai-result-content { border-radius: 32px; padding: 24px; }
.ai-generated-frame { position: relative; border-radius: 26px; overflow: hidden; min-height: 580px; background: #0d1c33; }
.ai-generated-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.62)); }
.ai-generated-frame img { width: 100%; height: 100%; min-height: 580px; object-fit: cover; display: block; }
.ai-generated-overlay { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 22px; padding: 18px; border-radius: 22px; color: #fff; background: rgba(11,27,49,.55); backdrop-filter: blur(16px); }
.ai-generated-overlay span, .ai-generated-overlay strong { display: block; }
.ai-generated-overlay span { color: rgba(255,255,255,.76); font-size: 13px; }
.ai-generated-overlay strong { font-size: 24px; margin-top: 4px; }
.ai-result-content { display: flex; flex-direction: column; justify-content: center; }
.ai-lead-status { margin-top: 14px; font-weight: 800; color: var(--ai-blue-dark); }

@media (max-width: 1100px) {
  .ai-studio-hero-grid,
  .ai-builder-grid,
  .ai-result-grid { grid-template-columns: 1fr; }
  .ai-live-summary { order: -1; }
  .ai-summary-card.sticky { position: static; }
  .ai-studio-hero-card { min-height: 460px; }
  .ai-studio-preview-frame { inset: 0; }
}

@media (max-width: 760px) {
  .ai-studio-hero { padding: 70px 0 120px; min-height: auto; }
  .ai-studio-hero-copy h1 { font-size: 44px; }
  .ai-studio-mode-grid { grid-template-columns: 1fr; margin-top: -100px; }
  .ai-size-grid,
  .ai-layout-row,
  .ai-product-tools,
  .ai-lead-form { grid-template-columns: 1fr; }
  .ai-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-studio-hero-card { min-height: 360px; }
  .ai-studio-floating-card { position: relative; left: auto; right: auto; bottom: auto; margin-top: 12px; display: inline-block; }
  .ai-studio-preview-frame { position: relative; height: 360px; }
  .ai-generated-frame, .ai-generated-frame img { min-height: 420px; }
}

@media (max-width: 480px) {
  .ai-product-grid { grid-template-columns: 1fr; }
  .ai-studio-mode-card,
  .ai-step-card,
  .ai-summary-card,
  .ai-result-content,
  .ai-result-visual { padding: 18px; border-radius: 22px; }
}

.ai-home-cta-section {
  background: linear-gradient(135deg, #f8fbff, #f6efe3);
  padding-top: 34px;
  padding-bottom: 34px;
}

.ai-home-cta-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--ai-border);
  box-shadow: var(--ai-shadow);
}

.ai-home-cta-card h2 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 46px);
  color: var(--ai-ink);
}

.ai-home-cta-card p {
  margin: 0;
  color: var(--ai-muted);
  line-height: 1.7;
}

@media (max-width: 760px) {
  .ai-home-cta-card { grid-template-columns: 1fr; padding: 24px; }
}

/* VGG AI Studio layout correction - keep AI cards premium/light and stop hero overlap clipping */
.ai-studio-page {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%, #f8f4ed 100%) !important;
  overflow: visible;
}

.ai-studio-intro.section {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 52%, #f8f4ed 100%) !important;
  color: var(--ai-ink) !important;
  padding: 70px 0 78px !important;
  margin: 0 !important;
}

.ai-studio-mode-grid {
  margin-top: 0 !important;
  align-items: stretch;
  gap: 28px;
}

.ai-studio-mode-card {
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--ai-ink) !important;
  padding: 34px 32px !important;
  min-height: 300px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ai-studio-mode-card h2 {
  color: var(--ai-ink) !important;
  margin-top: 0;
}

.ai-studio-mode-card p {
  color: var(--ai-muted) !important;
}

.ai-mode-icon {
  flex: 0 0 auto;
  margin-bottom: 20px;
}

.ai-studio-builder.section,
.ai-studio-results.section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  color: var(--ai-ink) !important;
}

.ai-studio-builder .ai-studio-eyebrow,
.ai-studio-results .ai-studio-eyebrow {
  color: var(--ai-gold) !important;
}

.ai-step-card,
.ai-summary-card,
.ai-result-content,
.ai-result-visual {
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--ai-ink) !important;
}

@media (max-width: 1100px) {
  .ai-studio-intro.section {
    padding-top: 54px !important;
  }
}

@media (max-width: 760px) {
  .ai-studio-intro.section {
    padding: 44px 0 56px !important;
  }

  .ai-studio-mode-grid {
    margin-top: 0 !important;
    gap: 18px;
  }

  .ai-studio-mode-card {
    min-height: auto;
    padding: 24px !important;
  }
}
