/*==============================================================================
  Shop selection page styles
  Targets: select_shop.html / mens/select_shop.html
  File: common/css/select_shop.css
==============================================================================*/

#reserve.shop .fluid.selectWrap .selectInner {
  box-shadow: none !important;
  background-color: unset !important;
}

#reserve.shop .selectWrap .selectInner {
  border: none !important;
  padding: 0 !important;
}

#reserve.shop .fluid.selectWrap .selectInner p a {
  border: none !important;
}

#reserve.shop .step {
  margin-top: 14px;
}

#reserve.shop .step p {
  padding-bottom: 1.8em;
  padding-right: 10px;
  padding-left: 10px;
}

#reserve.shop .selectWrap p.headTit {
  margin-bottom: 2em;
  font-size: 14px;
  color: #000000;
}

/* .pre_res styles → grstyle.css の共通ルールを使用 */

#reserve.shop .selectWrap p#pre_res:not(:empty) {
  margin-bottom: 1.2em !important;
}

#reserve.shop .selectWrap .selectInner {
  padding: 10px;
  background-color: #ffffff;
  border: 2px solid #ffb540;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

#reserve.shop .selectWrap .selectInner p {
  margin: 0px auto;
}

#reserve.shop .selectWrap .selectInner p a {
  display: block;
  width: 260px;
  height: auto;
  border-bottom: none;
  margin: 10px auto;
  padding: 10px;
}

#reserve.shop .selectWrap p.subTit {
  width: 100%;
  margin-left: 0;
  margin-right: auto;
  margin-top: 0.5em;
  text-align: center;
}

#reserve.shop .selectWrap p.subTit img {
  display: inline-block;
  width: auto;
  max-width: min(100%, 180px);
  height: auto;
}

#reserve.shop .selectWrap .selectInner p a img {
  width: 260px;
  height: auto;
}

@media only screen and (min-width: 481px) {
  #reserve.shop .selectWrap .selectInner p a {
    width: 320px;
  }

  #reserve.shop .selectWrap .selectInner p a img {
    width: 320px;
  }
}

/* モバイル .pre_res overrides → grstyle.css の共通ルールを使用 */

/* Shop list row */
.shop-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 4px;
  border-bottom: 1px solid rgba(164, 128, 117, 0.10);
  cursor: pointer;
  transition: background 0.15s;
}

.shop-row:first-child {
  border-top: 1px solid rgba(164, 128, 117, 0.10);
}

.shop-row:hover {
  background: rgba(164, 128, 117, 0.04);
}

.shop-row-img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.shop-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-row-info {
  flex: 1;
  min-width: 0;
}

.shop-row-name {
  font-size: 17px;
  font-weight: bold;
  color: #675852;
  line-height: 1.4;
}

.shop-row-en {
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: 12px;
  color: #94847d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
  line-height: 1.3;
}

.shop-row-address {
  font-size: 13px;
  color: #94847d;
  margin-top: 3px;
  line-height: 1.45;
}

.shop-row-tel {
  margin-top: 3px;
}

.shop-row-tel a {
  font-size: 11px;
  color: #b8aaa4;
  font-weight: 400;
  text-decoration: none;
}

.shop-row-tel a:hover {
  text-decoration: underline;
}

.shop-row-arrow {
  width: auto;
  height: auto;
  border-radius: 0;
  border: none;
  background: transparent;
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: none;
}

.shop-row-arrow::before {
  content: "Reserve →";
  font-family: 'Cormorant SC', serif;
  font-size: 13px;
  font-weight: 600;
  color: #7a6a62;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.shop-row:hover .shop-row-arrow {
  background: transparent;
  color: transparent;
  border-color: transparent;
}

.shop-row:hover .shop-row-arrow::before {
  color: #675852;
}

.shop-row-select {
  display: none;
}

@media (min-width: 769px) {

  /* ── 2-column grid with rhythm ───────────────────────────────────────────── */
  .selectInner:has(.shop-row) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0;
  }

  /* 1枚目（全幅）はビューポートをほぼ埋めてスクロールを誘う */
  .shop-row:nth-child(3n+1) {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }

  /* ── Each store: full-bleed overlay card ──────────────────────────────────── */
  .shop-row {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
  }

  .shop-row:first-child {
    border-top: none;
  }

  .shop-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    background: transparent;
  }

  /* Bottom-to-top gradient for text legibility */
  .shop-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.10) 50%,
      transparent 100%);
    z-index: 1;
    pointer-events: none;
    transition: background 0.5s ease;
  }

  .shop-row:hover::before {
    background: linear-gradient(to top,
      rgba(0, 0, 0, 0.80) 0%,
      rgba(0, 0, 0, 0.22) 52%,
      rgba(0, 0, 0, 0.02) 100%);
  }

  /* Image panel: full bleed */
  .shop-row-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: unset;
  }

  .shop-row-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: brightness(0.92) contrast(0.93) saturate(0.90);
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.7s ease;
  }

  .shop-row:hover .shop-row-img img {
    transform: scale(1.04);
    filter: brightness(0.82) contrast(0.93) saturate(0.90);
  }

  /* Text panel: bottom-center overlay */
  .shop-row-info {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 40px 44px;
    text-align: center;
    background: transparent;
    flex: unset;
  }

  /* Japanese name: small caption */
  .shop-row-name {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  }

  /* English name: large overlay headline */
  .shop-row-en {
    font-family: 'Cormorant SC', serif;
    font-size: clamp(36px, 4.8vw, 68px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45), 0 2px 20px rgba(0, 0, 0, 0.30);
  }

  /* Address + tel: hidden by default, revealed on hover */
  .shop-row-address {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.55;
    letter-spacing: 0.03em;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.35s ease, margin-top 0.3s ease;
  }

  .shop-row:hover .shop-row-address {
    max-height: 80px;
    opacity: 1;
    margin-top: 12px;
  }

  .shop-row-tel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.4s ease 0.05s, opacity 0.35s ease 0.05s;
  }

  .shop-row:hover .shop-row-tel {
    max-height: 32px;
    opacity: 1;
    margin-top: 4px;
  }

  .shop-row-tel a {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.03em;
  }

  /* "Reserve →" */
  .shop-row-info::after {
    content: "Reserve →";
    display: block;
    margin-top: 18px;
    font-family: 'Cormorant SC', serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    opacity: 0.95;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.40);
    transition: opacity 0.4s ease, letter-spacing 0.4s ease;
  }

  .shop-row:hover .shop-row-info::after {
    opacity: 1;
    letter-spacing: 0.28em;
  }

  /* Arrow and button: hidden */
  .shop-row-arrow {
    display: none;
  }

  .shop-row-select {
    display: none;
  }
}

