/*
 * MIGNO TOKYO 9.0
 * Compact product media, shorter ranking cards, and a more consistent
 * commerce-first hierarchy across desktop and mobile.
 */

/* --------------------------------------------------------------------------
 * Hero: preserve the adopted visual language while improving balance.
 * ----------------------------------------------------------------------- */
@media (min-width: 1101px) {
  .trend-hero-v7,
  .trend-hero-v7 .trend-hero-grid {
    min-height: 744px;
  }
  .trend-hero-v7 .trend-hero-grid {
    grid-template-columns: minmax(560px, 1.08fr) minmax(430px, .92fr);
    gap: 30px;
    padding-top: 104px;
  }
  .trend-hero-v7 .trend-hero-copy {
    padding-bottom: 4px;
  }
  .phone-shell-v7 {
    right: 34px;
    bottom: -88px;
    width: 414px;
  }
  .trend-hero-v7 .hero-v6-heart {
    left: 5%;
    top: 104px;
    width: 88px;
  }
  .trend-hero-v7 .hero-v6-hash {
    left: 10%;
    bottom: 106px;
    width: 68px;
  }
  .trend-hero-v7 .hero-v6-arrow {
    right: 1%;
    bottom: 128px;
    width: 88px;
  }
}

/* --------------------------------------------------------------------------
 * Ranking section and cards.
 * ----------------------------------------------------------------------- */
