/* Homepage marketing cards — match reference layout (image ~44%, large type) */
.home-marketing {
  --mkt-title: 24px;
  --mkt-desc: 15px;
  --mkt-btn: 15px;
  --mkt-action-h: 48px;
  --mkt-radius: 18px;
  --mkt-img-radius: 16px;
  margin-bottom: 28px;
}

.home-marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.home-marketing-card {
  border-radius: var(--mkt-radius);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  gap: 24px;
  align-items: center;
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

.home-marketing-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  border-radius: var(--mkt-img-radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  position: relative;
}

.home-marketing-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.home-marketing-img i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(15, 23, 42, 0.22);
}

.home-marketing-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  height: 100%;
}

.home-marketing .home-marketing-title {
  font-size: var(--mkt-title);
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.home-marketing .home-marketing-desc {
  font-size: var(--mkt-desc);
  line-height: 1.6;
  color: #475569;
  margin: 0 0 18px;
  font-weight: 400;
}

.home-marketing-actions {
  margin-top: auto;
  width: 100%;
}

.home-marketing .home-marketing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0f172a;
  color: #fff;
  border: none;
  padding: 0 20px;
  border-radius: 12px;
  font-size: var(--mkt-btn);
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  height: var(--mkt-action-h);
  min-height: var(--mkt-action-h);
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.home-marketing-actions > .home-marketing-btn {
  width: 100%;
}

.home-marketing-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  color: #fff;
}

.home-marketing-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.home-marketing-form input {
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  font-family: inherit;
  font-size: var(--mkt-btn);
  font-weight: 500;
  line-height: 1.2;
  height: var(--mkt-action-h);
  min-height: var(--mkt-action-h);
  box-sizing: border-box;
  background: #fff;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.home-marketing-form input::placeholder {
  color: #94a3b8;
}

.home-marketing-form input:focus {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.home-marketing-form .home-marketing-btn {
  width: auto;
  min-width: 108px;
  padding: 0 22px;
  white-space: nowrap;
}

.home-marketing-msg {
  font-size: 13px;
  margin: 10px 0 0;
  font-weight: 600;
}

.home-marketing-grid--single {
  grid-template-columns: 1fr;
}

/* ===== Surprise gift popup ===== */
.gift-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.gift-popup[hidden] {
  display: none !important;
}

.gift-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 51, 24, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gift-popup-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  animation: giftPopupIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes giftPopupIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gift-popup-card {
  position: relative;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fdf2f6 48%, #f3e8ff 100%);
  border: 1px solid rgba(239, 122, 156, 0.18);
  box-shadow:
    0 32px 64px rgba(30, 70, 32, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.gift-popup-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 122, 156, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.gift-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.gift-popup-close:hover {
  background: #fff;
  color: #1e293b;
  transform: rotate(90deg);
}

.gift-popup-grid {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  gap: 0;
  align-items: stretch;
  min-height: 320px;
}

.gift-popup-visual {
  position: relative;
  padding: 28px 24px 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gift-popup-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.65);
  position: relative;
  box-shadow: 0 12px 32px rgba(30, 70, 32, 0.12);
  border: 3px solid rgba(255, 255, 255, 0.85);
}

.gift-popup-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gift-popup-img i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(239, 122, 156, 0.35);
}

.gift-popup-badge {
  position: absolute;
  bottom: 36px;
  left: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(216, 90, 122, 0.35);
}

.gift-popup-badge i {
  font-size: 15px;
}

.gift-popup-content {
  padding: 36px 32px 32px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.gift-popup-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-pale);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  width: fit-content;
}

.gift-popup-title {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.gift-popup-desc {
  font-size: 15px;
  line-height: 1.65;
  color: #64748b;
  margin: 0 0 22px;
  max-width: 36ch;
}

.gift-popup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.gift-popup-field {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  border: 2px solid rgba(239, 122, 156, 0.25);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gift-popup-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(239, 122, 156, 0.15);
}

.gift-popup-field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
  color: var(--primary);
  font-size: 18px;
  background: var(--primary-pale);
}

.gift-popup-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 14px 14px 14px 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
}

.gift-popup-field input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.gift-popup-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 10px 24px rgba(30, 70, 32, 0.25);
}

.gift-popup-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(30, 70, 32, 0.3);
}

.gift-popup-submit:active:not(:disabled) {
  transform: translateY(0);
}

.gift-popup-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.gift-popup-submit i {
  font-size: 18px;
  transition: transform 0.2s;
}

.gift-popup-submit:hover:not(:disabled) i {
  transform: translateX(3px);
}

.gift-popup-msg {
  margin-top: 10px !important;
}

.gift-popup-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.gift-popup-note i {
  color: var(--green);
  font-size: 14px;
}

body.gift-popup-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .gift-popup {
    padding: 16px;
    align-items: flex-end;
  }

  .gift-popup-dialog {
    max-height: calc(100vh - 32px);
  }

  .gift-popup-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .gift-popup-visual {
    padding: 24px 24px 12px;
  }

  .gift-popup-img {
    max-width: 200px;
    margin: 0 auto;
  }

  .gift-popup-badge {
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
  }

  .gift-popup-content {
    padding: 8px 24px 28px;
    text-align: center;
    align-items: center;
  }

  .gift-popup-desc {
    max-width: none;
  }

  .gift-popup-kicker {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .gift-popup-title {
    font-size: 24px;
  }

  .gift-popup-card {
    border-radius: 20px 20px 0 0;
  }
}

.home-marketing-msg.ok {
  color: var(--green);
}

.home-marketing-msg.err {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .home-marketing {
    --mkt-title: 22px;
    --mkt-desc: 14px;
  }

  .home-marketing-card {
    padding: 28px 24px;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .home-marketing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-marketing {
    --mkt-title: 20px;
    --mkt-desc: 14px;
    --mkt-btn: 14px;
    --mkt-action-h: 46px;
  }

  .home-marketing-card {
    grid-template-columns: minmax(0, 44%) minmax(0, 56%);
    padding: 20px 18px;
    gap: 16px;
    text-align: left;
  }

  .home-marketing-form {
    grid-template-columns: 1fr;
  }

  .home-marketing-form .home-marketing-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .home-marketing-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-marketing-img {
    max-width: 220px;
    margin: 0 auto;
  }
}
