/* Sato-sangyo Home CSS - Matching nomura-estate pattern */

:root {
  --main-width: 1100px;
  --content-spacing: clamp(1.25rem, 24vw, max(calc(50vw - var(--main-width) / 2), 12px));
  --sato-primary: #339999;
  --sato-button: #339999;
  --sato-bg: #F5EEDD;
  --sato-price: #EB1A22;
  --sato-new: #DFC243;
  --sato-text: #333333;
  --sato-info-bg: #E6F4F4;
  --sato-border: #E2E2E2;
}

body {
  display: block;
  @media (min-width: 768px) {
    display: grid;
  }
}

.main {
  overflow: hidden;
  padding-top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-xxxl);
  padding-bottom: var(--gap-xxxl);
  min-width: 300px;
}

@media (min-width: 768px) {
  .main {
    gap: var(--gap-xxxxl);
    padding-bottom: var(--gap-xxxxl);
  }
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xl);

  .error {
    width: 100%;
    display: block;
    text-align: center;
    grid-column: 4 span;
    padding-block: var(--p-xl);
  }
}

@media (min-width: 768px) {
  .section {
    padding-inline: var(--content-spacing);
  }
}
/* Header on home page - transparent background, no shadow */

  .header {
    margin-inline: 0;
    border-radius: 0px;
    position: absolute;
    
  }
  

@media (min-width: 768px) {
    .home .simple-header,
    .home .header {
      /* background-color: rgb(from var(--header-color) r g b / 0.2); */
      background-color: unset;
      box-shadow: none;
      border-bottom: none;
    }
}

.home .simple-header,
.home .header {
  background-color: unset;
  box-shadow: none;
  border-bottom: none;

}

