/* ── 大手EC風 UI ポリッシュ (Amazon × 楽天) ── */

/* ベース */
body.deal-page {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.product-card::before { display: none; }

.product-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(15, 17, 17, 0.12);
}

/* ── ヘッダー ── */
.deal-header {
  display: flex;
  grid-template-columns: unset;
  grid-template-rows: unset;
  align-items: center;
  padding: 0.5rem 1rem !important;
  gap: 0.65rem;
}

.deal-logo { padding: 0.25rem 0; flex-shrink: 0; }

.mall-search {
  flex: 1;
  margin: 0 0.75rem;
  max-width: none;
  height: 42px;
}

.deal-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: 0;
  flex-shrink: 0;
}

.affiliate-status {
  margin: 0;
  font-size: 0.6875rem;
  padding: 0.35rem 0.6rem;
  flex-shrink: 0;
}

.deal-menu-btn {
  display: none;
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
}

.cat-filter {
  grid-column: 1 / -1;
  grid-row: 2;
  position: static;
  margin: 0.45rem -1rem 0;
  width: calc(100% + 2rem);
  max-width: none;
}

.mall-search__cat { min-width: 7.5rem; font-size: 0.8125rem; color: var(--text); }
.mall-search__input { font-size: 0.9375rem; }

.deal-nav__tab {
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  margin-left: 0;
  font-size: 0.8125rem;
}

.deal-nav__tab.active { background: rgba(255, 255, 255, 0.12); }

/* ── ヒーロー ── */
.deal-hero {
  padding: 0;
  background: #fff;
}

.deal-hero__inner {
  display: block;
  max-width: 1280px;
  padding: 0;
}

