/* =================================================================
 * Souk Profumi — Offer popup
 * Same palette and type as the header, cards and product page.
 * ================================================================= */

.sp-offer {
  --sp-o-bg:      #FFFFFF;
  --sp-o-surface: #F5EDD9;
  --sp-o-accent:  #C99A4B;
  --sp-o-dark:    #8B6A2E;
  --sp-o-ink:     #1A1A1A;
  --sp-o-text:    #2A2A2A;
  --sp-o-muted:   #5C5C5C;
  --sp-o-line:    rgba(139, 106, 46, 0.22);
  --sp-o-head:    'Cinzel', 'Times New Roman', serif;
  --sp-o-body:    'Manrope', system-ui, -apple-system, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--sp-o-body);
  box-sizing: border-box;
}
.sp-offer[hidden] { display: none; }
.sp-offer *, .sp-offer *::before, .sp-offer *::after { box-sizing: border-box; }

.sp-offer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.62);
  opacity: 0;
  transition: opacity .3s ease;
}
.sp-offer.is-open .sp-offer__scrim { opacity: 1; }

.sp-offer__modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--sp-o-bg);
  border: 1px solid var(--sp-o-line);
  border-radius: 3px;
  box-shadow: 0 24px 70px rgba(26, 26, 26, 0.3);
  padding: 38px 34px 30px;
  text-align: center;
  transform: translateY(16px) scale(.98);
  opacity: 0;
  transition: transform .32s ease, opacity .32s ease;
}
.sp-offer.is-open .sp-offer__modal { transform: none; opacity: 1; }

.sp-offer__close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--sp-o-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s ease;
}
.sp-offer__close:hover { color: var(--sp-o-ink); }

/* ---------- Panels ---------- */
.sp-offer__panel { display: none; }
.sp-offer__panel.is-active { display: block; }

.sp-offer__logo {
  max-width: 148px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.sp-offer__title {
  font-family: var(--sp-o-head);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--sp-o-ink);
  margin: 0 0 10px;
  text-transform: none;
}
.sp-offer__pct { color: var(--sp-o-accent); }

.sp-offer__sub {
  font-size: 14px;
  line-height: 1.65;
  color: var(--sp-o-muted);
  margin: 0 0 24px;
}

/* ---------- Form ---------- */
.sp-offer__field { margin-bottom: 12px; text-align: left; }

.sp-offer__field input[type="text"],
.sp-offer__field input[type="email"],
.sp-offer__field input[type="tel"] {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  height: auto;
  color: var(--sp-o-ink);
  background: var(--sp-o-bg);
  border: 1px solid var(--sp-o-line);
  border-radius: 2px;
  padding: 13px 15px;
  transition: border-color .2s ease;
}
.sp-offer__field input::placeholder { color: #9a9a9a; }
.sp-offer__field input:focus { outline: none; border-color: var(--sp-o-accent); }
.sp-offer__field input.has-error { border-color: #b3261e; }

.sp-offer__phone { display: flex; gap: 8px; }
.sp-offer__phone select {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 104px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  height: auto;
  color: var(--sp-o-ink);
  background-color: var(--sp-o-bg);
  border: 1px solid var(--sp-o-line);
  border-radius: 2px;
  padding: 13px 26px 13px 12px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--sp-o-accent) 50%),
                    linear-gradient(135deg, var(--sp-o-accent) 50%, transparent 50%);
  background-position: calc(100% - 15px) 53%, calc(100% - 10px) 53%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.sp-offer__phone select:focus { outline: none; border-color: var(--sp-o-accent); }
.sp-offer__phone input { flex: 1 1 auto; min-width: 0; }

.sp-offer__error {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  color: #b3261e;
}
.sp-offer__error.is-shown { display: block; }

.sp-offer__hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.sp-offer__submit {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--sp-o-ink);
  border: 1px solid var(--sp-o-ink);
  border-radius: 2px;
  padding: 15px 24px;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease, opacity .22s ease;
}
.sp-offer__submit:hover { background: var(--sp-o-accent); border-color: var(--sp-o-accent); }
.sp-offer__submit.is-busy { opacity: .6; pointer-events: none; }

.sp-offer__formerror {
  display: none;
  margin: 12px 0 0;
  font-size: 13px;
  color: #b3261e;
}
.sp-offer__formerror.is-shown { display: block; }

.sp-offer__decline {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--sp-o-muted);
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sp-offer__decline:hover { color: var(--sp-o-ink); }

.sp-offer__legal {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: #8a8a8a;
}
.sp-offer__legal a { color: var(--sp-o-dark); }

/* ---------- Success panel ---------- */
.sp-offer__tick {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: var(--sp-o-accent);
  border-radius: 50%;
}

.sp-offer__code {
  border: 1px dashed var(--sp-o-accent);
  background: var(--sp-o-surface);
  border-radius: 2px;
  padding: 18px 16px;
  margin-bottom: 14px;
}
.sp-offer__code-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sp-o-dark);
  margin-bottom: 7px;
}
.sp-offer__code strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sp-o-ink);
  word-break: break-all;
}

.sp-offer__copy {
  width: 100%;
  min-height: 46px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sp-o-ink);
  background: transparent;
  border: 1px solid var(--sp-o-accent);
  border-radius: 2px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background .22s ease, color .22s ease;
}
.sp-offer__copy:hover { background: var(--sp-o-accent); color: #fff; }
.sp-offer__copy.is-done { background: var(--sp-o-accent); color: #fff; }

.sp-offer__shop {
  display: block;
  margin-top: 10px;
  min-height: 52px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--sp-o-accent);
  border: 1px solid var(--sp-o-accent);
  border-radius: 2px;
  padding: 17px 24px;
  transition: background .22s ease;
}
.sp-offer__shop:hover { background: var(--sp-o-dark); border-color: var(--sp-o-dark); color: #fff; }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .sp-offer { padding: 12px; align-items: flex-end; }
  .sp-offer__modal {
    padding: 32px 22px 24px;
    max-height: calc(100vh - 24px);
  }
  .sp-offer__logo { max-width: 124px; margin-bottom: 16px; }
  .sp-offer__title { font-size: 22px; }
  .sp-offer__phone select { flex-basis: 96px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-offer__scrim, .sp-offer__modal { transition: none; }
}