/* Header text colors - keep dark text on home page */
.home .header .inner .link,
.home .header .inner .link span,
.home .header .information .text,
.home .header .information .tel,
.home .header .information .block-text,
.home .header .information .block-text-title {
  color: var(--sato-text, #333);
}

.home .header .information .tel::before {
  color: var(--sato-text, #333);
}

.home .header .list .item .link,
.home .header .list .item .text {
  color: var(--sato-text, #333);
}

.home .header .list .item .link:hover {
  color: var(--sato-primary, #339999);
}

  .header .list .sep:first-child,
  .header .list .sep:last-child {
    opacity: 0;
  }

  @media (min-width: 1280px) {
  .header .list .sep:first-child,
  .header .list .sep:last-child {
      display: none;
  }
      /* 1st item - half width, text flush left (no outer sep) */
    .header .list .item:nth-child(2) {
      flex: 0.5 1 0%;
    }
    .header .list .item:nth-child(2) .link {
      text-align: left;
    }
    /* last item - half width, text flush right (no outer sep) */
    .header .list .item:nth-last-child(2) {
      flex: 0.5 1 0%;
    }
    .header .list .item:nth-last-child(2) .link {
      text-align: right;
    }

  }

  @media (min-width: 890px) {
    .header .sep {
      display: block;
      width: 1px;
      height: 17px;
      background-color: var(--white, #FFF);
      flex-shrink: 0;
    }
    .header .list {
      position: relative;
      display: flex;
      width: 100%;
      align-items: center;
      padding-block: var(--p-md);
    }
    .header .list .item {
      flex: 1 1 0%;
      height: 60px;
    }
    .header .list .item.toggle:hover {
      background-color: rgba(255, 255, 255, 0.9);
      transition: 0.2s;
      cursor: default;
    }
    .header .list .item.toggle:hover .text {
      color: var(--main-color);
      font-weight: var(--weight-bold);
    }
    .header .list .item.group {
      grid-column: span 3;
      height: auto;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: var(--gap-md);
    }
    .header .list .item .text {
      display: block;
      text-align: center;
      text-decoration: none;
      color: var(--text-color);
      font-size: var(--text-sm);
      padding-block: var(--p-lg);
    }
    .header .list .item .menu {
      position: absolute;
      top: calc(100% - var(--p-md));
      left: 0;
      display: grid;
      box-sizing: border-box;
      width: 100%;
      height: 0;
      background-color: rgba(255, 255, 255, 0.9);
      padding: 0 var(--p-xxl);
      grid-template-columns: 150px 1fr;
      border-radius: 8px;
      opacity: 0;
      z-index: 10;
      transition: 0.5s;
    }
    .header .list .item .menu .heading {
      display: none;
      font-size: var(--text-lg);
      color: var(--text-color);
      font-weight: var(--weight-bold);
    }
    .header .list .item .menu .inner {
      display: none;
      align-items: flex-start;
      grid-template-columns: repeat(3, 1fr);
      row-gap: var(--gap-lg);
      padding-block: 0;
    }
    .header .list .item .menu .inner .block {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: var(--p-lg);
      width: 100%;
    }
    :is(.header .list .item .menu .inner .block) + .tag {
      margin-top: var(--p-xl);
    }
    .header .list .item:hover .menu {
      height: auto;
      padding-block: var(--p-xxl);
      opacity: 1;
      transition: 0.5s;
    }
    .header .list .item:hover .menu .heading {
      display: block;
    }
    .header .list .item:hover .menu .inner {
      display: grid;
    }
    .header .tag {
      font-size: var(--text-xs);
      font-weight: var(--weight-bold);
      color: var(--text-contrast-color);
      background-color: var(--main-color);
      border-radius: 50px;
      padding: 4px var(--p-md);
      margin-bottom: var(--p-md);
    }
    
  
  }

  /* Hamburger Menu */
  .hamburger-menu {
    top: 30px;
    right: var(--content-spacing);
    left: unset;
    background: rgba(255, 255, 255, 0.70);
  }
  @media (min-width: 768px) {
    .hamburger-menu {
      top: var(--p-md);
      right: var(--content-spacing);
      background: rgba(255, 255, 255, 0.70);
    }
  }
  @media (min-width: 890px) {
    .hamburger-menu {
      top: 20px;
    }
  }

/* First View - ファーストビュー (Static First View) - Figma Design */
.static-first-view,
.fv {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  width: 100vw;
  height: 800px;
  padding-inline: var(--content-spacing);
  /* mobile height 800px -> 95dvh */
  @media (max-width: 768px) {
    height: 560px
  }

  .picture {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

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

    /* Transparent overlay */
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: transparent;
      pointer-events: none;
    }
  }

  /* Blurred blue gradient background - Figma Design */
  .fv-blur-bg {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 200px;
    background: rgba(110, 162, 218, 0.54);
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
  }

  .fv-text-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    @media (min-width: 768px) {
      gap: 10px;
    }
  }

  .title {
    color: #FFF;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
    font-family: "Zen Kaku Gothic Antique", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 90px;
    font-style: normal;
    font-weight: 700;
    line-height: 110px;
    font-synthesis: none;
    text-align: left;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: normal;
    overflow-wrap: break-word;
    line-break: auto;
    max-width: 100%;
    box-sizing: border-box;
    @media (max-width: 900px) {
      font-size: 40px;
      line-height: 63px;
      word-break: keep-all;
      overflow-wrap: anywhere;
      line-break: strict;
      br {
        display: none;
      }
    }
  }

  .sub-title {
  color: #FFF;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
  font-family: "Zen Kaku Gothic Antique";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 28.77px;
  letter-spacing: 6.4px;
  text-align: left;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: keep-all;
    overflow-wrap: break-word;
    line-break: strict;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    @media (min-width: 768px) {
      font-size: 18px;
      line-height: 32px;
      letter-spacing: 7.2px;
    }
    @media (max-width: 767px) {
      font-size: 16px;
      line-height: 28.77px;
      letter-spacing: 6.22px;
    }
  }
}

@media (min-width: 768px) {
  .static-first-view,
  .fv {
    gap: 0;
    padding-top: 0;
    padding-inline: var(--content-spacing);
    align-items: flex-start;
    justify-content: center;

    .fv-blur-bg {
      left: calc(var(--content-spacing) - 25px);
      width: 558px;
      height: 300px;
    }

  }
}

/* Section Corner - おすすめ売買物件 (Figma Design) */
body.home .section-corner {

  .corner-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: var(--contents-bg-color);
    padding: 0 39px;

    @media (max-width: 767px) {
      padding: 0 12px;
    }

    .title {
      display: flex;
      align-items: center;
      gap: var(--gap-md);
      padding-inline: var(--content-spacing);
      font-family: 'Zen Kaku Gothic Antique', sans-serif;
      font-size: 20px;
      font-weight: 700;
      line-height: 1.5;
      color: var(--sato-text);
      
      @media (min-width: 768px) {
        font-size: 20px;
        padding: 5px 0 5px 45px;
        position: relative;
      }
      
      .cornerIcon {
        display: block;
        width: 30px;
        height: 35px;
        flex-shrink: 0;
        fill: var(--sato-primary);

        @media (min-width: 768px) {
          width: 30px;
          height: 35px;
          position: absolute;
          left: 0;
          top: 2.5px;
        }
      }

      .description {
        font-size: var(--text-xs);
        line-height: 1.2;
        font-weight: 500;
      }

      &::before {
        display: none;
      }
    }
  }
}

/* Section Cube Type A - Figma Design Background */
body.home .section-corner.cube-typeA {
  .corner-wrapper {
    background: var(--sato-bg);
    padding: 20px 39px 30px;

    @media (max-width: 950px) {
      padding: 20px 12px 30px;
    }

    .title {
      @media (max-width: 767px) {
        padding-inline: 0;
      }
    }
  }
}

body.home .section-corner.cube-ranking,
body.home .section-corner.section-news {
  .corner-wrapper {
    padding: 0 0;
    border: none;
    background: transparent;
    @media (max-width: 767px) {
      padding: 0 12px;
    }

    .title {
      background: transparent;
      color: var(--text-color);
      font-weight: 500;
      line-height: 1.2;
      flex-wrap: wrap;

      @media (max-width: 767px) {
        padding-inline: 0;
      }
    }
    
    .description {
      font-size: var(--text-xs);
      line-height: 1.2;
      font-weight: 500;
    }
    
  }
}

body.home .section-corner.cube-ranking .corner-wrapper .title .cornerIcon {
  @media (max-width: 767px) {
    width: 36px;
    height: 48px;
    left: -10px;
    flex-shrink: 0;
    aspect-ratio: 3/4;
  }
}

body.home .section-news .corner-wrapper .title .cornerIcon {
  fill: var(--sato-primary, #339999);

  @media (max-width: 767px) {
    width: 20px;
    height: 20px;
  }
}

body.home .section-news .posts {
  border-top: none;
  border-bottom: none;
  border-right: 2px dashed #399;
  border-left: 2px dashed #399;
  margin-inline: 0;
  padding-inline: var(--content-spacing);
  background: var(--contents-bg-color);

  @media (min-width: 768px) {
    padding-inline: 20px;
  }

  .post-news {
    .heading .link:hover {
      color: var(--sato-primary);
    }

    .new::after {
      color: var(--new-color);
      background-color: unset;
      font-size: var(--text-md);
      font-weight: 700;
      padding-inline: 5px;
    }
  }
}

body.home .section-news .more-link {
  background-color: var(--main-color, var(--sato-button));
  background-image: url(../image/Link.png);
  background-size: auto;
  background-repeat: repeat;
  background-position: 0% 0%;
  border: 1px solid var(--main-color, var(--sato-primary));
}

.swiper {
  padding-inline: clamp(0.875rem, -6.5357rem + 37.0536vw, 11.25rem) !important;

  @media (min-width: 768px) {
    padding-inline: 0 !important;
  }

  .swiper-wrapper {
    .swiper-slide {
      margin-right: 8px;

      @media (min-width: 320px) {
        margin-right: 10px;
      }

      @media (min-width: 768px) {
        margin-right: 0;
      }
    }
  }
} 

/* Section Swiper */
.section-swiper {
  .scube-typeA-pagenation,
  .scube-typeB-pagenation {
    margin-top: 10px;
    text-align: center;
  }
}

@media (min-width: 768px) {
  .section-swiper {
    padding-inline: var(--content-spacing);
    .scube-typeA-pagenation,
    .scube-typeB-pagenation {
      display: none;
    }
  }
}

/* scube-typeA - おすすめ売買物件 (Figma Design) */
.scube-typeA {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-md);
  width: 160%;
  transform: translateX(calc(calc(100% - 135%) / 2));

  .item {
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--sato-border);
    background: var(--contents-bg-color);
    height: auto;
    width: 100%;

    &:hover {
      border-color: var(--main-color, var(--sato-primary));
      .pic img {
        opacity: 0.7;
      }
    }
  }

  .pic {
    position: relative;
    width: 100%;
    aspect-ratio: 238 / 178;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: opacity 0.3s ease;
    }

    /* NEW badge */
    &.new-property::before {
      content: 'NEW';
      position: absolute;
      top: 0;
      left: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 54px;
      height: 27px;
      background: var(--sato-new);
      color: #fff;
      font-family: 'Noto Sans JP', sans-serif;
      font-size: 14px;
      font-weight: 700;
      line-height: 1;
    }

    /* 商談中 badge */
    &.stage-negotiation::after {
      content: '商談中';
      position: absolute;
      top: 50%;
      left: 50%;
      display: block;
      width: 80px;
      height: 20px;
      background: #e0af1b;
      border-radius: 8px;
      color: var(--text-contrast-color);
      font-size: var(--text-sm);
      line-height: 1.3;
      text-align: center;
      translate: -50% -50%;
      z-index: 3;
    }
  }

  .info {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--contents-bg-color);
    flex-grow: 1;
    padding: 10px 15px;
  }

  /* Tags container - Figma Design */
  .tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
  }

  .tag-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    padding: 0 5px;
    border: 1px solid var(--main-color, var(--sato-primary));
    border-radius: 2px;
    background: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 25.6px;
    color: var(--main-color, var(--sato-primary));
    white-space: nowrap;
  }

  .price {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20.8px;
    font-weight: 700;
    color: var(--sato-price);
    line-height: 25.6px;
    text-align: center;

    .unit {
      font-size: 16px;
      font-weight: 700;
    }
  }
  
  .price_rimawari {
    color: var(--sato-text);
    font-size: 14px;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 700;
    span {
      line-height: 1;
      margin-right: 0.5em;
      font-size: 12px;
      display: inline-block;
      padding: 4px;
      justify-content: center;
      align-items: center;
      gap: 10px;
      border-radius: var(--border-radius-sm, 4px);
      background: var(--warning-lighter, #FCD34D);
    }
  }

  .spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
    font-size: 15px;
    line-height: 1.5;

    .rimawari {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 22.5px;
      background: var(--sato-info-bg);
      font-weight: 700;
      padding: 0 10px;
      font-size: 15px;
      text-align: center;
      line-height: 22.5px;
     

      @media (max-width: 1100px) {
        flex-wrap: wrap;
        padding: 0 3px 0 3px;
      }
      
      .red {
        color: var(--sato-price);
      }
    }

    .address {
      text-align: center;
      font-size: 15px;
      font-weight: 400;
      color: var(--sato-text);
      line-height: 22.5px;
      margin-bottom: 0;
    }

    .address.ellipsis {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      align-self: stretch;
      box-sizing: border-box;
    }

    .detail {
      display: none;
    }

    .structure {
      display: none;
    }
  }

  .item .comment {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 22.5px;
    color: var(--sato-text);
    padding-top: var(--p-md);
    margin-top: 0 !important;
    border-top: 1px solid #E6E6E6;
    overflow: hidden;
    display: -webkit-box;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    -webkit-line-clamp: 3;
  }

  .link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
}