.deal-hero__content {
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(135deg, #232f3e 0%, #131921 55%, #37475a 100%);
  color: #fff;
}

.deal-hero__badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.deal-hero h1 {
  color: #fff;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.deal-hero__content p {
  color: #ccc;
  font-size: 0.9375rem;
  max-width: 640px;
}

.deal-hero__content p strong { color: #fff; }

.gradient-text {
  background: linear-gradient(90deg, #ff9900, #ffb84d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.deal-hero__stats { margin-top: 1rem; }

.stat-pill {
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
}

.deal-hero__visual {
  display: none;
}

/* カテゴリーショートカット（楽天風） */
.hero-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  max-width: 1280px;
  margin: 0 auto;
}

.hero-cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.35rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hero-cat-chip:hover {
  border-color: var(--amazon);
  box-shadow: 0 2px 6px rgba(255, 153, 0, 0.15);
}

.hero-cat-chip__icon { font-size: 1.5rem; line-height: 1; }
.hero-cat-chip__label { font-size: 0.6875rem; font-weight: 600; color: var(--text); text-align: center; line-height: 1.2; }
.hero-cat-chip__count { font-size: 0.5625rem; color: var(--muted); }

/* ── トップセクション ── */
.top-deals {
  padding: 1.25rem 0;
  background: var(--bg);
  border: 0;
}

.top-deals__head h2 {
  font-size: 1.125rem;
  font-weight: 700;
  border-left: 4px solid var(--amazon);
  padding-left: 0.65rem;
}

.top-deals__scroll {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 0.85rem;
}

.top-deal-card {
  flex: 0 0 180px;
  position: relative;
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.top-deal-card__img {
  height: 140px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border-light);
  background: #fff;
}

.top-deal-card__name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0.5rem 0.65rem 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #007185;
  font-weight: 400;
}

.top-deal-card__list,
.top-deal-card__price,
.top-deal-card__save {
  padding: 0 0.65rem;
}

.top-deal-card__price {
  font-size: 1.25rem;
  padding-bottom: 0.15rem;
}

.top-deal-card__save {
  padding-bottom: 0.65rem;
  font-size: 0.6875rem;
}

/* ── パンくず・結果バー ── */
.browse-breadcrumb {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  padding: 0.5rem 0;
}

.crumb-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
}

.crumb-link:hover { color: var(--amazon-dark); text-decoration: underline; }
.crumb-sep { margin: 0 0.35rem; color: #999; }

.results-bar {
  border-radius: 4px;
  padding: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.results-range { font-size: 0.8125rem; color: var(--muted); }

.sort-select {
  min-width: 140px;
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
}

/* ── 商品グリッド（Amazon風 多列） ── */
.deal-layout {
  padding: 0.75rem 1rem 2rem;
  gap: 1rem;
}

.deal-sidebar { top: 120px; }

.sidebar-panel {
  border-radius: 4px;
  padding: 1rem;
}

.sidebar-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.4rem;
}

.cat-btn {
  border-radius: 4px;
  font-size: 0.8125rem;
  padding: 0.5rem 0.65rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 1400px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1100px) and (max-width: 1399px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) and (max-width: 1099px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 600px) and (max-width: 899px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── 商品カード ── */
.product-card {
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 17, 17, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.product-card__media {
  padding: 0.5rem;
  background: #fff;
}

.product-card__img {
  border: 0;
  background: #fff;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card__prime {
  top: 0.5rem;
  left: 0.5rem;
  border-radius: 2px;
}

.product-card__rank {
  top: auto;
  bottom: 0.5rem;
  right: 0.5rem;
  font-size: 0.5625rem;
}

.product-card__save-badge {
  top: 0.5rem;
  left: auto;
  right: 0.5rem;
  border-radius: 2px;
}

.product-card__body {
  padding: 0.5rem 0.65rem 0.35rem;
}

.product-card__brand-row {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.product-card__brand {
  font-size: 0.6875rem;
  color: var(--muted);
  font-weight: 500;
}

.product-card__cat {
  font-size: 0.5625rem;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

.product-card__name-btn {
  font-size: 0.8125rem;
  line-height: 1.35;
  min-height: 2.7em;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.25rem;
}

.product-card__rating .stars { font-size: 0.75rem; }
.product-card__rating .rating-num { font-size: 0.75rem; }
.review-count { font-size: 0.6875rem; color: var(--accent); }

.product-card__price-block {
  padding: 0.45rem 0.65rem 0.35rem;
  flex: 1;
}

.product-card__winner-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  margin: 0.25rem 0 0.35rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--surface-2);
  line-height: 1.3;
}

.product-card__winner-strip.route-amazon {
  background: var(--amazon-dim);
  color: var(--amazon-dark);
}

.product-card__winner-strip.route-rakuten {
  background: var(--rakuten-dim);
  color: var(--rakuten);
}

.product-card__winner-strip--solo {
  display: none;
}

.product-card__winner-total {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* 比較ブロックをコンパクトに */
.price-compare {
  margin: 0;
  border-radius: 3px;
}

.price-compare--compact {
  border: 0;
  background: transparent;
}

.price-compare--compact .price-compare__cols {
  gap: 0.35rem;
}

.price-compare--compact .price-compare__col {
  padding: 0.4rem 0.35rem;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  background: #fff;
}

.price-compare--compact .price-compare__col.amazon {
  border-right: 1px solid var(--border-light);
}

.price-compare--compact .price-compare__bar,
.price-compare--compact .price-compare__verdict {
  display: none;
}

.price-compare--compact .price-compare__badge {
  position: static;
  display: inline-block;
  margin-bottom: 0.15rem;
}

.price-compare--compact .price-compare__amount { font-size: 0.875rem; }
.price-compare--compact .price-compare__col.is-winner .price-compare__amount { font-size: 0.9375rem; }
.price-compare--compact .price-compare__breakdown { font-size: 0.5625rem; }

.price-compare--single {
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.price-compare--single .price-compare__single-label {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.price-compare--single .price-compare__single-total {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.2;
}

.price-compare--single .price-compare__single-total span {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
}

.price-compare--single .price-compare__breakdown {
  margin-top: 0.15rem;
  font-size: 0.625rem;
  color: var(--muted);
}

.price-compare__amount { font-size: 0.9375rem; }
.price-compare__col.is-winner .price-compare__amount { font-size: 1rem; }
.price-compare__verdict { font-size: 0.6875rem; padding: 0.3rem 0.4rem; }

/* CTA */
.product-card__actions {
  padding: 0.35rem 0.65rem 0.75rem;
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
}

.shop-cta {
  display: block;
  text-align: center;
  padding: 0.5rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: filter 0.15s;
}

.shop-cta:hover { filter: brightness(1.05); }
.shop-cta.amazon { background: var(--amazon); color: #111; }
.shop-cta.rakuten { background: var(--rakuten); color: #fff; }

.product-card__quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 0;
  gap: 0.4rem;
}

.product-card__quick-links--2 {
  grid-template-columns: 1fr 1fr;
}

.quick-link {
  border-radius: 4px;
  padding: 0.4rem 0.35rem;
  font-size: 0.6875rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-link.is-cheapest {
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.fav-btn {
  top: 0.5rem;
  left: 0.5rem;
  width: 30px;
  height: 30px;
  font-size: 0.875rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ── リスト表示 ── */
.deal-card.list-card { border-radius: 4px; }

.deal-card__shops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.65rem;
}

.shop-col {
  flex: 1 1 220px;
  border-radius: 4px;
  padding: 0.85rem;
}

.shop-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.shop-btn {
  display: block;
  text-align: center;
  padding: 0.55rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* ── フッター ── */
.deal-footer {
  padding: 1.25rem 1rem;
  font-size: 0.75rem;
  text-align: center;
}

.deal-note {
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
}

/* ── モバイル ── */
@media (max-width: 768px) {
  .deal-header {
    grid-template-columns: 1fr auto;
    padding: 0.5rem 0.75rem 0;
  }

  .deal-logo { grid-column: 1; grid-row: 1; }
  .affiliate-status { display: none; }
  .deal-menu-btn {
    display: grid;
    grid-column: 2;
    grid-row: 1;
  }

  .mall-search {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0.5rem 0 0;
  }

  .cat-filter {
    margin: 0.35rem -0.75rem 0;
    width: calc(100% + 1.5rem);
    padding: 0.55rem 0.75rem 0.65rem;
  }

  .cat-filter__body {
    grid-template-columns: 1fr;
    max-height: 180px;
  }

  .deal-nav { display: none; }

  .hero-categories {
    grid-template-columns: repeat(4, 1fr);
    padding: 0.75rem;
    gap: 0.4rem;
  }

  .hero-cat-chip { padding: 0.5rem 0.25rem; }
  .hero-cat-chip__icon { font-size: 1.25rem; }

  .deal-layout {
    grid-template-columns: 1fr;
    padding: 0.5rem 0.75rem 2rem;
  }

  .deal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 160;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding-top: env(safe-area-inset-top);
  }

  .deal-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18); }

  .deal-menu-btn,
  #filter-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .sidebar-overlay.open {
    display: block;
    opacity: 1;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .product-card__name-btn { font-size: 0.75rem; min-height: 2.5em; }

  .results-bar__right { width: 100%; justify-content: space-between; }
}

@media (min-width: 769px) {
  .deal-menu-btn { display: none !important; }
}
