﻿@charset "UTF-8";

/* ==================================================
   商品購入エリア
================================================== */

.c25-item.has-purchase {
  position: relative;
}


/* ------------------------------
   購入エリア全体
------------------------------ */

.purchase-options {
  width: 82%;
  max-width: 190px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  position: relative;
  z-index: 5;
}


/* ------------------------------
   単品・定期それぞれ
------------------------------ */

.purchase-option {
  width: 100%;
}

.purchase-option + .purchase-option {
  margin-top: 16px;
}


/* ------------------------------
   配送周期
------------------------------ */

.purchase-cycle {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: #111;
  white-space: nowrap;
}


/* ------------------------------
   価格
------------------------------ */

.purchase-price {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #111;
  white-space: nowrap;
}


/* ------------------------------
   購入ボタン
------------------------------ */

.c25-item .purchase-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 39px;
  margin: 0;
  padding: 0 10px;
  background: #000;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  box-sizing: border-box;
}

.c25-item .purchase-btn:hover {
  opacity: 0.8;
  color: #fff;
  text-decoration: none;
}


/* ==================================================
   カートアイコン（SVG）
================================================== */

.purchase-cart {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ==================================================
   PC
   purchase-options を通常フローに置き、
   ボタン数に応じてカード高を自動拡張
================================================== */

@media screen and (min-width: 790px) {

  .c25-item.has-purchase {
    aspect-ratio: auto;
    min-height: clamp(540px, calc(40vw + 220px), 700px);
    padding-top: clamp(370px, 39vw, 475px);
    padding-bottom: 28px;
  }

  /* 商品画像・商品名は従来位置を維持 */
  .c25-item.has-purchase > img {
    top: clamp(45px, 6vw, 70px);
    bottom: auto;
  }

  .c25-item.has-purchase > p {
    top: clamp(200px, 24.8vw, 300px);
    height: 150px;
  }

  .c25-item.has-purchase > p > a {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    padding-top: 0;
  }

  /* 購入エリアはabsoluteにせず、内容量ぶん親カードを伸ばす */
  .c25-item.has-purchase .purchase-options {
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
  }

  /* 同じ行のカードはflexのstretchで一番高いカードに揃える */
  .c25-item.match-purchase-height {
    aspect-ratio: auto;
    min-height: clamp(540px, calc(40vw + 220px), 700px);
  }

  .c25-item.match-purchase-height > img {
    top: auto;
    bottom: calc(100% - clamp(160px, 20.8vw, 250px));
  }

  .c25-item.match-purchase-height > p {
    top: clamp(200px, 24.8vw, 300px);
  }
}


/* ==================================================
   SP
   purchase-options を通常フローに置き、
   ボタン数に応じてカード高を自動拡張
================================================== */

@media screen and (max-width: 789px) {

  .c25-item.has-purchase {
    aspect-ratio: auto;
    min-height: 500px;
    padding-top: 315px;
    padding-bottom: 24px;
  }

  .c25-item.has-purchase > img {
    top: 40px;
    bottom: auto;
  }

  .c25-item.has-purchase > p {
    top: 185px;
    height: 105px;
  }

  .c25-item.has-purchase > p > a {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    padding-top: 0;
  }

  .c25-item.has-purchase .purchase-options {
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    width: 88%;
    max-width: none;
  }

  .c25-item.match-purchase-height {
    aspect-ratio: auto;
    min-height: 500px;
  }

  .c25-item.match-purchase-height > img {
    top: auto;
    bottom: calc(100% - 145px);
  }

  .c25-item.match-purchase-height > p {
    top: 185px;
  }

  .purchase-option + .purchase-option {
    margin-top: 12px;
  }

  .purchase-cycle {
    font-size: 12px;
  }

  .purchase-price {
    font-size: 11px;
  }

  .c25-item .purchase-btn {
    height: 34px;
    gap: 5px;
    padding: 0 5px;
    font-size: 11px;
  }
}

/* ==================================================
   リフティ位置調整
================================================== */

@media screen and (min-width: 790px) {
  .c25-item.is-lifty > img {
    top: clamp(65px, 7.5vw, 90px);
  }

}