/* Swiper mode - only active on mobile (< 768px) */
.swiper-initialized {
  .scube-typeA {
    display: flex;
    width: 100%;
    transform: none;
    gap: initial;
  }

  /* Override parent theme's border-top on .comment for swiper */
  .swiper-wrapper.scube-typeA .swiper-slide .item .comment {
    padding-top: var(--p-md);
    margin-top: 0 !important;
    border-top: 1px solid #E6E6E6;
  }
}

/* Grid layout for tablet and desktop (>= 768px) - overrides swiper */
@media (min-width: 768px) {
  .scube-typeA {
    width: 100% !important;
    transform: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, calc((100% - (var(--gap-md) * 3)) / 4)) !important;
    gap: var(--gap-md) !important;

    .item {
      width: 100%;
    }

    .pic {
      width: 100%;
      aspect-ratio: 238 / 178;
    }

    .info {
      width: 100%;
      min-height: 211px;
    }

    .item .comment {
      padding-top: var(--p-md);
      margin-top: 0 !important;
      border-top: 1px solid #E6E6E6;
    }

    /* Also override for swiper wrapper */
    .swiper-wrapper .swiper-slide .item .comment {
      padding-top: var(--p-md);
      margin-top: 0 !important;
      border-top: 1px solid #E6E6E6;
    }

    /* Override parent theme spec margin */
    .item .spec {
      margin-bottom: 0 !important;
    }
    

    /* Ensure address ellipsis works on all cards in grid */
    .item .spec .address.ellipsis {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  
  /* Ensure swiper doesn't interfere with grid layout at 768px+ */
  .swiper-initialized .scube-typeA {
    display: grid !important;
    flex-direction: unset !important;
  }
}

/* Section Cube Type B - おすすめ賃貸物件 Figma Background */
body.home .section-corner.cube-typeB {
  .corner-wrapper {
    background: var(--sato-bg);
    padding: 20px 39px 30px;

    @media (max-width: 950px) {
      padding: 20px 12px 30px;
    }

    .title {
      @media (max-width: 767px) {
        padding-inline: 0;
      }
    }
  }
}

/* ===========================================
   scube-typeB - おすすめ賃貸物件 Individual Classes
   =========================================== */

/* TypeB List Container */
.scube-typeB {
  display: flex;
}

/* TypeB Item - Mobile */
.typeB-item {
  display: flex;
  position: relative;
  height: 130px;
  border: 1px solid #F1F1E5;
  background: #FFF;

  &:hover {
    border-color: var(--main-color, var(--sato-primary));

    .typeB-pic img {
      opacity: 0.7;
    }
  }
}

/* TypeB Picture - Mobile */
.typeB-pic {
  width: 128px;
  height: 100%;
  flex-shrink: 0;

  img {
    width: 128px;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }
}

/* TypeB Info - Mobile */
.typeB-info {
  width: calc(100% - 128px);
  height: 100%;
  background-color: #FFF;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

/* TypeB Tags Wrapper - Mobile */
.typeB-tags-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

/* TypeB Tags Container - Mobile */
.typeB-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

/* TypeB Tag Item - Mobile */
.typeB-tag {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 18px;
  padding: 1px 5px;
  border: 1px solid var(--main-color, var(--sato-primary));
  border-radius: 1.4px;
  background: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 17.97px;
  color: var(--main-color, var(--sato-primary));
  white-space: nowrap;
}

/* TypeB Price - Mobile */
.typeB-price {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 24.708px;
  color: var(--sato-price);
  text-align: center;

  .unit {
    font-size: 14px;
  }
}

/* TypeB Spec Container - Mobile */
.typeB-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 2px;
  border: none;
  border-bottom: none;
}

/* TypeB Rimawari - Mobile */
.typeB-rimawari {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1px 5px;
  width: 100%;
  padding: 1.81px 0px;
  background: var(--sato-info-bg);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 15.794px;
  text-align: center;
  color: var(--sato-text);

  .red {
    color: var(--sato-price);
  }
}

/* TypeB Address - Mobile */
.typeB-address {
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 15.794px;
  color: var(--sato-text);
}

/* TypeB Comment - Hidden below 850px */
.typeB-comment-wrapper {
  display: none;
}

@media (min-width: 850px) {
  .typeB-comment-wrapper {
    display: flex !important;
  }
}

/* TypeB Link Overlay */
.typeB-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* ===========================================
   TypeB Desktop 768px+
   =========================================== */
@media (min-width: 768px) {
  .typeB-item {
    display: flex;
    width: calc(50% - var(--gap-md) / 2);
    background: #FFF;
    height: 192px;
    justify-content: center;
    align-items: center;
    border: 1px solid #F1F1E5;

    &:hover {
      border-color: var(--main-color, var(--sato-primary));

      .typeB-pic img {
        opacity: 0.7;
      }
    }
  }

  .typeB-pic {
    width: 140px;
    height: 100%;
    flex-shrink: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: opacity 0.3s ease;
    }
  }

  .typeB-info {
    width: auto;
    height: auto;
    display: flex;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    flex: 1 0 0;
    align-self: stretch;
  }

  .typeB-tags-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
  }

  .typeB-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    align-self: stretch;
  }

  .typeB-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    padding: 0 5px;
    border: 1px solid var(--main-color, var(--sato-primary));
    border-radius: 2px;
    background: #FFF;
    color: var(--main-color, var(--sato-primary));
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 12px;
    font-weight: 700;
    line-height: 25.6px;
  }

  .typeB-price {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--sato-price);
    text-align: center;

    .unit {
      font-size: 12px;
    }
  }

  .typeB-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 2px;
  }

  .typeB-rimawari {
    display: flex;
    padding: 4px 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    background: #E6F4F4;
    font-size: 13px;

    .red {
      color: var(--sato-price);
    }
  }

  .typeB-address {
    color: #333;
    font-family: "Noto Sans JP";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 22.5px;
  }

}

