/* ==================== CSS Variables ==================== */
:root {
  --color-primary: #4A8FE7;
  --color-primary-dark: #3B7CD5;
  --color-accent: #E88CA5;
  --color-text: #2D3748;
  --color-text-light: #64748B;
  --color-white: #FFF;
  --color-bg: #EFF4FA;
  --color-bg-card: #FFF;
  --color-border: #D4DEE9;
  --color-badge-5g: #4A8FE7;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 40px;
  --shadow-card: 0 2px 8px rgba(74, 143, 231, 0.08);
  --shadow-card-hover: 0 6px 20px rgba(74, 143, 231, 0.14);
}

/* ==================== Base ==================== */
.page-body {
  font-family: 'Rakuten Sans JP2', 'Noto Sans JP', -apple-system, Roboto, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
  color: var(--color-text);
  background: #FFF;
}

.page-wrap {
  background: var(--color-bg);
  padding-bottom: 80px;
}

.page-body img {
  max-width: 100%;
  height: auto;
}

.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ==================== Hero Section ==================== */
.hero-section {
  width: 100%;
  text-align: center;
  line-height: 0;
  overflow: hidden;
}

.hero-section h1 {
  margin: 0;
  line-height: 0;
}

.hero-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  animation: heroZoomIn 1.2s ease-out forwards;
}

.hero-subcatch {
  margin: 32px 0 0;
  font-size: 28px;
  font-weight: bold;
  color: var(--color-primary);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: heroFadeUp 0.8s ease-out 0.6s forwards;
}

@keyframes heroZoomIn {
  0% {
    opacity: 0;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== Brand Navigation ==================== */
.brand-nav-section {
  margin: 48px 0;
}

.brand-nav-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.brand-nav-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.brand-nav-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

/* ==================== Brand Section ==================== */
.brand-section {
  margin: 56px 0;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: 60px;
}

.brand-section:last-of-type {
  border-bottom: none;
}

.brand-header {
  margin-bottom: 32px;
  text-align: center;
}

.brand-header-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  padding: 12px 32px;
  display: inline-block;
  background: var(--color-bg-card);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-card);
}

/* ==================== Product Card Grid ==================== */
.product-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.product-card-image {
  position: relative;
  padding: 24px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.product-card-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-white);
}

.badge-5g {
  background: var(--color-badge-5g);
}

.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
}

.product-card-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-card-specs li {
  font-size: 11px;
  color: var(--color-text-light);
  background: var(--color-bg);
  padding: 3px 8px;
  border-radius: 4px;
}

.product-card-features {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ==================== Brand More Link ==================== */
.brand-more {
  text-align: center;
  margin-top: 24px;
}

.brand-more-link {
  display: inline-block;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.brand-more-link:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ==================== Shop List ==================== */
.shop-list-section {
  margin: 56px 0;
}

.shop-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
  min-height: 56px;
}

.shop-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.shop-card img {
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
}

/* ==================== FAQ Section ==================== */
.faq-section {
  margin: 56px 0 0;
}

.faq-list {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
}

.faq-list.ecm-accordion {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.faq-list .ecm-accordion-item {
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-list .ecm-accordion-trigger {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.5;
}

.faq-list .ecm-accordion-trigger:hover {
  background: rgba(0, 0, 0, 0.02);
}

.faq-answer {
  padding: 0 20px 20px;
}

.faq-answer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-light);
}

/* ==================== Glossary Section ==================== */
.glossary-section {
  margin: 56px 0 48px;
}

.glossary-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.glossary-term {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-primary);
}

.glossary-definition {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  color: var(--color-text-light);
}

/* ==================== Search Filter ==================== */
.search-filter-section {
  margin: 32px 0 8px;
  padding: 32px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.search-filter-section .ecm-search {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  position: relative !important;
  display: block !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.search-filter-section .ecm-search * {
  visibility: visible !important;
}

.search-filter-section .ecm-search .search-filter-grid,
.search-filter-section .ecm-search .search-filter-actions {
  display: flex !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.search-filter-section .ecm-search .search-filter-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}

.search-filter-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
  color: var(--color-text);
}

/* --- フィルターグリッド --- */
.search-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filter-group {
  padding: 0;
}

.filter-group-keyword {
  grid-column: 1 / -1;
}

.filter-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

/* --- キーワード入力 --- */
.keyword-input-wrap {
  position: relative;
}

.keyword-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.keyword-input::placeholder {
  color: #AAB7C6;
  font-size: 13px;
}

.keyword-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 143, 231, 0.12);
}

/* --- フィルターチップ --- */
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: default;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.filter-chip-hint {
  opacity: 0.7;
  font-size: 12px;
}

/* --- 商品の状態（ラジオチップ） --- */
.filter-group-condition .filter-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.filter-chip-condition {
  cursor: pointer;
  padding: 10px 16px;
  font-size: 14px;
}

.filter-chip-condition input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-chip-condition:has(input:checked) {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* --- 価格帯セレクト --- */
.filter-price-selects {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.filter-price-selects .ecm-search-select-container {
  flex: 1;
}

.filter-price-selects .ecm-search-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  appearance: auto;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-price-selects .ecm-search-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 143, 231, 0.12);
}

