/* ═══════════════════════════════════════
 * GM Kampagne — Cookbook Sales Popup
 * 3 design variants: price · gift · inspiration
 * ═══════════════════════════════════════ */

.gmkc-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.gmkc-popup-overlay.gmkc-popup-visible {
  opacity: 1;
  visibility: visible;
}

.gmkc-popup {
  position: relative;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.3);
  overflow: hidden;
  max-width: 760px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: -apple-system, system-ui, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.gmkc-popup-visible .gmkc-popup {
  transform: scale(1) translateY(0);
}

.gmkc-popup-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  color: #1C1A16;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
}
.gmkc-popup-close:hover {
  background: #fff;
  transform: scale(1.05);
}

/* Image cell */
.gmkc-popup-image {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #FAF6EC;
}
.gmkc-popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* vertical-center tall portraits */
  display: block;
}

/* Body cell */
.gmkc-popup-body {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #1C1A16;
}
.gmkc-popup-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin: 0 0 14px;
}
.gmkc-popup-heading {
  font-family: Georgia, 'EB Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 14px;
}
.gmkc-popup-text {
  font-size: 15px;
  line-height: 1.65;
  color: #555;
  margin: 0 0 26px;
}
.gmkc-popup-text p:last-child { margin-bottom: 0; }

.gmkc-popup-btn {
  display: inline-block;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  align-self: flex-start;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.gmkc-popup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.gmkc-popup-skip {
  margin-top: 14px;
  background: none;
  border: none;
  font-size: 13px;
  color: #8A847A;
  cursor: pointer;
  font-family: inherit;
  align-self: flex-start;
  padding: 4px 0;
  text-decoration: underline;
}
.gmkc-popup-skip:hover { color: #1C1A16; }

/* ═══════════════════════════════════════
 * VARIANT — PRICE (combo deal)
 * Warm cream + gold accent — value-focused
 * ═══════════════════════════════════════ */
.gmkc-popup--price { background: #FAF6EC; }
.gmkc-popup--price .gmkc-popup-eyebrow { color: #B8883A; }
.gmkc-popup--price .gmkc-popup-btn { background: #B8883A; color: #fff; }
.gmkc-popup--price .gmkc-popup-btn:hover { background: #a07530; }

/* ═══════════════════════════════════════
 * VARIANT — GIFT (personal greeting)
 * Soft pink/cream + dark green — emotional
 * ═══════════════════════════════════════ */
.gmkc-popup--gift {
  background: linear-gradient(135deg, #FBF5E9 0%, #F5E6D3 100%);
  background-color: #FBF5E9;
}
.gmkc-popup--gift .gmkc-popup-eyebrow { color: #2C4A3A; }
.gmkc-popup--gift .gmkc-popup-heading { font-style: italic; }
.gmkc-popup--gift .gmkc-popup-btn {
  background: #2C4A3A;
  color: #E8D49A;
}
.gmkc-popup--gift .gmkc-popup-btn:hover { background: #234034; color: #fff; }

/* ═══════════════════════════════════════
 * VARIANT — INSPIRATION (curated quality)
 * Dark green panel — premium, editorial
 * ═══════════════════════════════════════ */
.gmkc-popup--inspiration {
  background: #2C4A3A;
}
.gmkc-popup--inspiration .gmkc-popup-image {
  background: #1a3024;
}
.gmkc-popup--inspiration .gmkc-popup-body { color: #fff; }
.gmkc-popup--inspiration .gmkc-popup-eyebrow { color: #E8D49A; }
.gmkc-popup--inspiration .gmkc-popup-heading { color: #fff; }
.gmkc-popup--inspiration .gmkc-popup-text { color: rgba(255,255,255,0.85); }
.gmkc-popup--inspiration .gmkc-popup-btn {
  background: #E8D49A;
  color: #1a3024;
}
.gmkc-popup--inspiration .gmkc-popup-btn:hover {
  filter: brightness(1.08);
}
.gmkc-popup--inspiration .gmkc-popup-skip { color: rgba(255,255,255,0.55); }
.gmkc-popup--inspiration .gmkc-popup-skip:hover { color: #fff; }

/* ═══════════════════════════════════════
 * RESPONSIVE — mobile bottom-drawer
 * ═══════════════════════════════════════ */
@media (max-width: 700px) {
  .gmkc-popup-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .gmkc-popup {
    border-radius: 22px 22px 0 0;
    grid-template-columns: 1fr;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }
  .gmkc-popup-image {
    min-height: 0;
    height: 220px;
  }
  .gmkc-popup-image img { object-position: center center; }
  .gmkc-popup-body { padding: 30px 26px 32px; }
  .gmkc-popup-heading { font-size: 24px; }
  .gmkc-popup-text { font-size: 14px; }
  .gmkc-popup-btn {
    width: 100%;
    text-align: center;
  }
  .gmkc-popup-skip { align-self: center; }
}

@media (max-width: 380px) {
  .gmkc-popup-image { height: 180px; }
  .gmkc-popup-body { padding: 26px 22px 28px; }
  .gmkc-popup-heading { font-size: 21px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gmkc-popup-overlay,
  .gmkc-popup { transition: none; }
}

/* ═══════════════════════════════════════
 * PWA MODE — native bottom-sheet feel
 * Triggered when popup runs inside GM PWA app (iframe context).
 * Replaces center-modal with slide-up sheet, safe-area padding for notch.
 * ═══════════════════════════════════════ */
.gmkc-popup-overlay--pwa {
  align-items: flex-end !important;
  padding: 0 !important;
  background: rgba(0,0,0,0.4); /* lighter — bottom sheet feels less heavy */
}
.gmkc-popup--pwa {
  grid-template-columns: 1fr !important;
  border-radius: 24px 24px 0 0 !important;
  max-width: 100% !important;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  /* Safe-area for iPhone notch / Android nav bar */
  padding-bottom: env(safe-area-inset-bottom, 0);
  /* Slide up animation initial state */
  transform: translateY(100%) !important;
}
.gmkc-popup-visible .gmkc-popup--pwa {
  transform: translateY(0) !important;
}

/* Drag handle (visual cue for swipe-down) */
.gmkc-popup-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.18);
  z-index: 11;
  pointer-events: none;
}
.gmkc-popup--inspiration .gmkc-popup-handle {
  background: rgba(255,255,255,0.35);
}

/* Image area: shorter on bottom-sheet */
.gmkc-popup--pwa .gmkc-popup-image {
  min-height: 0 !important;
  height: 240px !important;
  border-radius: 24px 24px 0 0;
}
.gmkc-popup--pwa .gmkc-popup-image img {
  object-position: center center;
}

/* Body padding tuned for native feel */
.gmkc-popup--pwa .gmkc-popup-body {
  padding: 28px 24px 32px !important;
}
.gmkc-popup--pwa .gmkc-popup-heading {
  font-size: 24px;
}
.gmkc-popup--pwa .gmkc-popup-text {
  font-size: 15px;
}
.gmkc-popup--pwa .gmkc-popup-btn {
  width: 100%;
  text-align: center;
  padding: 16px 24px;
  border-radius: 14px; /* iOS-feel rounded */
  font-size: 16px;
}
.gmkc-popup--pwa .gmkc-popup-skip {
  align-self: center;
  margin-top: 16px;
  padding: 10px 0;
}

/* Close button repositioned — safe area aware */
.gmkc-popup--pwa .gmkc-popup-close {
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  font-size: 20px;
}