/* TypeB Comment styles for 850px+ */
@media (min-width: 850px) {
  .typeB-comment-wrapper {
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    align-self: stretch;
    gap: 8px;
    width: 100%;
  }

  .typeB-comment {
    flex: 1;
    height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: #333333;
    font-family: "Noto Sans JP";
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
  }
}

/* ===========================================
   TypeB Desktop 950px+ (larger image)
   =========================================== */
@media (min-width: 950px) {
  .typeB-pic {
    width: 190px;

    img {
      width: 190px;
      height: 100%;
    }
  }

  .typeB-info {
    width: calc(100% - 190px);
    min-height: 190px;
    padding: 15px 20px;
  }

  .typeB-tag {
    font-size: 12px;
  }

  .typeB-price {
    font-size: 22px;
  }

  .typeB-rimawari {
    font-size: 15px;
  }

  .typeB-address {
    font-size: 15px;
  }
}

/* scube-typeC - nomura-estate pattern */
.scube-typeC {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  padding-inline: 12px;

  @media (min-width: 768px) {
    padding-inline: 0;
  }

  .item {
    display: flex;
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--contents-bg-color);

    &:hover {
      border-color: var(--main-color, var(--sato-primary));

      .pic img {
        opacity: 0.7;
      }
    }
  }
  .pic {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
  }

  .pic img {
    width: 130px;
    height: 130px;
    aspect-ratio: 1;
    object-fit: cover;
  }

  .info {
    background-color: var(--contents-bg-color);
    flex-grow: 1;
    font-size: var(--text-md);
    padding: var(--p-md);
    height: 130px;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    overflow: hidden;
  }

  .price {
    font-size: var(--text-price);
    font-weight: var(--weight-bold);
    color: var(--sato-price);

    .unit {
      font-size: 0.7em;
    }
  }

  .spec {
    font-size: var(--text-sm);

    .rimawari {
      font-weight: var(--weight-bold);

      .red {
        color: var(--sato-price);
      }
    }
  }

  .comment {
    display: none;
  }

  .link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
}

