/* ===== ZemSim Product Page Style ===== */

.zemsim-product-page {
  font-family: 'Montserrat', sans-serif;
  background: #fff;
  color: #212121;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 120px;
}

/* ── Hero Image ── */
.zemsim-prod-hero {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
  background: #0176f9;
}
.zemsim-prod-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.zemsim-prod-hero .flag { font-size: 80px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2)); }
.zemsim-prod-hero .back-btn {
  position: absolute;
  top: 16px; left: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 2px 0;
  font-size: 21px; font-weight: 900; line-height: 1;
  -webkit-text-stroke: 0.7px #111;
  color: #111; cursor: pointer; border: none; z-index: 2;
}

/* ── Coverage Box ── */
.zemsim-coverage-box {
  background: #f8f9fb;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #333;
  word-break: break-word;
}

/* ── Title Section — deliberately 2 lines: "<Country> Travel" / "Unlimited eSIM" ── */
.zemsim-prod-header {
  background: #fff;
  padding: 20px 16px 12px;
}
.zemsim-prod-header h1 {
  font-size: 22px; font-weight: 700; color: #212121; margin: 0;
  line-height: 1.25; word-break: break-word;
}
.zemsim-prod-plan {
  display: block; margin-top: 5px;
  font-size: 14px; font-weight: 600; color: #0176f9; line-height: 1.3;
}
.zemsim-prod-type-toggle {
  display: flex;
  background: #f0f0f0;
  border-radius: 9999px;
  padding: 2px;
}
.zemsim-prod-type-toggle button {
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #999;
  min-width: 52px;
  min-height: 30px;
}
.zemsim-prod-type-toggle button.active {
  background: #fff;
  color: #212121;
  box-shadow: 0 1px 2px rgba(0,0,0,0.09);
}

/* ── Section Divider ── */
.zemsim-prod-divider { display: none; }

/* ── Section ── */
.zemsim-prod-section {
  background: #fff;
  padding: 12px 16px;
}
.zemsim-prod-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: #212121;
  margin: 0 0 12px;
}

