/* 物件一覧スライダー - クラスベースのスタイル */

/* ウィジェット共通スタイル */
.widget_fudo_top_r {
  padding: 24px 16px;
  border-radius: 0;
}

/* グリッドコンテンツ */
.widget_fudo_top_r .grid-content {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

/* カードスタイル */
.widget_fudo_top_r .grid-content > li,
.widget_fudo_top_r .rent-slide {
  background: #ffffff;
  border: none !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
  margin: 0;
  overflow: hidden;
  padding: 0;
  height: auto !important;
}

/* スライダービューポート */
.rent-slider .rent-viewport {
  overflow: hidden;
  width: 100%;
}

/* スライダートラック */
.rent-slider .rent-track {
  --rent-gap: 24px;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--rent-gap);
  align-items: stretch;
  justify-content: flex-start;
  transition: transform 0.4s ease;
  margin: 36px 36px;
}

/* スライドアイテム */
.rent-slider .rent-slide {
  flex: 0 0 calc((100% - (2 * var(--rent-gap))) / 3);
  max-width: calc((100% - (2 * var(--rent-gap))) / 3);
  width: auto !important;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  float: none !important;
  list-style: none;
}

@media (max-width: 1200px) {
  .rent-slider .rent-slide {
    flex: 0 0 calc((100% - var(--rent-gap)) / 2);
    max-width: calc((100% - var(--rent-gap)) / 2);
  }
}

@media (max-width: 768px) {
  .rent-slider .rent-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ナビゲーションドット */
.rent-slider .rent-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 0;
  padding: 10px 16px;
}

.rent-slider .rent-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  border: none;
  background: #c8ddf5;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
  touch-action: manipulation;
}

.rent-slider .rent-dot:hover {
  background: #8fbaf3;
  opacity: 1;
  transform: scale(1.2);
}

.rent-slider .rent-dot.active {
  width: 24px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8fbaf3 0%, #5a9de6 100%);
  opacity: 1;
  box-shadow: 0 2px 8px rgba(143, 186, 243, 0.4);
}

/* 矢印ボタン */
.rent-slider .rent-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #c8ddf5;
  background: rgba(255, 255, 255, 0.9);
  color: #5a9de6;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(4px);
  touch-action: manipulation;
}

