/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.asoview-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
}

.logo-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.logo-text {
  width: 105px;
  height: 19px;
  flex-shrink: 0;
}

/* Loading & Error States */
.loading-state,
.error-state {
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.loading-text,
.error-text {
  color: var(--color-black);
  font-size: var(--font-size-sm);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E0E0E0;
  border-top-color: var(--color-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-retry-btn {
  margin-top: 12px;
  padding: 8px 24px;
  border-radius: 6px;
  background-color: var(--color-red);
  color: var(--color-white);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.error-retry-btn:hover {
  background-color: var(--color-dark-red);
}

/* KV セクション */
.kv {
  width: 100%;
  position: relative;
}

.kv-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
}

/* Arrow Anchor Link */
.arrow-anchor-link {
  position: absolute;
  bottom: 3rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  animation: arrowBounce 2s infinite ease-in-out;
}

.arrow-body {
  position: relative;
  background-color: var(--color-black);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 2px 2px 0px 0px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.arrow-point {
  width: 0;
  height: 0;
  border-left: 54px solid transparent;
  border-right: 54px solid transparent;
  border-top: 20px solid var(--color-black);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes arrowBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Description */
.description-section {
  background-color: var(--color-red);
  padding: 1.5rem 1rem 1rem 1rem;
}

.description-text {
  color: var(--color-white);
  font-size: 15px;
  line-height: 1.8;
}

/* Coupons Section */
.coupons-section {
  padding: 32px 16px;
  background-color: var(--color-red);
}

/* Coupons Description (simplified) */
.coupons-description-wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.coupons-description-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.8;
}

.section-title {
  font-size: 22px;
  color: var(--color-black);
  margin-bottom: 1rem;
  text-align: center;
}

.plans-section .section-title {
  font-weight: var(--font-weight-black);
  text-shadow: 0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff,0 0 3px #fff;
  -webkit-font-smoothing: antialiased;
}

.section-title-large {
  font-size: 30px;
  color: var(--color-red);
}

/* Icon */
.icon {
  width: 18px;
  height: 18px;
}

/* ============================================
   Plans Section
   ============================================ */
.plans-section {
  padding: 1.5rem 1rem;
  background-color: #FFF7F0;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plans-section.first-section {
  background: linear-gradient(160deg, #ffa600, #ff8900);
}

.plans-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ============================================
   横長カード（non-free用・1列）
   ============================================ */
.plan-card.plan-card--horizontal {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  border-radius: 8px;
}

/* 画像（左・8:5比率） */
.plan-card--horizontal .plan-image {
  width: 38%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 2;
}

.plan-card--horizontal .plan-image img {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 情報エリア（右60%） */
.plan-card--horizontal .plan-info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

/* カテゴリ・エリア テキストラベル */
.plan-card--horizontal .plan-label {
  display: block;
  font-size: 11px;
  color: var(--color-gray);
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.plan-label-sep {
  margin: 0 2px;
  color: #C0C0C0;
}

.plan-card--horizontal .plan-base {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  -webkit-line-clamp: 2;
  line-height: 1.4;
}

/* ============================================
   共通クーポンカード（non-freeセクション用）
   ============================================ */
.shared-coupon-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: linear-gradient(135deg, #FFF8F7 0%, #FFF0EE 100%);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1.5px solid rgba(207, 0, 0, 0.25);
  border-left: 5px solid var(--color-red);
  box-shadow: 0 3px 12px rgba(207, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.shared-coupon-card:hover {
  box-shadow: 0 4px 16px rgba(207, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* --- 左: クーポン情報 --- */
.coupon-info {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.coupon-rate {
  font-size: 28px;
  font-weight: var(--font-weight-black);
  color: var(--color-red);
  line-height: 1;
  letter-spacing: -0.02em;
}

.coupon-rate-label {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  margin-left: 2px;
}

.coupon-detail-text {
  font-size: 12px;
  color: var(--color-gray);
  line-height: 1.6;
}

/* --- 中央: ミシン目 --- */
.coupon-divider {
  position: relative;
  width: 0;
  border-right: 2px dashed #AAAAAA;
  flex-shrink: 0;
}

/* パンチ穴（上下） */
.coupon-divider::before,
.coupon-divider::after {
  content: '';
  position: absolute;
  left: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #FFF7F0;
  border: 2px solid #AAAAAA;
  z-index: 1;
}

.coupon-divider::before {
  top: -9px;
}

.coupon-divider::after {
  bottom: -9px;
}

/* --- 右: ボタンエリア --- */
.coupon-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  flex-shrink: 0;
}

.coupon-action .coupon-acquire-btn {
  display: inline-block;
  width: auto;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 12px;
  margin-top: 0;
  white-space: nowrap;
}

/* (旧 .plan-card--sm は横長カードに置き換え済み) */

/* ============================================
   Plan Card - 縦型リッチカード
   ============================================ */
.plan-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.plan-card:active {
  transform: translateY(0);
}

.plan-card.plan-card--horizontal:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* 第1セクション（オレンジ背景）のカード */
.plans-section.first-section .plan-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 2つ目以降のカード */
.plans-section:not(.first-section) .plan-card {
  border: 1px solid #E0D8D2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Plan Card - 画像エリア
   ============================================ */
.plan-card-image {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.plan-card-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 17 / 9;
  object-fit: cover;
  display: block;
}

/* カテゴリ & エリアタグ（画像上オーバーレイ） */
.plan-card-tags {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.plan-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Chrome住所自動リンク無効化 */
.plan-tag a,
.plan-label a {
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
}

.plan-tag--category {
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--color-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.plan-tag--area {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--color-black);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* おトク額バッジ（画像右下） */
.plan-savings-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--color-red);
  color: var(--color-white);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  padding: 6px 14px;
  border-radius: 8px 0 0 0;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

/* ============================================
   Plan Card - 情報エリア
   ============================================ */
.plan-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plan-base {
  font-size: 16px;
  color: var(--color-black);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plan-catch {
  font-size: 12px;
  color: var(--color-gray);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plan-name {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 価格行 */
.plan-price-row {
  display: flex;
  align-items: flex-end;
  margin-top: 4px;
}

.plan-pricing {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.plan-original-price {
  font-size: var(--font-size-xs);
  color: var(--color-gray);
  text-decoration: line-through;
  line-height: 1;
}

.plan-price {
  font-size: 18px;
  color: var(--color-red);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.plan-price--free {
  font-size: 18px;
  color: var(--color-red);
  font-weight: var(--font-weight-black);
}

/* ============================================
   受付終了（stock=false）
   ============================================ */
.coupon-soldout {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family);
  text-align: center;
  background-color: #E8E8E8;
  color: #999;
  margin-top: 8px;
  line-height: 1;
}

.coupon-action .coupon-soldout {
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 12px;
  margin-top: 0;
  white-space: nowrap;
}

/* ============================================
   クーポン取得ボタン（全幅）
   ============================================ */
.coupon-acquire-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family);
  text-align: center;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
  line-height: 1.3;
  letter-spacing: 0.04em;
  margin-top: 8px;
}

/* 獲得可能 */
.coupon-acquire-btn.state-ready,
.coupon-acquire-btn.state-login {
  background-color: var(--color-red);
  color: var(--color-white);
}

.coupon-acquire-btn.state-ready:hover,
.coupon-acquire-btn.state-login:hover {
  background-color: var(--color-dark-red);
}

.coupon-acquire-btn.state-ready:active,
.coupon-acquire-btn.state-login:active {
  transform: scale(0.98);
}

/* 獲得中 */
.coupon-acquire-btn.state-claiming {
  background-color: #E0E0E0;
  color: #999;
  cursor: wait;
}

/* 獲得済み */
.coupon-acquire-btn.state-owned {
  background-color: #F0F0F0;
  color: #999;
  cursor: default;
  border: 1px solid #D0D0D0;
  padding: 9px 15px;
}

/* ローディング */
.coupon-acquire-btn.state-loading {
  background-color: #E8E8E8;
  color: #AAAAAA;
  cursor: default;
}

/* ============================================
   Terms Section
   ============================================ */
.terms-section {
  padding: 1.5rem 1rem;
  background-color: var(--color-lighter-gray);
}

.terms-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terms-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-black);
  margin-bottom: 0.5rem;
}

.terms-item {
  background-color: var(--color-white);
  border-radius: 8px;
  padding: 16px;
}

.terms-text {
  font-size: var(--font-size-xs);
  color: var(--color-gray);
  line-height: 1.8;
}

/* ============================================
   Footer
   ============================================ */
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  text-align: center;
  background-color: var(--color-black);
}

.copyright {
  color: var(--color-white);
  font-size: var(--font-size-xs);
}