@media (min-width: 768px) {
  .scube-typeC {
    padding-inline-start: 0;
    padding-inline-end: 0;

    .item {
      display: grid;
      grid-template-columns: 200px 1fr;

      .comment {
        display: block;
        font-size: var(--text-sm);
        padding-top: var(--p-md);
        margin-top: var(--p-md);
        border-top: 1px solid var(--border-color);
        overflow: hidden;
        display: -webkit-box;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        -webkit-line-clamp: 2;
      }

      .pic {
        width: 200px;
        height: 200px;
      }
      .pic img {
        width: 100%;
        height: 100%;
      }
    }

    .info {
      height: auto;
    }
  }
}

/* scube-ranking - Rent Ranking Figma Design */
.scube-ranking {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  margin-inline: 0;

  .item {
    display: flex;
    position: relative;
    border: 1px solid var(--sato-border);
    background: var(--contents-bg-color);

    &:hover {
      border-color: var(--main-color, var(--sato-primary));
      .pic img {
        opacity: 0.7;
      }
    }

    &::after {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      text-align: center;
      font-family: 'Noto Sans JP', sans-serif;
      font-size: 11px;
      font-weight: 700;
    }

    &:nth-child(1)::after {
      content: '1';
      background: #F7D019;
      color: var(--sato-text);
    }

    &:nth-child(2)::after {
      content: '2';
      background: #ddd;
      color: var(--sato-text);
    }

    &:nth-child(3)::after {
      content: '3';
      background: #854f41;
      color: #fff;
    }
  }

  .pic {
    width: 118px;
    flex-shrink: 0;
  }

  .pic img {
    width: 118px;
    height: 118px;
    aspect-ratio: 1;
    object-fit: cover;
  }

  .info {
    background-color: var(--contents-bg-color);
    flex-grow: 1;
    height: 118px;
    font-size: var(--text-md);
    padding: var(--p-md);
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    overflow: hidden;
  }

  /* Tags - centered with teal border */
  .tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  .tag-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 18px;
    padding: 0 5px;
    border: 1px solid var(--main-color, var(--sato-primary));
    border-radius: 2px;
    background: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    color: var(--main-color, var(--sato-primary));
    white-space: nowrap;
  }

  .price {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 24.708px;
    color: var(--sato-price);
    text-align: center;

    .unit {
      font-size: 14px;
    }
  }

  .spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    font-size: var(--text-sm);
    gap: 2px;

    .rimawari {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 4px;
      width: 100%;
      padding: 1.81px 0px;
      background: var(--sato-info-bg);
      font-weight: 700;
      font-size: 13px;
      line-height: 15.794px;
      text-align: center;
      color: var(--sato-text);

      .red {
        color: var(--sato-price);
      }
    }

    .address {
      text-align: center;
      font-size: 13px;
      line-height: 15.794px;
      color: var(--sato-text);
    }
  }

  .comment {
    display: none;
  }

  .link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
}