.rent-slider .rent-arrow .rent-arrow-icon {
  display: block;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.rent-slider .rent-prev .rent-arrow-icon {
  transform: translate(-1px, 0);
}

.rent-slider .rent-next .rent-arrow-icon {
  transform: translate(1px, 0);
}

.rent-slider .rent-arrow:hover {
  background: #8fbaf3;
  border-color: #8fbaf3;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(143, 186, 243, 0.35);
}

.rent-slider .rent-arrow:hover .rent-arrow-icon {
  transform: scale(1.1);
}

.rent-slider .rent-prev:hover .rent-arrow-icon {
  transform: translateX(-2px) scale(1.1);
}

.rent-slider .rent-next:hover .rent-arrow-icon {
  transform: translateX(2px) scale(1.1);
}

.rent-slider .rent-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* 画像エリア */
.widget_fudo_top_r .makoto-left,
.rent-slider .rent-slide .makoto-left {
  position: relative;
  width: 100% !important;
  height: 0;
  padding-top: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.widget_fudo_top_r .makoto-left a,
.rent-slider .rent-slide .makoto-left a {
  position: absolute;
  inset: 0;
  display: block;
}

.widget_fudo_top_r .makoto-left img.box1image,
.rent-slider .rent-slide .makoto-left img.box1image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* テキストエリア */
.widget_fudo_top_r .makoto-right,
.rent-slider .rent-slide .makoto-right {
  padding: 12px 14px;
}

/* タイトル */
.widget_fudo_top_r .top_title,
.rent-slider .rent-slide .top_title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: #222222;
}

/* 価格 */
.widget_fudo_top_r .top_price,
.rent-slider .rent-slide .top_price {
  color: #0b63c5;
  font-size: var(--font-size-xl);
  font-weight: 800;
}

/* 間取り・面積・所在地 */
.widget_fudo_top_r .top_madori,
.widget_fudo_top_r .top_menseki,
.widget_fudo_top_r .top_shozaichi,
.rent-slider .rent-slide .top_madori,
.rent-slider .rent-slide .top_menseki,
.rent-slider .rent-slide .top_shozaichi {
  font-size: var(--font-size-base);
  color: #555555;
}

/* 詳細ボタン */
.widget_fudo_top_r .box1low,
.rent-slider .rent-slide .box1low {
  margin-top: 8px;
  padding: 8px 14px;
  background: #6cb6ff !important;
  border: none;
  border-radius: 20px !important;
}

.widget_fudo_top_r .box1low a,
.rent-slider .rent-slide .box1low a {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* === Responsive: Tablet === */
@media (max-width: 960px) {
  .rent-slider .rent-track {
    margin: 24px 24px;
  }
}

/* === Responsive: Mobile === */
@media (max-width: 480px) {
  .rent-slider .rent-track {
    margin: 16px 12px;
  }

  /* ドットサイズ（section-sliderと統一） */
  .rent-slider .rent-dot {
    width: 6px;
    height: 6px;
  }

  .rent-slider .rent-dot.active {
    width: 18px;
  }

  /* 矢印サイズ */
  .rent-slider .rent-arrow {
    width: 30px;
    height: 30px;
  }

  .rent-slider .rent-arrow svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================================
   VIEW TOGGLE BUTTONS
   ========================================================== */
.view-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 12px;
  padding: 0 36px;
}

.view-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid #c8ddf5;
  background: rgba(255, 255, 255, 0.9);
  color: #5a9de6;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  outline: none;
}

.view-toggle-btn:hover {
  background: #eef4fb;
  border-color: #8fbaf3;
}

.view-toggle-btn.is-active {
  background: linear-gradient(135deg, #8fbaf3 0%, #5a9de6 100%);
  border-color: #5a9de6;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(90, 157, 230, 0.35);
}

.view-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================
   LIST-ACTION (hidden by default, shown in list mode)
   ========================================================== */
.rent-slide .list-action {
  display: none;
}

/* ==========================================================
   LIST VIEW MODE (.view-list on .widget_fudo_top_r)
   ========================================================== */

/* Viewport: allow overflow for vertical scroll */
.view-list .rent-viewport {
  overflow: visible !important;
}

/* Track: vertical column, no transform */
.view-list .rent-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  transform: none !important;
  transition: none;
}

/* Hide slider nav */
.view-list .rent-dots {
  display: none !important;
}

/* Card: 3-column grid layout */
.view-list .rent-slide {
  flex: none !important;
  max-width: 100% !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 220px 1fr;
  border-radius: 14px;
  overflow: hidden;
  animation: rentFadeInUp 0.35s ease both;
}

.view-list .rent-slide:nth-child(1) { animation-delay: 0s; }
.view-list .rent-slide:nth-child(2) { animation-delay: 0.04s; }
.view-list .rent-slide:nth-child(3) { animation-delay: 0.08s; }
.view-list .rent-slide:nth-child(4) { animation-delay: 0.12s; }
.view-list .rent-slide:nth-child(5) { animation-delay: 0.16s; }
.view-list .rent-slide:nth-child(6) { animation-delay: 0.20s; }
.view-list .rent-slide:nth-child(7) { animation-delay: 0.24s; }
.view-list .rent-slide:nth-child(8) { animation-delay: 0.28s; }
.view-list .rent-slide:nth-child(9) { animation-delay: 0.32s; }
.view-list .rent-slide:nth-child(10) { animation-delay: 0.36s; }

@keyframes rentFadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -- Image area (left column) -- */
.view-list .rent-slide .makoto-left {
  position: relative;
  width: 100% !important;
  height: auto !important;
  padding-top: 0 !important;
  border-radius: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.view-list .rent-slide .makoto-left a {
  position: absolute;
  inset: 0;
  display: block;
}

.view-list .rent-slide .makoto-left img.box1image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* -- Info area (center column) -- */
.view-list .rent-slide .makoto-right {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.view-list .rent-slide .top_title {
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.view-list .rent-slide .top_price {
  font-size: 1.3rem;
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}

.view-list .rent-slide .top_madori,
.view-list .rent-slide .top_menseki {
  font-size: 0.88rem;
  display: inline;
}

.view-list .rent-slide .top_shozaichi {
  font-size: 0.84rem;
  display: block;
  color: #666666;
  margin-top: 4px;
}

.view-list .rent-slide .top_kotsu {
  font-size: 0.84rem;
  display: block;
  color: #666666;
}

/* Hide inline detail button in list mode */
.view-list .rent-slide .box1low {
  display: none !important;
}

.view-list .rent-slide .top_r_footer {
  display: none;
}

/* -- Action button (right column) -- */
.view-list .rent-slide .list-action {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px;
  gap: 8px;
  grid-column: 1 / -1;
}

.list-action-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #8fbaf3 0%, #5a9de6 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(90, 157, 230, 0.25);
  text-align: center;
}

.list-action-btn:hover {
  box-shadow: 0 4px 16px rgba(90, 157, 230, 0.4);
  transform: translateY(-2px);
  color: #ffffff;
  text-decoration: none;
}

/* ==========================================================
   LIST VIEW: Responsive
   ========================================================== */

@media (max-width: 960px) {
  .view-toggle-wrap {
    padding: 0 24px;
  }

  .view-list .rent-slide {
    grid-template-columns: 180px 1fr;
  }
}

@media (max-width: 768px) {
  .view-toggle-wrap {
    padding: 0 12px;
  }

  .view-list .rent-track {
    grid-template-columns: 1fr;
  }

  .view-list .rent-slide {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto;
  }

  .view-list .rent-slide .makoto-left {
    border-radius: 14px 14px 0 0;
    aspect-ratio: 16 / 9;
  }

  .view-list .rent-slide .makoto-right {
    padding: 14px 16px 10px;
  }

  .view-list .rent-slide .list-action {
    padding: 10px 16px;
  }

  .list-action-btn {
    padding: 10px 20px;
    width: 100%;
  }
}

/* ==========================================================
   VISITED PROPERTY CARD
   ========================================================== */
.rent-slide.is-visited .makoto-left::after {
  content: '閲覧済み';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  z-index: 2;
  pointer-events: none;
}
