@charset "UTF-8";

.main img {
  vertical-align: bottom;
}

/* メイン */
.gw_main {
  position: relative;
  z-index: 1;
}

/* デザイン（幅768px）の 1px。画面幅に合わせて縮み、768px 以上では 1px */
.main {
  --u: min(calc(100vw / 768), 1px);
}

/* キャンペーン内容 */
.gw_campaign {
  position: relative;
  z-index: 2;
}
/* 通常・在庫わずか：上部の透明部分をメイン画像に重ねる */
.gw_campaign_img {
}
/* 在庫なし・期間終了：メイン画像の下に置くだけ（画像は幅766px なので左右を同じ色で埋める） */
.gw_campaign_end {
  background: #e1e5e7;
  line-height: 0;
  text-align: center;
}

/* キャンペーン状況による切り替え（判定用リンクは冒頭の .i_none 内）
   優先順：期間終了 > 在庫なし > 在庫わずか > 通常 */
.main .few_elm,
.main .none_elm,
.main .after_elm {
  display: none;
}
.main:has(.is_few[href*="giftwrap2612"]) .campaign_elm {
  display: none;
}
.main:has(.is_few[href*="giftwrap2612"]) .few_elm {
  display: block;
}
.main:has(.is_none[href*="giftwrap2612"]) .campaign_elm,
.main:has(.is_none[href*="giftwrap2612"]) .few_elm {
  display: none;
}
.main:has(.is_none[href*="giftwrap2612"]) .none_elm {
  display: block;
}
.main:has(.is_after[href*="giftwrap2612"]) .campaign_elm,
.main:has(.is_after[href*="giftwrap2612"]) .few_elm,
.main:has(.is_after[href*="giftwrap2612"]) .none_elm {
  display: none;
}
.main:has(.is_after[href*="giftwrap2612"]) .after_elm {
  display: block;
}

/* おすすめギフト：デザインの座標どおりに absolute で配置 */
.gw_gift {
  position: relative;
  z-index: 5; /* バナー上部の靄より手前に出す */
  height: calc(3056 * var(--u));
  overflow: hidden;
  background: #223a65 url(../img/bg_gift.png) left top / calc(768 * var(--u)) auto no-repeat;
  color: #fff;
}
.gw_line {
  position: absolute;
  left: 0;
  z-index: 3;
  line-height: 0;
}
.gw_line.is_top {
  top: 0;
}
.gw_line.is_bottom {
  top: calc(3045 * var(--u));
}
.gw_gift_ttl {
  position: absolute;
  top: calc(70 * var(--u));
  left: 0;
  width: 100%;
  font-size: calc(28 * var(--u));
  font-weight: bold;
  line-height: calc(47 * var(--u));
  text-align: center;
  white-space: nowrap;
}
.gw_pos {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  line-height: 0;
}
.gw_gift_text {
  color: #fff;
  font-size: calc(20 * var(--u));
  line-height: calc(36.5 * var(--u));
  white-space: nowrap;
  text-decoration: none;
}
a.gw_gift_text:hover {
  color: #fff;
  text-decoration: none;
}
a.gw_pos:hover {
  opacity: 0.8;
}

/* ギフトバナー（上の透明部分 75px をギフト欄の下に潜らせる。はみ出す靄は隠れてよい） */
.gw_bnr {
  position: relative;
  z-index: 1;
  margin-top: calc(-75 * var(--u));
  line-height: 0;
}
.gw_bnr a:hover {
  opacity: 0.8;
}