/* Ranking Desktop 900px+ - 3 column grid */
@media (min-width: 900px) {
  .scube-ranking {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
    margin-inline: 0;

    .item {
      display: grid;
      grid-template-columns: 120px 1fr;

      .pic {
        width: 120px;
      }

      .pic img {
        width: 100%;
        height: 100%;
      }
    }

    .tag-item {
      font-size: 12px;
      height: 24px;
      padding: 0 5px;
      line-height: 25.6px;
    }

    .price {
      font-size: 16px;
    }
    .price .unit {
      font-size: 12px;
    }

    .spec .rimawari {
      font-size: 12px;
    }

    .spec .address {
      font-size: 13px;
    }
  }
}

.scube-list {
  .pic.stage-negotiation {
    position: relative;

    &::after {
      content: '商談中';
      position: absolute;
      top: 50%;
      left: 50%;
      display: block;
      width: 80px;
      height: 20px;
      background: #e0af1b;
      border-radius: 8px;
      color: var(--text-contrast-color);
      font-size: var(--text-sm);
      line-height: 1.3;
      text-align: center;
      translate: -50% -50%
    }
  }

  .price {
    font-size: var(--text-md);
    @media (min-width: 320px) {
      font-size: var(--text-price);
    }
  }
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* More button - Figma Design */
.more-btn {
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.more-link {
  display: flex;
  width: 300px;
  padding: 16.5px 21px 16.69px 21px;
  flex-direction: column;
  align-items: center;
  border-radius: 3px;
  border: 1px solid #399;
  background-color: #65CBCB;
  background-image: url(../image/Link.png);
  background-size: auto;
  background-repeat: repeat;
  background-position: 0% 0%;
  color: #FFF;
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 19.2px; /* 120% */
}

.more-link:hover {
  opacity: 0.7;
  color: #fff;
}

/* Skeleton loading - nomura-estate pattern */
@keyframes skeltonLoading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skelton-typeA-list {
  display: grid;
  grid-template-areas: "image" "info1" "info2" "info3";
  grid-template-rows: 178px 25px 25px 68px;
  gap: 8px;
  width: 240px;
  max-width: 100%;
  margin-inline: auto;
  background: #fff;
  padding: 0;

  &:not(:nth-child(1)) {
    display: none;
  }

  .item-image {
    aspect-ratio: 238 / 178;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }

  .item {
    height: 18px;
    position: relative;
    width: 80%;
    margin: 0 auto;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }
}

.skelton-typeB-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--gap-md);
  min-width: 272px;
  width: calc((100% - 20px) / 1.2);
  margin: 0 auto;

  &:not(:nth-child(1)) {
    display: none;
  }

  .item-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }

  .item-image {
    aspect-ratio: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }
  .item {
    height: 18px;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }
}

