@import url('https://brandavenue.r10s.jp/css/contents/common/components/20260507/tokens.css');

/* ============================================================
   Product Item 専用デザイントークン
   ⚠️  このトークンは Product Item コンポーネント専用です。
       他のコンポーネントやページでの使用は禁止してください。
============================================================ */

/* ── Neutral ── */
:root {
  --pi-color-black:        #1A1A1A;
  --pi-color-white:        #FFFFFF;
  --pi-color-main-text:    #393E44;
  --pi-color-main-text-2:  rgba(57, 62, 68, 0.90);
  --pi-color-main-text-3:  rgba(57, 62, 68, 0.50);
  --pi-color-main-text-4:  rgba(57, 62, 68, 0.30);
  --pi-color-sub-text:     #555E66;
  --pi-color-sub-text-2:   #69767B;
  --pi-color-sub-text-3:   #A0ACB2;
  --pi-color-sub-text-4:   #D2D3D5;
  --pi-color-background:   #ECEEEF;
  --pi-color-background-2: #F7F7F9;
  --pi-color-background-3: rgba(247, 247, 249, 0.70);

  /* ── RankBadge ── */
  --pi-color-gold-light:   #DBAF00;
  --pi-color-gold-dark:    #B89300;
  --pi-color-silver-light: #9C9C9C;
  --pi-color-silver-dark:  #686868;
  --pi-color-bronze-light: #995E00;
  --pi-color-bronze-dark:  #7B4B00;
}

/* ============================================================
   product-item__rank-badge
   ランキングバッジ
============================================================ */

.product-item__rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: var(--font-family-primary);
  font-size: 11px;
  font-style: normal;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: var(--pi-color-white);
  flex-shrink: 0;
}

.product-item__rank-badge--gold {
  background: linear-gradient(
    140deg,
    var(--pi-color-gold-dark)  50%,
    var(--pi-color-gold-light) 50%
  );
}

.product-item__rank-badge--silver {
  background: linear-gradient(
    140deg,
    var(--pi-color-silver-dark)  50%,
    var(--pi-color-silver-light) 50%
  );
}

.product-item__rank-badge--bronze {
  background: linear-gradient(
    140deg,
    var(--pi-color-bronze-dark)  50%,
    var(--pi-color-bronze-light) 50%
  );
}

.product-item__rank-badge--normal {
  background: var(--pi-color-white);
  color: var(--pi-color-main-text);
}

/* ============================================================
   ranking-product-item
============================================================ */

.ranking-product-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.ranking-product-item__thumbnail {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--pi-color-background);
}

.ranking-product-item--small .ranking-product-item__thumbnail {
  aspect-ratio: 1 / 1;
}

.ranking-product-item--large .ranking-product-item__thumbnail {
  aspect-ratio: 3 / 4;
}

.ranking-product-item__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.ranking-product-item__badge {
  position: absolute;
  top: 4px;
  left: 4px;
}

.ranking-product-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ranking-product-item__brand {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: 11px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-main-text);
}

.ranking-product-item--small .ranking-product-item__brand {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-product-item__price {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--pi-color-main-text);
}

.ranking-product-item__price:has(+ .ranking-product-item__discount) {
  color: var(--color-brand-pink);
}

.ranking-product-item__price-number {
  font-family: var(--font-family-secondary);
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: inherit;
}

.ranking-product-item__price-unit {
  font-family: var(--font-family-primary);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: inherit;
}

.ranking-product-item__discount {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--color-brand-pink);
}

.ranking-product-item__discount-number {
  font-family: var(--font-family-secondary);
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  line-height: 120%;
  color: inherit;
}

.ranking-product-item__discount-suffix {
  font-family: var(--font-family-primary);
  font-size: 11px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: inherit;
}

.ranking-product-item__normal-price {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: 11px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text);
  text-decoration: line-through;
}

.ranking-product-item__price:has(+ .ranking-product-item__discount) {
  color: var(--color-brand-pink);
}

