/* AIR BASE 特価 OFF 共通スタイル */
:root {
  --ab-sale-red: #d92d20;
  --ab-sale-red-dark: #a9150d;
  --ab-sale-soft: #fff2f0;
  --ab-sale-border: #ffc7c2;
  --ab-sale-yellow: #ffd84d;
  --ab-sale-gold: #d6a620;
  --ab-price-text: #b42318;
  --ab-muted: #667085;
}

.ab-sale-off {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  padding: 6px 9px;
  border-radius: 6px;
  color: #fff;
  background: var(--ab-sale-red);
  box-shadow: 0 2px 6px rgba(169, 21, 13, .18);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  width: auto;
  height: auto;
  max-height: none;
  align-self: flex-start;
  box-sizing: border-box;
}

.ab-sale-off strong {
  font-size: 1.08em;
}

.ab-sale-off small {
  font-size: .72em;
  letter-spacing: .02em;
}

.ab-sale-off__prefix {
  font-size: .68em;
  font-weight: 700;
  margin-right: 1px;
}

.ab-sale--strong .ab-sale-off,
.ab-sale-off.ab-sale--strong {
  background: var(--ab-sale-red-dark);
}

.ab-sale--mega .ab-sale-off,
.ab-sale-off.ab-sale--mega {
  color: #fff;
  background: var(--ab-sale-red-dark);
  border: 2px solid var(--ab-sale-gold);
}

.ab-sale-hint,
.ab-sale-box__hint {
  margin: 0 0 6px;
  color: var(--ab-sale-red-dark);
  font-size: 12px;
  font-weight: 700;
}

.ab-sale-price__reference {
  margin: 0 0 3px;
  color: var(--ab-muted);
  font-size: 12px;
  line-height: 1.4;
}

.ab-sale-price__reference del {
  text-decoration-thickness: 1px;
}

.ab-sale-price__reference-label {
  margin-right: 4px;
}

.ab-sale-price__current {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 6px;
  margin: 0;
  color: var(--ab-price-text);
}

.ab-sale-price__label {
  width: 100%;
  color: var(--ab-sale-red-dark);
  font-size: 12px;
  font-weight: 700;
}

.ab-sale-price__current strong {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
}

.ab-sale-price--card .ab-sale-price__current strong {
  font-size: 20px;
}

.ab-sale-price--lp .ab-sale-price__current strong {
  font-size: 20px;
}

.ab-sale-box {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--ab-sale-border);
  border-radius: 10px;
  background: var(--ab-sale-soft);
}

.ab-sale-box__headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ab-sale-box__campaign {
  color: var(--ab-sale-red-dark);
  font-weight: 800;
}

.ab-sale-box__period {
  margin: 0 0 6px;
  color: var(--ab-sale-red-dark);
  font-size: 12px;
  font-weight: 700;
}

.ab-sale-reassurance {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.ab-sale-reassurance li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  color: #344054;
}

.ab-sale-reassurance li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ab-sale-red);
}

/* 一覧カード：OFF 左上 / 本体のみ・工事費込み 右上 */
.product-list-grid .item_photo {
  position: relative;
}

.product-list-grid .item_photo .ab-sale-off {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}

.product-list-grid .product-card-badge {
  left: auto;
  right: 10px;
  top: 10px;
}

.product-list-grid .ab-sale-price--card {
  margin-top: 4px;
}

.product-list-grid .item_price.ab-sale-hidden-dup {
  display: none;
}

/* ホーム / LP カード */
.home-product-card.ab-sale,
.home-product-card {
  position: relative;
}

.home-product-card__photo {
  position: relative;
}

.home-product-card__photo .ab-sale-off {
  position: absolute;
  top: 8px;
  right: auto;
  bottom: auto;
  left: 8px;
  z-index: 3;
  width: auto;
  height: auto;
  max-width: calc(100% - 96px);
}

/* 順位 / NEW バッジがある場合：OFF を写真左下へ（縦伸び防止） */
.home-product-card__rank ~ .home-product-card__photo .ab-sale-off,
.home-product-card__new ~ .home-product-card__photo .ab-sale-off {
  top: auto;
  right: auto;
  bottom: 8px;
  left: 8px;
  width: auto;
  height: auto;
}

.front_page .home-product-card__badge,
.home-product-card__badge {
  left: auto !important;
  right: 10px;
  bottom: auto !important;
  top: 10px;
}

/* NEW / 順位と共存時も右上に工事種別 */
.home-product-card__new ~ .home-product-card__photo .home-product-card__badge,
.home-product-card__rank ~ .home-product-card__photo .home-product-card__badge {
  top: 10px;
  right: 10px;
}

/* LP ランキング：OFF / タイプはタグ欄へ。写真上の旧配置は無効化 */
.lp_aircon_page .lp-rank-item .home-product-card__photo .ab-sale-off {
  display: none;
}

.lp_aircon_page .lp-rank-item .home-product-card__badge {
  display: none;
}

.lp_aircon_page .lp-rank-item .home-product-card__rank {
  display: none;
}

/* LP 首屏促销带 */
.lp-sale-strip {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ab-sale-soft);
  border: 1px solid var(--ab-sale-border);
}

.lp-sale-strip__title {
  margin: 0;
  color: var(--ab-sale-red-dark);
  font-weight: 800;
  font-size: 15px;
}

.lp-sale-strip__desc {
  margin: 4px 0 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.lp-sale-strip__max {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ab-sale-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.ab-sale-js-anchor {
  display: none !important;
}

@media (max-width: 767px) {
  .ab-sale-box {
    padding: 12px;
  }

  .product-list-grid .ab-sale-off,
  .home-product-card__photo .ab-sale-off {
    padding: 4px 6px;
    font-size: 10px;
  }

  .product-list-grid .ab-sale-price__reference,
  .home-product-card .ab-sale-price__reference {
    font-size: 10px;
  }

  .product-list-grid .ab-sale-price__current strong,
  .home-product-card .ab-sale-price__current strong {
    font-size: 20px;
  }

  .ab-sale--detail .ab-sale-price__current strong {
    font-size: clamp(30px, 8vw, 38px);
  }
}

@media (min-width: 768px) {
  .ab-sale--detail .ab-sale-price__current strong {
    font-size: clamp(32px, 3vw, 44px);
  }
}