.skelton-typeC-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--gap-md);

  .item-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }

  .item-image {
    aspect-ratio: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }

  .item {
    height: 18px;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }
}

.skelton-ranking-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--gap-md);

  .item-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }

  .item-image {
    aspect-ratio: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }

  .item-block {
    height: 18px;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;

    &::before {
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
      animation: skeltonLoading 1.2s ease-in-out infinite;
    }
  }
}

@media (min-width: 460px) {
  .skelton-typeA-list {
    width: 240px;
  }
  .skelton-typeB-list {
    width: calc((100% - 20px) / 1.8);
  }
}

@media (min-width: 768px) {
  .skelton-typeA-list {
    width: 240px;
    display: grid;
    grid-template-areas: "image" "info1" "info2" "info3";
    grid-template-rows: 178px 25px 25px 68px;
    gap: 8px;

    &:not(:nth-child(1)) {
      display: grid;
    }
  }

  .skelton-typeB-list {
    grid-template-columns: 140px 1fr;
    width: calc(50% - var(--gap-md) / 2);
    margin: unset;

    &:not(:nth-child(1)) {
      display: grid;
    }
  }

  .skelton-typeC-list {
    grid-template-columns: 140px 1fr;
  }

  .skelton-ranking-list {
    grid-template-columns: 120px 1fr;
  }
}
@media (min-width: 900px) {
  .skelton-typeB-list {
    grid-template-columns: 200px 1fr;
  }

  .skelton-typeC-list {
    grid-template-columns: 200px 1fr;
  }

  .skelton-ranking-list {
    grid-template-columns: 120px 1fr;
  }
}