.ranking-product-item--show-normal-price .ranking-product-item__price {
  color: var(--pi-color-main-text);
}

.ranking-product-item--show-normal-price .ranking-product-item__discount {
  display: none;
}

.ranking-product-item__price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ranking-product-item__info {
  margin-top: 4px;
}

.ranking-product-item--small .ranking-product-item__thumbnail {
  aspect-ratio: 5 / 6;
}

.ranking-product-item--large .ranking-product-item__thumbnail {
  aspect-ratio: 3 / 4;
}

.ranking-product-item__info {
  padding: 8px 0 16px 0;
  gap: 4px;
  margin-top: 0;
  background: var(--pi-color-white);
}

.ranking-product-item__brand {
  font-size: 12px;
  color: var(--pi-color-sub-text-2);
}

.ranking-product-item__price-number    { font-size: 15px; }
.ranking-product-item__price-unit      { font-size: 10px; }
.ranking-product-item__discount-number { font-size: 12px; }
.ranking-product-item__discount-suffix { font-size: 11px; }
.ranking-product-item__normal-price    { font-size: 12px; }

.ranking-product-item {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.ranking-product-item:hover {
  opacity: 0.7;
}

.ranking-product-item:hover .ranking-product-item__image {
  transform: scale(1.03);
}
.ranking-product-item__image {
  transition: transform 0.2s ease;
}

/* ============================================================
   basic-product-item
============================================================ */

.basic-product-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.basic-product-item:hover {
  opacity: 0.7;
}

.basic-product-item__image-area {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--pi-color-background);
  aspect-ratio: 5 / 6;
}

.basic-product-item__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.2s ease;
}

.basic-product-item:hover .basic-product-item__image {
  transform: scale(1.03);
}

.basic-product-item__coupon-label {
  position: absolute;
  bottom: 0;
  left: 0;
}

.basic-product-item__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0px 16px;
  background: var(--pi-color-white);
}

.basic-product-item__brand {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.basic-product-item__price-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.basic-product-item__price-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.basic-product-item__price {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--pi-color-main-text);
}

.basic-product-item__price:has(+ .basic-product-item__discount) {
  color: var(--color-brand-pink);
}

.basic-product-item__price-number {
  font-family: var(--font-family-secondary);
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: inherit;
}

.basic-product-item__price-unit {
  font-family: var(--font-family-primary);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: inherit;
}

.basic-product-item__discount {
  display: flex;
  align-items: center;
  margin: 0;
}

.basic-product-item__discount-number {
  font-family: var(--font-family-secondary);
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  line-height: 120%;
  color: var(--color-brand-pink);
}

.basic-product-item__discount-suffix {
  font-family: var(--font-family-primary);
  font-size: 11px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--color-brand-pink);
}

.basic-product-item__normal-price {
  display: flex;
  align-items: center;
  margin: 0;
}

.basic-product-item__normal-price-number {
  font-family: var(--font-family-secondary);
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text);
  text-decoration: line-through;
}

.basic-product-item__normal-price-unit {
  font-family: var(--font-family-primary);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text);
  text-decoration: line-through;
}

.basic-product-item--show-normal-price .basic-product-item__price-number,
.basic-product-item--show-normal-price .basic-product-item__price-unit {
  color: var(--pi-color-main-text);
}

.basic-product-item--show-normal-price .basic-product-item__discount {
  display: none;
}

/* ============================================================
   medama-product-item
============================================================ */

.medama-product-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.medama-product-item:hover {
  opacity: 0.7;
}

.medama-product-item__image-area {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--pi-color-background);
  aspect-ratio: 5 / 6;
}

.medama-product-item__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.2s ease;
}

.medama-product-item:hover .medama-product-item__image {
  transform: scale(1.03);
}

.medama-product-item__discount-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.medama-product-item__coupon-label {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 16px;
  padding: 2px 4px;
  background: var(--pi-color-background-3);
  backdrop-filter: blur(2px);
  font-family: var(--font-family-primary);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-main-text);
}