.price-separator {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-light);
  flex-shrink: 0;
}

/* --- 検索アクション --- */
.search-filter-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.filter-reset-btn {
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-light);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
}

.filter-reset-btn:hover {
  background: var(--color-bg);
}

.filter-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(74, 143, 231, 0.3);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}

.filter-search-btn:hover {
  box-shadow: 0 6px 20px rgba(74, 143, 231, 0.4);
  transform: translateY(-1px);
}

.filter-search-btn:visited {
  color: var(--color-white);
}

/* ==================== Support Section ==================== */
.support-section {
  margin: 56px 0;
}

.support-card {
  margin-top: 24px;
  background: linear-gradient(135deg, #EBF2FC 0%, #FFF 40%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 2px solid #A0B8D0;
  overflow: hidden;
}

.support-card-content {
  padding: 36px 40px;
}

.support-catch {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.6;
  margin: 0 0 28px;
  text-align: center;
}

.support-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.support-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.support-feature-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.support-feature-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.support-feature-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-light);
}

.support-cta {
  text-align: center;
}

.support-cta-btn {
  display: inline-block;
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.2s;
}

.support-cta-btn,
.support-cta-btn:visited,
.support-cta-btn:hover {
  color: var(--color-white);
}

.support-cta-btn:hover {
  opacity: 0.8;
}

.support-shops {
  margin-top: 32px;
}

.support-shops-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.support-shops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ==================== 注釈 ==================== */
.brand-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text-light);
  margin: 8px 0 32px;
  text-align: center;
}

/* ==================== プロダクトアルコル ==================== */
/* グリッドレイアウト: brand-section内のecm-adを並べる */
.brand-section {
  margin-bottom: 40px;
}

.procor-products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.procor-more {
  text-align: center;
  margin-top: 16px;
}

.ecm-view-more-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ecm-view-more-button:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.ecm-view-more-button i {
  font-size: 12px;
  transition: transform 0.3s;
}

.ecm-view-more-button[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.brand-section .ecm-ad {
  box-sizing: border-box;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.brand-section .ecm-ad:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.brand-section .ecm-ad-link,
.procor-ad-link {
  display: block;
  text-decoration: none;
  color: var(--color-text);
}

.brand-section .ecm-ad-link:hover,
.procor-ad-link:hover {
  text-decoration: none;
}

.brand-section .ecm-ad-link:hover .ecm-ad-name,
.procor-ad-link:hover .procor-ad-name {
  text-decoration: underline;
}

.brand-section .ecm-ad .d-block {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  padding: 12px;
  box-sizing: border-box;
}

.brand-section .ecm-ad-image,
.procor-ad-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.brand-section .ecm-ad-body,
.procor-ad-body {
  padding: 12px 14px 14px;
}

.brand-section .ecm-ad-name,
.procor-ad-name {
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  word-break: break-all;
  min-height: 2.6em;
}

.procor-ad-text {
  color: #888;
  font-size: 11px;
  text-decoration: none;
  margin-top: 6px;
}

.procor-ad-label {
  color: #333;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  border: 1px solid rgb(0 0 0 / 8%);
  border-radius: 2px;
  padding: 4px;
  margin-top: 4px;
  max-width: 173px;
}

/* noimage非表示（ブランドセクション別） */
#aquos .ecm-ad:has(img.ecm-ad-image[src*='nopicture/nopicture.gif']),
#aquos .ecm-ad:has(img.ecm-ad-image[data-lazy-loading*='nopicture/nopicture.gif']),
#xperia .ecm-ad:has(img.ecm-ad-image[src*='nopicture/nopicture.gif']),
#xperia .ecm-ad:has(img.ecm-ad-image[data-lazy-loading*='nopicture/nopicture.gif']),
#oppo .ecm-ad:has(img.ecm-ad-image[src*='nopicture/nopicture.gif']),
#oppo .ecm-ad:has(img.ecm-ad-image[data-lazy-loading*='nopicture/nopicture.gif']),
#xiaomi .ecm-ad:has(img.ecm-ad-image[src*='nopicture/nopicture.gif']),
#xiaomi .ecm-ad:has(img.ecm-ad-image[data-lazy-loading*='nopicture/nopicture.gif']),
#galaxy .ecm-ad:has(img.ecm-ad-image[src*='nopicture/nopicture.gif']),
#galaxy .ecm-ad:has(img.ecm-ad-image[data-lazy-loading*='nopicture/nopicture.gif']),
#asus .ecm-ad:has(img.ecm-ad-image[src*='nopicture/nopicture.gif']),
#asus .ecm-ad:has(img.ecm-ad-image[data-lazy-loading*='nopicture/nopicture.gif']) {
  display: none;
}

.brand-section .ecm-ad-price-container,
.procor-ad-price {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.brand-section .ecm-ad-price-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

.brand-section .ecm-ad-price-unit {
  font-size: 12px;
  color: var(--color-primary);
}

.procor-ad-date-,
.procor-ad-label-container- {
  display: none;
}
