:root {
  --bg: #f7f6f8;
  --surface: #ffffff;
  --text: #29232a;
  --muted: #8b838b;
  --border: #ece8ed;
  --accent: #71394d;
  --accent-dark: #542638;
  --gold: #e8c58e;
  --gold-muted: #b99a69;
  --poster: #080605;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

/* HEADER */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 52px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.8px;
}

.subheading {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  padding: 13px 19px;
  font: 600 13px Inter, sans-serif;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn span {
  font-size: 19px;
}

.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* MAIN LAYOUT */

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

/* FORM PANEL */

.controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 30px #34231b08;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #f3eaf0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.section-heading > p {
  margin: 7px 0 0 37px;
  color: var(--muted);
  font-size: 11px;
}

.form-group {
  margin-bottom: 16px;
  min-width: 0;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #494149;
}

input,
textarea {
  width: 100%;
  border: 1px solid #e7e1e7;
  border-radius: 9px;
  padding: 11px 12px;
  background: #fcfbfc;
  color: var(--text);
  font: 12px Inter, sans-serif;
  outline: none;
  transition: 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #aaa2aa;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px #71394d12;
}

textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 75px;
}

input[type="file"] {
  padding: 8px;
  font-size: 11px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 6px;
  background: #f1eaf0;
  color: var(--accent);
  padding: 7px 10px;
  margin-right: 9px;
  font: 600 10px Inter, sans-serif;
  cursor: pointer;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #f8f4f7;
  margin-top: 22px;
}

.form-note span {
  color: var(--accent);
  font-size: 16px;
}

.form-note p {
  margin: 0;
  color: #766b74;
  font-size: 10px;
  line-height: 1.7;
}

/* PREVIEW AREA */

.preview-area {
  min-width: 0;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 16px;
  max-width: 680px;
}

.preview-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}

.preview-header h2 {
  margin: 0;
  font-size: 18px;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 20px;
  background: #edf7f0;
  color: #44835b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.live-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55a76e;
}

/* POSTER DESIGN */

.poster {
  width: min(100%, 850px);
  margin: 0 auto;
  background: var(--poster);
  color: #f8e6c5;
  overflow: hidden;
  box-shadow: 0 18px 55px #24130d25;
  direction: rtl;
  font-family: Cairo, Arial, sans-serif;
}

.hero {
  height: 440px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 55%,
    #50301c 0%,
    #17100d 45%,
    #050404 100%
  );
  border-bottom: 2px solid #b78d50;
}

.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    130deg,
    transparent 20%,
    #d9a65a14 50%,
    transparent 70%
  );
}

.hero-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: #b56b2a20;
  filter: blur(45px);
}

/* KEEP PRODUCT IMAGE DISPLAY AS BEFORE */

.main-bottle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  z-index: 2;
}

.hero-caption {
  position: absolute;
  bottom: 12px;
  right: 0;
  left: 0;
  text-align: center;
  color: #d9bd91;
  font: 10px 'Cormorant Garamond', serif;
  letter-spacing: 3px;
  z-index: 3;
  text-shadow: 0 1px 5px #000;
}

.poster-content {
  padding: 25px 30px 20px;
  background: radial-gradient(
    ellipse at top,
    #1c120d 0%,
    #090706 55%
  );
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 15px;
  direction: ltr;
}

.brand-mark {
  color: var(--gold);
  font-size: 36px;
  line-height: 0.8;
  width: 66px;
  text-align: center;
}

.brand-divider {
  width: 1px;
  height: 76px;
  background: var(--gold-muted);
}

.brand-title {
  min-width: 0;
}

.brand-title h2 {
  margin: 0;
  font: 700 clamp(25px, 4vw, 40px)/1 'Cormorant Garamond', serif;
  letter-spacing: 3px;
  color: #f4d8a7;
  overflow-wrap: anywhere;
}

.brand-title p {
  margin: 4px 0 7px;
  font: 600 15px 'Cormorant Garamond', serif;
  letter-spacing: 1px;
  color: #f4d8a7;
}

.brand-title small {
  font: 10px 'Cormorant Garamond', serif;
  letter-spacing: 1.4px;
  color: #d9c9b0;
}

.brand-title small span {
  display: inline-block;
  margin-left: 4px;
}

.tagline {
  text-align: center;
  color: #f0d29d;
  font-size: 20px;
  margin: 24px 0 5px;
}

.description {
  text-align: center;
  color: #e6d9c7;
  font-size: 13px;
  line-height: 1.9;
  margin: 0 auto 24px;
  max-width: 540px;
}

.details {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(150px, 1fr);
  border-top: 1px solid #7f603c;
  padding-top: 16px;
  gap: 18px;
}

.details h3 {
  margin: 0 0 10px;
  color: #e8c58e;
  font-size: 16px;
}

.notes-section {
  min-width: 0;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note {
  text-align: center;
  padding: 0 9px;
  border-left: 1px solid #705538;
  min-width: 0;
}

.note:last-child {
  border-left: 0;
}

.note img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
}

.note h4 {
  color: #e8c58e;
  font-size: 13px;
  margin: 4px 0;
}

.note p {
  color: #f3e7d7;
  font-size: 11px;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: anywhere;
}

.occasion-section {
  border-right: 1px solid #9a7b52;
  padding-right: 17px;
}

.occasion-section > p {
  white-space: pre-line;
  font-size: 12px;
  line-height: 1.9;
  color: #f3e7d7;
  margin: 0 0 18px;
}

.price-block {
  border-top: 1px solid #63482d;
  padding-top: 10px;
}

.price-block p {
  margin: 5px 0;
  color: #e8c58e;
  font-size: 13px;
}

.price-block strong {
  color: #fff0d8;
}

.contact-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #d4b47f;
  border-radius: 40px;
  padding: 7px 12px;
  margin: 22px auto 16px;
  max-width: 520px;
  color: #f3dfbd;
}

.contact-pill span {
  font-size: 20px;
}

.contact-pill p {
  margin: 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
}

.poster-footer {
  text-align: center;
  padding: 5px 0 0;
}

.footer-logo {
  font: 700 36px/1 'Cormorant Garamond', serif;
  letter-spacing: 8px;
  color: #f3d7a5;
}

.footer-logo span {
  display: block;
  font-size: 10px;
  letter-spacing: 5px;
  margin-top: 5px;
}

.poster-footer p {
  color: #d7bf99;
  font-size: 12px;
  margin: 13px 0 0;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .controls {
    order: 1;
  }

  .preview-area {
    order: 2;
  }

  .poster {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    height: 320px;
  }

  .poster-content {
    padding: 20px 14px 16px;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .occasion-section {
    border-right: 0;
    border-top: 1px solid #705538;
    padding: 14px 0 0;
  }

  .brand-mark {
    width: 44px;
    font-size: 27px;
  }

  .brand-divider {
    height: 62px;
  }

  .brand-title h2 {
    font-size: 28px;
  }

  .note {
    padding: 0 5px;
  }

  .note img {
    height: 62px;
  }
}