.ranking-section {
  padding-top: 66px;
  padding-bottom: 78px;
}
.ranking-section .section-heading {
  margin-bottom: 28px;
}
.product-grid {
  align-items: stretch;
  gap: 18px;
}
.product-card-v9 {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(74, 53, 90, .08);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 42px rgba(68, 47, 88, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card-v9:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 102, 226, .18);
  box-shadow: 0 23px 50px rgba(69, 48, 91, .12);
}
.product-card-v9 .product-image-wrap {
  height: 190px;
  min-height: 190px;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(76, 56, 88, .06);
  background:
    radial-gradient(circle at 50% 86%, rgba(255,255,255,.92), transparent 46%),
    linear-gradient(145deg, color-mix(in srgb, var(--product-soft) 68%, #fff), #faf8ff 88%);
}
.product-card-v9 .product-image-wrap::after {
  inset: auto 14% -34px;
  height: 66px;
  border-radius: 50%;
  background: rgba(84, 61, 101, .06);
  filter: blur(14px);
}
.product-card-v9 .product-image-link {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px 24px 16px;
}
.product-card-v9 .product-image-link img {
  width: auto;
  height: auto;
  max-width: 84%;
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 13px rgba(54, 40, 66, .10));
  transform: none;
}
.product-card-v9:hover .product-image-link img {
  transform: translateY(-3px) scale(1.02);
}
.product-card-v9 .product-rank {
  top: 12px;
  left: 12px;
  width: 31px;
  height: 31px;
  font-size: 9px;
}
.product-card-v9 .product-rank small {
  font-size: 5px;
}
.product-card-v9 .product-trend-badge {
  top: 12px;
  right: 45px;
  min-height: 27px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  font-size: 8px;
}
.product-card-v9 .favorite-button {
  top: 10px;
  right: 10px;
  width: 29px;
  height: 29px;
}
.product-card-v9 .favorite-button svg {
  width: 14px;
  height: 14px;
}
.product-card-v9 .product-card-body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 15px 16px 16px;
}
.product-card-v9 .product-card-meta {
  min-height: 16px;
}
.product-card-v9 .product-card-meta > span {
  max-width: 70%;
  color: #8b73c2;
  font-size: 8.5px;
}
.product-card-v9 .product-card-meta small {
  color: #a097a4;
  font-size: 7.5px;
}
.product-card-v9 h3 {
  min-height: 42px;
  margin: 5px 0 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.product-card-v9 .product-price {
  min-height: 17px;
  margin-top: 3px;
  color: #9a919d;
  font-size: 8px;
}
.product-quick-stats {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(76, 55, 90, .07);
  border-radius: 13px;
  background: #faf8fc;
}
.product-quick-stats > span {
  min-width: 0;
  padding: 9px 5px 8px;
  text-align: center;
}
.product-quick-stats > span + span {
  border-left: 1px solid rgba(76, 55, 90, .07);
}
.product-quick-stats small {
  display: block;
  overflow: hidden;
  color: #9a909e;
  font-size: 6.5px;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-quick-stats b {
  display: block;
  margin-top: 3px;
  color: #2e2733;
  font-size: 12px;
  line-height: 1.1;
}
.product-quick-stats b em {
  margin-left: 1px;
  color: #817783;
  font-size: 6px;
  font-style: normal;
}
.product-quick-stats .is-trend b {
  color: #f14f81;
}
.product-card-v9 .product-data-pending {
  min-height: 48px;
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #faf8fc;
  color: #918795;
  font-size: 8px;
}
.product-card-v9 .product-tags {
  min-height: 26px;
  margin-top: 9px;
  gap: 5px;
}
.product-card-v9 .product-tags span {
  padding: 5px 7px;
  color: #7b6887;
  background: #f5f1fb;
  font-size: 7px;
}
.product-card-v9 .product-reason {
  min-height: 0;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #817783;
  font-size: 8px;
  line-height: 1.55;
  -webkit-line-clamp: 1;
}
.product-card-v9 .product-commerce-links {
  margin-top: auto;
  padding-top: 12px;
  gap: 7px;
}
.product-card-v9 .affiliate-label {
  margin: 0 0 -3px 2px;
  font-size: 7px;
}
.product-card-v9 .product-amazon-button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #211a26;
  font-size: 10px;
  box-shadow: 0 10px 20px rgba(41, 29, 49, .13);
}
.product-card-v9 .product-amazon-button:hover {
  color: #fff;
  background: linear-gradient(105deg, #f65d8d, #9171ee 72%, #6caaf9);
}
.product-card-v9 .product-official-link {
  font-size: 8px;
}

/* --------------------------------------------------------------------------
 * Secondary sections: reduce unnecessary vertical length.
 * ----------------------------------------------------------------------- */
.category-section {
  padding-top: 54px;
  padding-bottom: 58px;
}
.category-list {
  gap: 10px;
}
.category-link {
  min-height: 96px;
  padding: 14px;
}
.social-section {
  padding-top: 76px;
  padding-bottom: 76px;
}
.social-grid {
  gap: 16px;
}
.social-voice-card {
  border-radius: 20px;
  box-shadow: 0 15px 38px rgba(70, 49, 91, .065);
}
.voice-product-image {
  width: 52px;
  height: 52px;
}
.voice-product-image img {
  max-width: 88%;
  max-height: 88%;
}
.insight-section,
.data-guide-section {
  padding-top: 78px;
  padding-bottom: 78px;
}

/* --------------------------------------------------------------------------
 * Tablet and mobile.
 * ----------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .product-card-v9 .product-image-wrap {
    height: 178px;
    min-height: 178px;
  }
  .product-card-v9 .product-image-link img {
    max-height: 140px;
  }
}

@media (max-width: 760px) {
  .ranking-section {
    padding-top: 48px;
    padding-bottom: 58px;
  }
  .ranking-section .section-heading {
    gap: 18px;
    margin-bottom: 22px;
  }
  .ranking-section .segmented-tabs {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ranking-section .segmented-tabs::-webkit-scrollbar { display: none; }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product-card-v9 {
    border-radius: 17px;
    box-shadow: 0 10px 25px rgba(68, 47, 88, .065);
  }
  .product-card-v9 .product-image-wrap {
    height: 142px;
    min-height: 142px;
  }
  .product-card-v9 .product-image-link {
    padding: 13px 13px 11px;
  }
  .product-card-v9 .product-image-link img {
    max-width: 86%;
    max-height: 112px;
  }
  .product-card-v9 .product-rank {
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    font-size: 7px;
  }
  .product-card-v9 .product-trend-badge {
    top: 8px;
    right: 36px;
    min-height: 23px;
    padding: 0 7px;
    font-size: 7px;
  }
  .product-card-v9 .favorite-button {
    top: 7px;
    right: 7px;
    width: 25px;
    height: 25px;
  }
  .product-card-v9 .product-card-body {
    padding: 11px 10px 12px;
  }
  .product-card-v9 .product-card-meta > span {
    font-size: 7px;
  }
  .product-card-v9 .product-card-meta small {
    display: none;
  }
  .product-card-v9 h3 {
    min-height: 38px;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.55;
  }
  .product-card-v9 .product-price {
    min-height: 14px;
    font-size: 6.8px;
  }
  .product-quick-stats {
    margin-top: 8px;
    border-radius: 10px;
  }
  .product-quick-stats > span {
    padding: 7px 2px 6px;
  }
  .product-quick-stats small {
    font-size: 5.2px;
  }
  .product-quick-stats b {
    font-size: 9.5px;
  }
  .product-quick-stats b em {
    font-size: 5px;
  }
  .product-card-v9 .product-tags {
    min-height: 22px;
    margin-top: 7px;
    gap: 4px;
  }
  .product-card-v9 .product-tags span {
    padding: 4px 5px;
    font-size: 5.8px;
  }
  .product-card-v9 .product-reason {
    display: none;
  }
  .product-card-v9 .product-commerce-links {
    padding-top: 9px;
    gap: 5px;
  }
  .product-card-v9 .affiliate-label {
    font-size: 6px;
  }
  .product-card-v9 .product-amazon-button {
    min-height: 36px;
    border-radius: 10px;
    font-size: 8px;
  }
  .product-card-v9 .product-amazon-button svg {
    width: 11px;
    height: 11px;
  }
  .product-card-v9 .product-official-link {
    font-size: 7px;
  }

  .category-section {
    padding-top: 42px;
    padding-bottom: 44px;
  }
  .category-list {
    width: calc(100% + 15px);
    margin-right: -15px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(126px, 39vw);
    grid-template-columns: none;
    gap: 9px;
    overflow-x: auto;
    padding: 1px 15px 12px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .category-list::-webkit-scrollbar { display: none; }
  .category-link {
    min-height: 91px;
    scroll-snap-align: start;
  }
  .social-section,
  .insight-section,
  .data-guide-section {
    padding-top: 58px;
    padding-bottom: 58px;
  }
  .social-grid {
    gap: 11px;
  }
}

@media (max-width: 390px) {
  .product-card-v9 .product-image-wrap {
    height: 132px;
    min-height: 132px;
  }
  .product-card-v9 .product-image-link img {
    max-height: 104px;
  }
  .product-card-v9 h3 {
    font-size: 10.5px;
  }
  .product-quick-stats b {
    font-size: 9px;
  }
}

/* Primary commerce action follows the MIGNO visual system while staying clear. */
.product-card-v6 .product-amazon-button,
.product-detail .amazon-button,
.detail-amazon-button {
  border-color: #211a25 !important;
  background: #211a25 !important;
  color: #fff !important;
}
.product-card-v6 .product-amazon-button:hover,
.product-detail .amazon-button:hover,
.detail-amazon-button:hover {
  border-color: #7f62df !important;
  background: linear-gradient(105deg, #ff5f91, #8d70ef 72%, #6fa9ff) !important;
  color: #fff !important;
}
.hero-title-mobile-block {
  display: inline;
}
@media (max-width: 760px) {
  .hero-title-mobile-block {
    display: block;
  }
}