.medama-product-item__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-4, 4px);
  align-self: stretch;
  background: var(--pi-color-white);
}

.medama-product-item__info {
  padding: var(--spacing-4, 4px) 0 var(--spacing-16, 16px) 0;
}

.medama-product-item__brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.medama-product-item__brand {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
}

.medama-product-item__category {
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: 13px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
}

.medama-product-item__price-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.medama-product-item__price {
  display: flex;
  align-items: center;
  margin: 0;
}

.medama-product-item__price-number {
  font-family: var(--font-family-secondary);
  font-size: 16px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-main-text); /* デフォルト（非セール）は黒 */
}

.medama-product-item__price-unit {
  font-family: var(--font-family-primary);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-main-text); /* デフォルト（非セール）は黒 */
}

/* セール時（割引バッジあり）のみピンク */
.medama-product-item:has(.medama-product-item__discount-badge) .medama-product-item__price-number,
.medama-product-item:has(.medama-product-item__discount-badge) .medama-product-item__price-unit {
  color: var(--color-brand-pink);
}

/* ============================================================
   slick-arrow
============================================================ */

.slick-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.slick-arrow:hover {
  opacity: 0.8;
}

.slick-arrow:disabled,
.slick-arrow.slick-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.slick-arrow img {
  display: block;
  width: 28px;
  height: 73px;
  object-fit: contain;
}

/* ============================================================
   discount-label
============================================================ */

.discount-label {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--spacing-8, 8px);
  background: var(--color-brand-pink);
  white-space: nowrap;
}

.discount-label__number {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-white);
}

.discount-label__suffix {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-white);
}

.discount-label--medium .discount-label__number {
  font-size: 11px;
}

.discount-label--medium .discount-label__suffix {
  font-size: 11px;
}

.discount-label--large .discount-label__number {
  font-size: 14px;
}

.discount-label--large .discount-label__suffix {
  font-size: 14px;
}

/* ============================================================
   coupon-label
============================================================ */

.coupon-label {
  display: inline-flex;
  align-items: center;
  background: var(--pi-color-background-3);
  backdrop-filter: blur(2px);
  font-family: var(--font-family-primary);
  font-style: normal;
  font-weight: var(--font-weight-regular);
  color: var(--pi-color-main-text);
  white-space: nowrap;
}

.coupon-label--medium {
  height: 16px;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 150%;
}

.coupon-label--large {
  height: 20px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 150%;
}

/* ============================================================
   product-label
============================================================ */

.product-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid var(--pi-color-sub-text-4);
  background: var(--pi-color-white);
  backdrop-filter: blur(2px);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-regular);
  line-height: 150%;
  color: var(--pi-color-sub-text-2);
  white-space: nowrap;
}

.product-label--small {
  height: 14px;
  padding: 1px 4px;
  font-size: 9px;
}

.product-label--medium {
  height: 16px;
  padding: 2px 4px;
  font-size: 10px;
}

/* ============================================================
   商品リストモジュール PC レイアウト
   apiProductList 各テンプレート用スタイル
============================================================ */

.apiProductList + .apiProductList {
  margin-top: 20px;
}

.apiProductList,
.apiProductList * {
  box-sizing: border-box;
}

.apiProductList .tmp_more {
  margin-top: 32px;
  text-align: center;
}

