
/* ======================================================================
   01. 基本レイアウト / 背景
====================================================================== */
.sale-section {
  background-image: url('work_images/sale/.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  padding: 20px;
}

.products-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
}


/* ======================================================================
   02. HERO エリア（コピー・カウントダウン・バナー・CTA）
====================================================================== */

/* ラッパー */
.sale-hero-wrapper {
  background: linear-gradient(180deg, #fff5f5, #ffffff);
  padding: 40px 0 16px;
}

/* 中央寄せ */
.sale-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.hero-subtitle {
  font-size: 24px;
  line-height: 1.45;
  color: #333;
  margin-bottom: 10px;
}
.hero-sub {
  font-size: 20px;
  line-height: 1.5;
}

/* カウントダウン */
.hero-countdown {
  margin: 20px auto;
}
.countdown-container {
  background: #d32f2f;
  color: #fff;
  padding: 20px 20px;
  text-align: center;
  border-radius: 6px; /* 任意：柔らかくしたい場合 */
}
.countdown {
  font-size: 52px;
  font-weight: bold;
  line-height: 1.2;
}
.small {
  font-size: 22px;
}

/* バナー */
.hero-banner img,
.sale-banner img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  box-shadow: 3px 3px 5px #eee;
}
.sale-banner {
  margin-bottom: 10px;
}

/* CTA */
.hero-btn {
  display: inline-block;
  background: #192f60;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  padding: 18px 40px;
  border-radius: 8px;
  text-decoration: none;
}
.hero-btn:hover {
  background: #132347;
}
.cta-note {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
}

/* HERO直下の余白制御 */
.sale-hero-wrapper + #sale-cards .products-container {
  margin-top: 0;
}


/* ======================================================================
   03. カテゴリ見出し / ブロック
====================================================================== */
.sale-category {
  margin-bottom: 30px;
}
.sale-category h2 {
  max-width: 1200px;
  font-size: 23px;
  line-height: 1.4;
  color: #333;
  border-bottom: 2px solid #d32f2f;
  padding-top: 20px;
  padding-bottom: 5px;
}
.sale-category h2,
.sale-category .products {
  margin-left: auto;
  margin-right: auto;
}


/* ======================================================================
   04. 商品カード（※フォント含め完全未変更）
====================================================================== */
.products {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.item {
  width: 280px;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.item img { width: 100%; border-radius: 5px; }
.item p { font-size: 14px; margin: 10px 0; }
.item .title {
  font-size: 16px;
  font-weight: bold;
  min-height: 50px;
  border-bottom: 1px dotted #999;
}
.item .specs { flex-grow: 1; min-height: 100px; }
.item .specs p {
  line-height: 1.4;
  border-bottom: 1px dotted #999;
}
.item .bottom { min-height: 10px; }
.item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: .2s ease;
}


/* ======================================================================
   05. 価格表示
====================================================================== */
.original-price {
  font-size: 14px;
  text-decoration: line-through;
  color: #888;
}
.price {
  font-weight: bold;
  color: red;
  font-style: italic;
}
.off-price {
  font-style: normal;
  font-size: 16px;
}
.sale-price {
  font-size: 22px;
  font-style: italic;
}
.price .discount {
  margin-left: auto;
  font-size: 13px;
  color: #666;
  margin-left: 6px;
  white-space: nowrap; 
}

/* ======================================================================
   06. カテゴリ一覧ボタン
====================================================================== */
.other-products-button {
  text-align: center;
  margin: 20px 0;
}
.other-products-link {
  display: inline-block;
  font-size: 20px;
  padding: 12px 28px;
  background-color: #192f60;
  color: #fff;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
}
.other-products-link:hover {
  background-color: #132347;
}


/* ======================================================================
   07. ランク説明
====================================================================== */
.rank-card {
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.rank-card p { line-height: 1.3; margin: 5px 0; }
.rank-title { font-size: 20px; font-weight: bold; }
.rank-note  { font-size: 14px; color: #666; }

.new       { background: #A0E0EA; }
.beautiful { background: #B6F6E6; }
.special   { background: #FFF4B4; }
.standard  { background: #FEE8EB; }
.defective { background: #DFDFDF; }


/* ======================================================================
   08. その他特集バナー
====================================================================== */
.other-specials-container {
  padding: 20px;
  text-align: center;
}
.special-banners {
  display: flex;
  gap: 15px;
  justify-content: center;
}
.special-banners img {
  width: auto;
  max-height: 500px;
}


/* ======================================================================
   09. お気に入り・補足
====================================================================== */
.wrapper {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding: 20px;
  color: white;
  text-align: center;
}
.wrapper h2 {
  font-size: 24px;
  color: #FF0000;
}
.favorite .sub-title {
  font-size: 2.2em;
  color: #222 !important;
}
.favorite p {
  font-size: 1.7em;
  color: #222 !important;
}

/* セール期限 表示（控えめ） */
.sale-deadline-note {
  text-align: center;
  font-size: 22px;
  color: #666;
  margin: 20px 0 8px;
}

.sale-deadline-note span {
  font-size: 26px;
  font-weight: bold;
  color: #444;
}
.sale-deadline-note #sale-remaining {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

/* ======================================================================
   10. ページトップ
====================================================================== */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #5D99FF;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  line-height: 50px;
  font-size: 16px;
}

/* ======================================================================
   11. SP（600px以下）
====================================================================== */
@media (max-width: 600px) {

  /* HERO 微調整 */
  .sale-hero-wrapper {
    padding: 28px 0 12px;
    margin-top: 150px;
  }

  .hero-sub { font-size: 14px; }

  .countdown-container { padding: 14px 16px; }
  .countdown { font-size: 30px; }
  .small { font-size: 16px; }

  .sale-category h2 { font-size: 19px; }

  .price .sale-price { font-size: 20px !important; }

  /* カテゴリ一覧ボタン */
  .other-products-link {
    font-size: 15px;
    padding: 10px 16px;
  }

  /* ✅ スマホでは pick-controls を表示 */
  .pick-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
  }

  .pick-controls button {
    width: 32px;
    height: 32px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border: 1px solid #bbb;
    border-radius: 4px;

    font-size: 14px;
    font-weight: bold;
    color: #000;

    cursor: pointer;
    line-height: 1;
  }
  
  /* ======================================================
     ▶◀ 非活性状態（法人向けと同等）
  ====================================================== */
  .pick-controls button.disabled,
  .pick-controls button:disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
  }
}


/* ======================================================================
   12. SP / タブレット（768px以下）カルーセル
====================================================================== */
@media (max-width: 768px) {

  #sale-cards .products {
    display: block !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px !important;
    scroll-snap-type: x mandatory;
  }

  #sale-cards .products .item {
    display: inline-block !important;
    width: calc(100% / 1.4) !important;
    margin-right: 12px;
    white-space: normal !important;
    scroll-snap-align: start;
  }

  #sale-cards .products::-webkit-scrollbar,
  .special-banners::-webkit-scrollbar {
    display: none;
  }
}


/* ======================================================================
   13. PC（769px以上）では pick-controls を非表示
====================================================================== */
@media (min-width: 769px) {
  .pick-controls {
    display: none;
  }
}
