/*==============================================================================
  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 .selectWrap p.headTit {
  margin-bottom: 2em;
  font-size: 14px;
  color: #000000;
}

#reserve.shop .selectWrap p#pre_res {
  margin-top: 12px;
  margin-bottom: 14px;
  text-align: center;
}

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

#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 → mens/common/css/grstyle.css の共通ルールを使用 */

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

.shop-row:first-child {
  border-top: 1px solid rgba(99, 129, 131, 0.10);
}

.shop-row:hover {
  background: rgba(99, 129, 131, 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: var(--ka-ink-soft);
  line-height: 1.4;
}

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

.shop-row-address {
  font-size: 13px;
  color: var(--ka-subtext);
  margin-top: 3px;
  line-height: 1.45;
}

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

.shop-row-tel a {
  font-size: 11px;
  color: var(--ka-muted);
  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: var(--ka-subtext);
  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: var(--ka-ink-soft);
}

.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: 8px;
    box-shadow: none;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
  }

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

  .shop-row:hover {
    transform: none;
    box-shadow: none;
    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.48) 0%,
      rgba(0, 0, 0, 0.06) 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.75) 0%,
      rgba(0, 0, 0, 0.18) 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: 12px;
    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;
}

@media only screen and (min-width: 769px) {
  #reserve.shop .selectWrap {
    padding-top: 72px;
  }

  #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;
  }

  /* Editorial: remove old padding that would indent shop rows */
  #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;
  }

  /* Widen shop list for editorial scale */
  .gridContainer {
    max-width: 1380px;
    padding-left: 64px;
    padding-right: 64px;
  }

  /* Constrain REPEAT RESERVATION card to stepper width */
  #reserve.shop .selectWrap p#pre_res {
    max-width: var(--reservation-content-width);
    margin-left: auto;
    margin-right: auto;
  }
}

#mensshoplist {
  padding-bottom: 48px;
}

/* ─── モバイル（768px 以下）: 店舗行をコンパクトに ────────────────────────── */
@media (max-width: 768px) {
  #reserve.shop .selectWrap p.subTit { margin-top: 0; margin-bottom: 0; }
  #reserve.shop .selectWrap p.subTit img { max-width: 130px; }
  #reserve.shop .selectWrap p.headTit { margin-bottom: 0.6em; }
  .shop-row { padding: 4px 4px; gap: 10px; }
  .shop-row-img { width: 72px; height: 72px; }
  .shop-row-name { font-size: 15px; }
  .shop-row-en { font-size: 11px; margin-top: 1px; }
  .shop-row-address { font-size: 11px; margin-top: 2px; line-height: 1.4; }
  .shop-row-tel { margin-top: 2px; }
  .shop-row-tel a { font-size: 10px; }
  .shop-row-arrow::before { font-size: 11px; }
}