.apiProductList .tmp_empty {
  text-align: center;
  padding: 40px 0;
  color: var(--pi-color-sub-text-2, #69767B);
}

/* sale_lp */
.apiProductList.sale_lp {
  width: 100%;
}

.apiProductList.sale_lp .tmp_list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.apiProductList.sale_lp .tmp_item {
  flex: 0 0 calc((100% - 4 * 16px) / 5);
  width: calc((100% - 4 * 16px) / 5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.apiProductList.sale_lp .tmp_item-link {
  text-decoration: none;
  display: block;
  width: 100%;
}

/* sale_lp_dynamite */
.apiProductList.sale_lp_dynamite {
  width: 100%;
}

.apiProductList.sale_lp_dynamite .tmp_list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.apiProductList.sale_lp_dynamite .tmp_item {
  flex: 0 0 calc((100% - 3 * 16px) / 4);
  width: calc((100% - 3 * 16px) / 4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.apiProductList.sale_lp_dynamite .tmp_item-link {
  text-decoration: none;
}

/* sale_lp_medama */
.apiProductList.sale_lp_medama {
  width: 100%;
}

.apiProductList.sale_lp_medama .tmp_list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.apiProductList.sale_lp_medama .tmp_item {
  flex: 0 0 calc((100% - 3 * 16px) / 4);
  width: calc((100% - 3 * 16px) / 4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.apiProductList.sale_lp_medama .tmp_item-link {
  text-decoration: none;
}

/* category_ranking */
.apiProductList.category_ranking {
  width: 100%;
}

.apiProductList.category_ranking .tmp_list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.apiProductList.category_ranking .tmp_item {
  flex: 0 0 calc((100% - 4 * 16px) / 5);
  width: calc((100% - 4 * 16px) / 5);
  min-width: 0;
}

.apiProductList.category_ranking .tmp_item-link {
  text-decoration: none;
  position: relative;
  display: block;
  width: 100%;
}

.apiProductList.category_ranking .tmp_rank-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background-color: #fff;
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
}

.apiProductList.category_ranking .tmp_rank-icon.rank_1 {
  background: linear-gradient(140deg, #B89300 50%, #DBAF00 50%);
}

.apiProductList.category_ranking .tmp_rank-icon.rank_2 {
  background: linear-gradient(140deg, #686868 50%, #9C9C9C 50%);
}

.apiProductList.category_ranking .tmp_rank-icon.rank_3 {
  background: linear-gradient(140deg, #7B4B00 50%, #995E00 50%);
}

.apiProductList.category_ranking .tmp_rank-icon:not(.rank_1):not(.rank_2):not(.rank_3) {
  background-color: #fff;
  color: #393E44;
}

/* category_ranking_pc_carousel */
.apiProductList.category_ranking.category_ranking_pc_carousel {
  position: relative;
  overflow: hidden;
}

.apiProductList.category_ranking.category_ranking_pc_carousel .tmp_list {
  flex-wrap: nowrap;
  gap: 0;
}

.apiProductList.category_ranking.category_ranking_pc_carousel .tmp_item {
  flex: none;
  width: calc((100% - 4 * 16px) / 5); /* sale_lp と同様に Swiper 前から幅を確定 */
}

/* sale_lp_pc_carousel */
.apiProductList.sale_lp.sale_lp_pc_carousel {
  position: relative;
  overflow: hidden;
}

/* sale_lp の gap / flex をリセット */
.apiProductList.sale_lp.sale_lp_pc_carousel .tmp_list {
  flex-wrap: nowrap;
  gap: 0;
}

.apiProductList.sale_lp.sale_lp_pc_carousel .tmp_item {
  flex: none;
}

/* ─── PC カルーセル共通：矢印ラッパー ─────────────────────
   JS で .apiProductList を囲む div.pc-carousel-wrapper を生成し
   矢印はそのラッパー直下に配置する。これにより
   ・スライドは apiProductList の overflow:hidden でクリップ
   ・矢印はラッパーの外（-20px）に表示可能
──────────────────────────────────────────────────── */
.pc-carousel-wrapper {
  position: relative;
}

.pc-carousel-wrapper .swiper-button-prev,
.pc-carousel-wrapper .swiper-button-next {
  position: absolute;
  width: 28px;
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  background: none;
  border: none;
}

/* top は JS（tmp_list.offsetHeight 基準）でインライン設定するため CSS では left/right のみ指定 */
.pc-carousel-wrapper .swiper-button-prev { left: -20px; }
.pc-carousel-wrapper .swiper-button-next { right: -20px; }

.pc-carousel-wrapper .swiper-button-disabled {
  display: none;
}