/* ページトップリンクは店舗選択ページでは非表示（フッター上の白文字が背景に溶けて不可視のため） */
#reserve.shop .pagetop {
  display: none;
}

/* ─── メンズ店舗リスト: tealバックグラウンドでレディースと区別 ─── */

#mensshoplist {
  margin-top: 32px;
  padding-bottom: 24px;
  position: relative;
  isolation: isolate;
}

#mensshoplist::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  background: rgba(99, 129, 131, 0.09);
  z-index: -1;
  pointer-events: none;
}

#mensshoplist .shop-row {
  background: transparent;
  border-bottom-color: rgba(99, 129, 131, 0.18);
}

#mensshoplist .shop-row:first-child {
  border-top-color: rgba(99, 129, 131, 0.18);
}

#mensshoplist .shop-row:hover {
  background: rgba(99, 129, 131, 0.12);
}

#mensshoplist p.subTit {
  width: 100%;
  text-align: center;
  margin-top: 0;
  padding-top: 20px;
  margin-bottom: 4px;
}

#mensshoplist p.subTit img {
  display: inline-block;
  width: auto;
  max-width: min(100%, 180px);
  height: auto;
}

@media only screen and (min-width: 769px) {
  #mensshoplist {
    padding-bottom: 0;
  }

  #mensshoplist::before {
    display: none;
  }

  #mensshoplist .shop-row {
    border-bottom: none;
  }

  /* ── 1. コンテンツ幅（元の設定を維持） ──────────────────────────────── */
  .gridContainer {
    width: auto;
    max-width: 1380px;
    padding-left: 64px;
    padding-right: 64px;
  }

  /* ── 2. 上部余白を詰める・下部余白を確保 ────────────────────────────── */
  #reserve.shop .selectWrap {
    padding-top: 28px;
    padding-bottom: 64px;
  }

  /* ── 3. 背景に奥行きを与える ─────────────────────────────────────────── */
  #reserve.shop {
    background: linear-gradient(168deg,
      #ede3d6 0%,
      var(--ka-bg-soft) 420px
    );
  }

  /* ── 4. カードに額縁感を与える ───────────────────────────────────────── */
  .shop-row {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.14),
      inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }

  .shop-row:hover {
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.22),
      inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  }

  /* ── 5. ロゴ下〜カード間にセクションタイトルを追加 ──────────────────── */
  #reserve.shop .selectWrap::before {
    content: "Select Your Salon";
    display: block;
    font-family: 'Cormorant SC', serif;
    font-size: clamp(26px, 2.6vw, 44px);
    font-weight: 300;
    letter-spacing: 0.22em;
    color: var(--ka-warm-brown);
    text-align: center;
    margin-bottom: 32px;
    opacity: 0.9;
  }

  /* グリッドのギャップを広げてカードを際立たせる */
  .selectInner:has(.shop-row) {
    gap: 24px;
  }

  /* Editorial: remove old padding */
  #reserve.shop .fluid.selectWrap .selectInner {
    height: auto;
    text-align: left;
    border: none;
    padding: 0;
  }

  #reserve.shop .selectWrap p.subTit {
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
  }
}

/* ─── メンズ誘導モーダル ──────────────────────────────────────────────────── */

.mens-guide-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.mens-guide-overlay[hidden] { display: none; }

.mens-guide-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.mens-guide-title {
  font-size: 16px;
  font-weight: 700;
  color: #2f2722;
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}

.mens-guide-body {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  margin: 0 0 20px;
}

.mens-guide-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mens-guide-btn-primary {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.06em;
  padding: 13px 20px;
  border-radius: 999px;
  background: #638183;
  text-decoration: none;
  transition: background 0.2s;
}
.mens-guide-btn-primary:link,
.mens-guide-btn-primary:visited { color: #fff; }
.mens-guide-btn-primary:hover   { background: #4e6b6e; color: #fff; }

.mens-guide-btn-secondary {
  display: block;
  width: 100%;
  font-size: 13px;
  color: #888;
  padding: 10px 20px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.mens-guide-btn-secondary:hover { border-color: #aaa; color: #555; }
}