/* ── Benefits Cards ── */
.zemsim-benefit-list { display: flex; flex-direction: column; gap: 10px; }
.zemsim-benefit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 14px;
}
.zemsim-benefit-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.zemsim-benefit-text { flex: 1; }
.zemsim-benefit-text h4 { font-size: 14px; font-weight: 600; color: #212121; margin: 0 0 2px; }
.zemsim-benefit-text p { font-size: 12px; color: #999; margin: 0; }

/* ── Quality Badge ── */
.zemsim-quality-badge {
  display: flex; align-items: center; gap: 8px;
  background: #e8f5e9; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px;
}
.zemsim-quality-badge .check {
  width: 24px; height: 24px; border-radius: 50%;
  background: #4caf50; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; flex-shrink: 0;
}
.zemsim-quality-badge span { font-size: 13px; color: #2e7d32; font-weight: 600; }
.zemsim-quality-badge small { font-size: 11px; color: #666; margin-left: auto; }

/* ── Plan Tier Cards ── */
.zemsim-tier-card {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  transition: all 0.15s;
}
.zemsim-tier-card.selected {
  border-color: #0176f9;
  background: #f0f8ff;
  box-shadow: 0 2px 8px rgba(1,118,249,0.10);
}
.zemsim-tier-card .zemsim-tier-name { font-size: 15px; font-weight: 700; color: #212121; }
.zemsim-tier-card .zemsim-tier-desc { font-size: 11px; color: #999; margin-top: 2px; }
.zemsim-tier-card .zemsim-tier-price { text-align: right; flex-shrink: 0; }
.zemsim-tier-card .zemsim-tier-amount { font-size: 17px; font-weight: 800; color: #0176f9; }
.zemsim-tier-card .zemsim-tier-orig { font-size: 12px; color: #999; text-decoration: line-through; }
.zemsim-tier-card .zemsim-tier-unit { font-size: 11px; color: #999; }
.zemsim-tier-card.unlimited-card {
  background: #f0f8ff; border-color: #b3d9ff;
}
.zemsim-tier-card.unlimited-card.selected {
  border-color: #0176f9;
  box-shadow: 0 2px 8px rgba(1,118,249,0.10);
}

/* ── Duration Carousel ── */
.zemsim-duration-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 12px;
  margin: 4px -16px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.zemsim-duration-carousel::-webkit-scrollbar { display: none; }

.zemsim-duration-btn {
  flex: 0 0 auto;
  scroll-snap-align: center;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  white-space: nowrap;
  min-width: 72px;
  user-select: none;
  -webkit-user-select: none;
}
.zemsim-duration-btn:hover {
  border-color: #0176f9;
  background: #fafcff;
}
.zemsim-duration-btn.selected {
  border-color: #0176f9;
  background: #e8f2ff;
  color: #0176f9;
}

/* ── Validity Notice (180 days) ── */
.zemsim-validity-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eaf3fe;
  border: 1px solid #d6e6fa;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: #1a5fb4;
  line-height: 1.6;
}
.zemsim-validity-bar .zemsim-validity-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.zemsim-validity-bar strong {
  color: #0f4a8f;
}
@media (max-width: 480px) {
  .zemsim-validity-bar {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* ── Bottom Fixed Bar ── */
.zemsim-bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 500px; margin: 0 auto;
  background: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid #eee;
  z-index: 999;
}
.zemsim-bottom-price { display: flex; flex-direction: column; align-items: flex-start; }
.zemsim-bottom-price .amount { font-size: 20px; font-weight: 800; color: #0176f9; }
.zemsim-bottom-price .original { font-size: 13px; color: #999; text-decoration: line-through; }
.zemsim-calculation { font-size: 11px; color: #999; margin-top: 1px; }
.zemsim-savings { font-size: 11px; color: #4caf50; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.zemsim-add-btn {
  flex: none;
  width: 160px;
  height: 56px;
  border-radius: 16px;
  background: #0066ff;
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.zemsim-add-btn:hover { background: #0052cc; }
.zemsim-add-btn:disabled { background: #ccc; cursor: not-allowed; }

/* ── Quantity Modal ── */
.zemsim-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000;
  padding-bottom: 20px;
}
.zemsim-modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.zemsim-modal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.zemsim-modal-icon {
  width: 40px; height: 40px;
  background: #e3f2fd; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.zemsim-modal-title { flex: 1; }
.zemsim-modal-title h3 { font-size: 15px; font-weight: 700; color: #222; margin: 0 0 2px; }
.zemsim-modal-title p { font-size: 12px; color: #999; margin: 0; }
.zemsim-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #f5f5f5;
  cursor: pointer; font-size: 14px; color: #999;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.zemsim-modal-body { padding: 16px 20px; }
.zemsim-qty-section h4 { font-size: 14px; font-weight: 600; color: #333; margin: 0 0 10px; }

.zemsim-qty-control {
  display: flex; align-items: center; gap: 12px;
  background: #f5f6f8; border-radius: 12px; padding: 14px 16px;
}
.zemsim-qty-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.zemsim-qty-plan { font-size: 14px; font-weight: 600; color: #222; }
.zemsim-qty-price { font-size: 16px; font-weight: 800; color: #0176f9; }

.zemsim-qty-buttons {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.zemsim-qty-btn {
  width: 40px; height: 40px;
  background: #fff; border: none;
  font-size: 18px; cursor: pointer; color: #333;
}
.zemsim-qty-input {
  width: 44px; height: 40px;
  border: none; text-align: center;
  font-size: 15px; font-weight: 600;
  border-left: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb;
}
.zemsim-qty-info-bar {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 12px; color: #999;
}
.zemsim-modal-btn {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 16px;
  background: #0066ff; color: #fff;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
}

/* ── Responsive ── */
@media (min-width: 769px) {
  .zemsim-bottom-bar {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    border-top: none;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .zemsim-product-page {
    padding-bottom: 120px;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
  }
}


/* ── Price block order: rate×days → struck → price → savings ── */
.zemsim-bottom-price .zemsim-calculation { order: 1; font-size: 11px; color: #999; margin: 0 0 2px; }
.zemsim-bottom-price .original { order: 2; font-size: 13px; color: #999; text-decoration: line-through; margin: 0 0 1px; }
.zemsim-bottom-price .amount { order: 3; }
.zemsim-bottom-price .zemsim-savings { order: 4; }

/* ===== qty input, added-to-cart modal, header cart button (from theme) ===== */
/* 수량 입력: 위아래 스피너 화살표 제거 + 검은 박스/포커스 링 제거 (2026-09-21) */
  .zemsim-qty-input,
  .zemsim-qty-buttons input[type="number"],
  .zemsim-qty-buttons input[type="text"] {
    -webkit-appearance: none !important; -moz-appearance: textfield !important; appearance: none !important;
    border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
  }
  .zemsim-qty-input::-webkit-outer-spin-button,
  .zemsim-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important; appearance: none !important; margin: 0 !important; display: none !important;
  }
  .zemsim-qty-input:focus, .zemsim-qty-input:focus-visible { outline: 0 !important; box-shadow: none !important; border: 0 !important; }

  /* 장바구니 담기 완료 모달 (2026-09-21) */
  .zemsim-added-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center;
    justify-content: center; padding: 20px; background: rgba(17,17,17,.45); opacity: 0; transition: opacity .2s ease; }
  .zemsim-added-overlay.is-visible { opacity: 1; }
  .zemsim-added-card { width: 100%; max-width: 360px; background: #fff; border-radius: 18px; padding: 26px 22px 20px;
    text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.22); transform: translateY(10px) scale(.96);
    transition: transform .26s cubic-bezier(.2,.9,.3,1.3); font-family: var(--font-body--family, 'Poppins', sans-serif); }
  .zemsim-added-overlay.is-visible .zemsim-added-card { transform: translateY(0) scale(1); }
  .zemsim-added-check { width: 62px; height: 62px; margin: 0 auto 10px; }
  .zemsim-added-check svg { width: 100%; height: 100%; }
  .zemsim-added-circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: zemsimCircle .45s ease forwards; }
  .zemsim-added-tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: zemsimTick .3s .35s ease forwards; }
  @keyframes zemsimCircle { to { stroke-dashoffset: 0; } }
  @keyframes zemsimTick { to { stroke-dashoffset: 0; } }
  .zemsim-added-title { font-size: 17px; font-weight: 700; color: #111; margin: 0 0 4px; }
  .zemsim-added-line { font-size: 13px; color: #666; margin: 0 0 18px; }
  .zemsim-added-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .zemsim-added-continue { padding: 13px; border: 1px solid #d9dde3; background: #fff; color: #333; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: pointer; }
  .zemsim-added-gocheckout { padding: 14px; background: #0176f9; color: #fff; border-radius: 12px; font-size: 15px;
    font-weight: 700; text-align: center; text-decoration: none; }
  .zemsim-added-gocheckout:hover { background: #0059c9; }
  /* 헤더 장바구니 버튼 */
  .zemsim-cart-btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; color: inherit; text-decoration: none; }
  .zemsim-cart-btn svg { width: 21px; height: 21px; }
  .zemsim-cart-count { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px;
    background: #0176f9; color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 17px;
    text-align: center; display: none; }
  .zemsim-cart-count.is-shown { display: inline-block; }

  /* 가격 표시 순서: 단가×일수 → 정가(취소선) → 할인가 → 절약 (2026-09-21) */
  .zemsim-bottom-price .original { text-decoration: line-through; font-size: 13px; color: #999; margin-bottom: 1px; }
  .zemsim-bottom-price .amount { color: #0176f9; }
  .zemsim-bottom-price .zemsim-savings { font-size: 11px; color: #4caf50; font-weight: 600; margin-top: 2px; }
  @media (max-width: 749px) { .zemsim-bottom-price .amount { font-size: 19px; } }

  /* 지역 요금제 커버리지 목록 (Europe / Asia / Oceania / Global) */
  .zemsim-cov-count { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
    background: #eef5ff; color: #0157bd; font-size: 12px; font-weight: 700; vertical-align: middle; }
  .zemsim-cov-lead { font-size: 13px; color: #6b7280; margin: 6px 0 0; }
  .zemsim-cov-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; padding: 0; }
  .zemsim-cov-list li { font-size: 12.5px; line-height: 1.4; color: #0b1220; background: #f7fafd;
    border: 1px solid #e7edf5; border-radius: 999px; padding: 5px 11px; }
  .zemsim-cov-list a { color: inherit; text-decoration: none; }
  .zemsim-cov-list a:hover { color: #0176f9; }
  .zemsim-cov-note { font-size: 11.5px; color: #9ca3af; margin: 12px 0 0; }
