/* =========================================================
   FREAK'S STORE SET UP ITEM 特集ページ
   カラー変数 & 基本設定
   ========================================================= */
:root {
  --pink: #f5326b;
  --pink-dark: #d81c56;
  --green: #538b57;
  --green-dark: #325735;
  --red: #e60023;
  --ink: #1a1a1a;
  --gray: #6b6b6b;
  --line: #e5e5e5;
  --bg: #ffffff;
  --bg-soft: #eeeeee;
  --content-width: 1080px;
  --radius: 4px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.7;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================================
   キャンペーンバー
   ========================================================= */
.campaign-bar {
  background: var(--red);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 12px;
}

/* =========================================================
   ヘッダー
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.header-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f4f4;
  border-radius: 999px;
  padding: 8px 16px;
  max-width: 260px;
}

.header-search-icon {
  color: var(--gray);
  font-size: 16px;
}

.header-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13px;
  font-family: inherit;
}

.header-logo {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.header-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.header-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.header-icon {
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.header-menu {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* =========================================================
   ヒーロー
   ========================================================= */
.hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* =========================================================
   リード文
   ========================================================= */
.lead {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 20px 56px;
  text-align: center;
}

.lead p {
  margin: 0;
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
}

/* =========================================================
   商品ブロック
   ========================================================= */
.products {
  background: var(--bg-soft);
  padding: 40px 0;
}

.product {
  max-width: var(--content-width);
  margin: 0 auto 80px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch; /* 左右の高さを揃える */
}

.product:last-child {
  margin-bottom: 0;
}

/* 左：メイン画像（右カラム全体の高さに合わせる） */
.product-main {
  border-radius: var(--radius);
  overflow: hidden;
}

.product-main img {
  width: 100%;
  height: 100%;
  /* 左固定画像は 1230×1600 の縦長画像を縮小配置 */
  aspect-ratio: 1230 / 1600;
  object-fit: cover;
}

/* 右：カルーセル + 情報 */
.product-side {
  display: flex;
  flex-direction: column;
}

.product-info {
  padding-top: 20px;
}

.product-brand {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.product-title {
  margin: 6px 0 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.product-price {
  margin: 16px 0 0;
  font-size: 30px;
  font-weight: 800;
  color: var(--pink);
}

.product-price span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-left: 4px;
}

.product-check {
  display: block;
  margin-top: 18px;
  background: var(--pink);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 16px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.product-check:hover {
  background: var(--pink-dark);
}

/* =========================================================
   カルーセル
   （HTMLに並べた <img> をJSがスライド化します）
   ========================================================= */
.carousel {
  position: relative;
  flex: 1; /* 右カラムの余白を埋めて左画像と高さを揃える */
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ddd;
}

/* スライドを横に並べるトラック（JSが transform で移動） */
.carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 10px;
  height: 100%;
  width: auto;
  transition: transform 0.5s ease;
  will-change: transform;
}

/* 中央のスライド。左右に前後スライドが少し覗く幅にする */
.carousel-slide {
  position: relative;
  flex: 0 0 82%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* 前後（非アクティブ）のスライドは少し暗くする */
.carousel-slide:not(.is-active) {
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

/* 高さ確保用（JSが先頭画像を複製して敷く／1500×1800比率） */
.carousel-sizer {
  position: relative;
  visibility: hidden;
  width: 82%;
  height: auto;
  margin: 0 auto;
  aspect-ratio: 1500 / 1800;
}

/* 左右の半透明グレーボタン（覗いている前後画像の上に重なる） */
.carousel-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 13%;
  min-width: 44px;
  border: none;
  background: rgba(40, 40, 40, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.carousel-arrow:hover {
  background: rgba(40, 40, 40, 0.55);
}

.carousel-arrow.prev {
  left: 0;
}

.carousel-arrow.next {
  right: 0;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 4;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: #fff;
}

/* =========================================================
   レスポンシブ（スマホ）
   ========================================================= */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    gap: 10px;
  }

  /* スマホでは検索とショップ/お気に入り等は省略しシンプルに */
  .header-search,
  .header-link,
  .header-icon:nth-child(4),
  .header-icon:nth-child(5) {
    display: none;
  }

  .header-logo {
    font-size: 19px;
  }

  .lead {
    padding: 32px 20px 36px;
  }

  .lead p {
    font-size: 14px;
    line-height: 1.9;
  }

  /* 商品ブロックを1カラムに */
  .product {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .product-main {
    margin-bottom: 24px;
  }

  .product-main img {
    height: auto;
  }

  /* スマホではカルーセルの高さを画像比率（1500×1800）で決める */
  .carousel {
    flex: none;
  }

  /* スマホでは矢印を細めに */
  .carousel-arrow {
    font-size: 24px;
    min-width: 36px;
  }
}
