/* Trang lưu trú — clone Shirakawa /stay/ */

:root {
  --stay-brand: #335017;
  --stay-brand-dark: #6a4022;
  --stay-brand-border: #8f5a32;
  --stay-accent-orange: #c96a28;
  --stay-accent-orange-dark: #a85620;
  --stay-lime: #c4d644;
  --stay-lime-light: #d4e06a;
  --stay-lime-border: #a8bf3a;
  --stay-page-bg: #f0efe9;
  --stay-green: #335017;
  --stay-hero-min-h: clamp(240px, 32vw, 400px);
}

.stay-page {
  background: var(--stay-page-bg);
}

/* === Hero === */
.stay-hero {
  position: relative;
  width: 100%;
  min-height: var(--stay-hero-min-h);
  background-image: var(--stay-hero-image);
  background-size: cover;
  background-position: center;
}

.stay-hero-overlay {
  position: relative;
  min-height: var(--stay-hero-min-h);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.12) 50%,
    rgba(0, 0, 0, 0.04) 100%
  );
}

.stay-hero-title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.stay-hero-jp {
  margin: 0;
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.12em;
}

.stay-hero-en {
  margin: 0.5rem 0 0;
  font-family: "Crimson Text", Georgia, serif;
  font-size: clamp(1.25rem, 1rem + 0.6vw, 1.625rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.stay-hero-breadcrumb {
  align-self: flex-start;
  width: 100%;
  margin-inline: 0;
  margin-bottom: 0.25rem;
}

.stay-hero-breadcrumb--detail {
  width: 100%;
}

/* Breadcrumb sáng — hero & trang chi tiết */
.stay-topicpath--light .stay-topicpath-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 0.5rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.875rem, 0.75rem + 0.45vw, 1.25rem);
  font-weight: 500;
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.stay-topicpath--light .stay-topicpath-list a {
  color: #fff;
  text-decoration: none;
  opacity: 0.88;
}

.stay-topicpath--light .stay-topicpath-list a:hover {
  opacity: 1;
  text-decoration: underline;
}

.stay-topicpath--light .stay-topicpath-list li[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  opacity: 1;
}

.stay-topicpath--light .stay-topicpath-list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* === Main layout === */
.stay-main {
  position: relative;
  z-index: 2;
  padding-bottom: 4rem;
}

.stay-refine-shell {
  max-width: 960px;
  margin: -2rem auto 0;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem);
  position: relative;
  z-index: 20;
}

/* Texture nền brand — bg_gasagasa.png trên nền xanh */
.stay-brand-textured {
  position: relative;
  overflow: hidden;
}

.stay-refine-wrap.stay-brand-textured {
  overflow: visible;
}

.stay-brand-textured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/common/bg_gasagasa.png");
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

/* === Refine box (tmp_refine) === */
.stay-refine-wrap {
  background: var(--stay-brand);
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.stay-refine-form {
  display: block;
}

.stay-refine-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.875rem, 0.75rem + 0.35vw, 1.25rem) clamp(1rem, 0.875rem + 0.5vw, 1.5rem);
  background: transparent;
  color: #fff;
  font-family: "Noto Sans", sans-serif;
  font-size: clamp(1.1875rem, 1rem + 0.65vw, 1.5625rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 2;
}

.stay-refine-head-icon {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.4375rem);
  line-height: 1;
  opacity: 0.85;
}

.stay-refine-box {
  background: #fff;
  margin: 0 4px 4px;
  border: 2px solid var(--stay-brand-border);
  outline: 2px solid #fff;
  outline-offset: -4px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.stay-refine-inner {
  padding: 0.25rem 0;
  overflow: visible;
}

.stay-refine-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e8e6e1;
}

@media (min-width: 640px) {
  .stay-refine-row {
    grid-template-columns: 7rem 1fr;
    align-items: flex-start;
    padding: 1rem 1.75rem;
  }
}

@media (min-width: 768px) {
  .stay-refine-row {
    grid-template-columns: 8.5rem 1fr;
  }
}

.stay-refine-row--last {
  border-bottom: none;
  padding-bottom: 1.25rem;
  position: relative;
  z-index: 30;
  overflow: visible;
}

.stay-refine-row dt {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1c1917;
  padding-top: 0.125rem;
}

.stay-refine-row dd {
  margin: 0;
  min-width: 0;
}

.stay-refine-static {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--stay-green);
}

.stay-refine-input {
  width: 100%;
  max-width: 100%;
  border: 1px solid #d6d3d1;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  background: #fafaf9;
  box-sizing: border-box;
}

.stay-refine-input:focus {
  outline: 2px solid rgba(168, 191, 58, 0.45);
  border-color: var(--stay-lime-border);
}

.stay-search-field {
  position: relative;
  max-width: 32rem;
  z-index: 40;
}

.stay-refine-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.5rem;
}

.stay-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #292524;
  user-select: none;
}

.stay-checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stay-checkbox-mask {
  width: 1.0625rem;
  height: 1.0625rem;
  border: 1px solid #a8a29e;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}

.stay-checkbox-input:checked + .stay-checkbox-mask {
  background: var(--stay-green);
  border-color: var(--stay-green);
}

.stay-checkbox-input:checked + .stay-checkbox-mask::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.06rem;
  width: 0.3rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.stay-refine-clear {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #78716c;
  text-decoration: underline;
}

.stay-refine-clear:hover {
  color: #44403c;
}

/* Deco + green band */
.stay-deco-wrap {
  max-width: 960px;
  margin: 1.5rem auto 0;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem);
}

.stay-yado-band {
  background: var(--stay-brand);
  padding: clamp(1rem, 0.75rem + 0.6vw, 1.375rem) clamp(1.25rem, 1rem + 1.2vw, 2rem);
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.28);
  outline: 2px solid #fff;
  outline-offset: -5px;
}

.stay-yado-band-text {
  margin: 0;
  color: #fff;
  font-size: clamp(1.0625rem, 0.9rem + 0.55vw, 1.3125rem);
  line-height: 1.5;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 2;
}

.stay-yado-band-text strong {
  font-weight: 700;
}

/* Turbo frame + results */
.stay-results-frame,
#homestay_results {
  display: block;
  width: 100%;
}

.stay-results {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem clamp(1rem, 1.5625vw, 1.875rem) 0;
}

.stay-results--hub {
  padding-top: 3rem;
  max-width: 1200px;
  margin-inline: auto;
}

.stay-hub-lead {
  text-align: center;
  color: #57534e;
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
}

/* Autocomplete */
.homestay-suggest-list {
  position: absolute;
  z-index: 100;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d6d3d1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  max-height: 16rem;
  overflow-y: auto;
}

.homestay-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  color: #292524;
}

.homestay-suggest-item:hover,
.homestay-suggest-item.is-active {
  background: #f5f5f4;
}

.homestay-suggest-name {
  font-weight: 500;
}

.homestay-suggest-hint {
  font-size: 0.75rem;
  color: #78716c;
  white-space: nowrap;
}

/* Breadcrumb */
.stay-topicpath-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stay-topicpath-list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: #78716c;
}

.stay-topicpath-list a {
  color: inherit;
  text-decoration: none;
}

.stay-topicpath-list a:hover {
  text-decoration: underline;
}

/* Counter */
.stay-counter {
  margin-bottom: 1.75rem;
  padding: 0.875rem 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  font-size: 0.9375rem;
  color: #44403c;
  line-height: 1.6;
}

.stay-counter em {
  font-style: normal;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--stay-green);
}

.stay-empty {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  color: #57534e;
}

/* Grid */
.stay-block-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 1.25rem;
}

@media (min-width: 640px) {
  .stay-block-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stay-block-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.5rem;
  }
}

@media (min-width: 1440px) {
  .stay-block-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Cards */
.stay-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.stay-item {
  background: #fff;
  height: 100%;
  border: 1px solid #e7e5e4;
  transition: box-shadow 0.25s, transform 0.25s;
}

.stay-item-link:hover .stay-item {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.stay-item-image {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #e7e5e4;
}

.stay-item-image-inner {
  display: block;
  aspect-ratio: 480 / 350;
  overflow: hidden;
}

.stay-item-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.stay-item-link:hover .stay-item-photo {
  transform: scale(1.04);
}

.stay-item-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  color: #a8a29e;
  font-size: 0.875rem;
}

.stay-cate-s {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0.4rem 0.75rem;
  background: var(--stay-brand);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 88%;
}

.stay-cate-m {
  padding: 0.625rem 0.875rem 0;
}

.stay-cate-a {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #57534e;
}

.stay-item-title {
  margin: 0.5rem 0.875rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--stay-green);
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(1rem, 0.95rem + 0.12vw, 1.125rem);
  font-weight: 700;
  line-height: 1.45;
  color: #1c1917;
}

.stay-item-link:hover .stay-item-title {
  color: var(--stay-green);
}

.stay-item-text {
  padding: 0.75rem 0.875rem 1.125rem;
  font-size: 0.8125rem;
  line-height: 1.75;
  color: #57534e;
}

.stay-item-text p {
  margin: 0;
}

.stay-item-owner {
  margin-top: 0.625rem !important;
  font-size: 0.75rem;
  color: #78716c;
}

/* Hub */
.stay-hub-card {
  display: block;
  background: #fff;
  border: 1px solid #e7e5e4;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.stay-hub-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--stay-lime-border);
}

.stay-hub-card-label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-olive, #878265);
  margin: 0 0 0.5rem;
}

.stay-hub-card-title {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #1c1917;
}

.stay-hub-card:hover .stay-hub-card-title {
  color: var(--stay-green);
}

.stay-hub-card-desc {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #57534e;
  line-height: 1.6;
}

.stay-hub-card-count {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: #78716c;
}

/* === Detail page === */

.homestay-detail-top {
  position: relative;
  --homestay-cover-height: clamp(240px, 52vw, 300px);
  --homestay-cover-gap: clamp(1rem, 1.75vw, 1.5rem);
  --homestay-cover-path-depth: 0.65;
}

@media (min-width: 768px) {
  .homestay-detail-top {
    --homestay-cover-height: clamp(240px, 42vw, 500px);
  }
}

.homestay-detail-top__align,
.homestay-detail-cover-shell,
.homestay-detail-body {
  width: 90%;
  max-width: none;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .homestay-detail-top__align {
    width: calc(91.6667% - var(--public-nav-menu-inset));
    margin-left: auto;
    margin-right: var(--public-nav-menu-inset);
  }

  .homestay-detail-cover-shell {
    width: 91.6667%;
    margin-left: auto;
    margin-right: 0;
  }

  .homestay-detail-body {
    --homestay-cover-offset-left: calc(100% - 91.6667%);
    width: calc(91.6667% - var(--public-nav-menu-inset));
    margin-left: var(--homestay-cover-offset-left);
    margin-right: var(--public-nav-menu-inset);
  }
}

/* --- Cover đè lên nền path (SP + PC) --- */

.homestay-detail-top:has(.homestay-detail-cover-shell) .homestay-page-hero {
  padding-bottom: calc(var(--homestay-cover-gap) + var(--homestay-cover-height) * var(--homestay-cover-path-depth));
}

.homestay-detail-top:has(.homestay-detail-cover-shell) .homestay-detail-top__align {
  padding-bottom: var(--homestay-cover-gap);
}

.homestay-detail-cover-shell {
  margin-top: calc(-1 * (var(--homestay-cover-gap) + var(--homestay-cover-height) * var(--homestay-cover-path-depth)));
  padding: 0;
  position: relative;
  z-index: 2;
}

.homestay-detail-cover-badges {
  position: absolute;
  top: clamp(0.75rem, 1.5vw, 1.25rem);
  left: clamp(0.75rem, 1.5vw, 1.25rem);
  z-index: 3;
  gap: clamp(0.375rem, 1vw, 0.625rem);
  max-width: calc(100% - 2 * clamp(0.75rem, 1.5vw, 1.25rem));
  filter: drop-shadow(0 3px 10px rgba(153, 27, 27, 0.45)) drop-shadow(0 1px 4px rgba(220, 38, 38, 0.35));
}

.homestay-detail-hero-badges .homestay-badge {
  font-size: clamp(0.75rem, 0.6875rem + 0.28vw, 0.9375rem);
  padding: clamp(0.28rem, 0.55vw, 0.4rem) clamp(0.55rem, 1.1vw, 0.8rem);
  line-height: 1.35;
}

.homestay-detail-top:not(:has(.homestay-detail-cover-shell)) .homestay-page-hero {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

.homestay-page-hero {
  width: 100%;
  background-image: var(--shirakawa-wood);
  background-size: cover;
  background-position: center;
  position: relative;
}

.homestay-detail-top__align {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(1.125rem, 2.5vw, 1.75rem);
  padding: clamp(1rem, 2vw, 1.5rem) 0 0;
}

.homestay-detail-hero-row {
  display: flex;
  flex-direction: column;
  gap: clamp(1.125rem, 2.5vw, 1.625rem);
  width: 100%;
}

@media (max-width: 1023px) {
  .homestay-page-hero__path {
    order: 1;
  }

  .homestay-detail-hero-row .homestay-detail-hero-badges {
    order: 2;
  }
}

.homestay-page-hero__path {
  width: 100%;
  max-width: none;
  margin-left: 0;
  text-align: left;
}

.homestay-page-hero__path .stay-topicpath--light .stay-topicpath-list {
  justify-content: flex-start;
  font-size: clamp(0.6875rem, 0.625rem + 0.22vw, 0.8125rem);
  line-height: 1.45;
}

.homestay-detail-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.homestay-detail-title--hero {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.125rem);
  width: 100%;
  min-width: 0;
}

/* Line sau tên — solid + dashed (kiểu Shirakawa tmp_h3_pat4) */
.homestay-detail-title--hero .line,
.homestay-detail-title--cover .line {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  position: relative;
  height: clamp(3px, 0.35vw, 4px);
  align-self: center;
}

.homestay-detail-title--hero .line::before,
.homestay-detail-title--cover .line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: clamp(4em, 12vw, 135px);
  background: rgba(255, 255, 255, 0.9);
}

.homestay-detail-title--hero .line::after,
.homestay-detail-title--cover .line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  margin-top: -0.5px;
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.9) 0,
    rgba(255, 255, 255, 0.9) 6px,
    transparent 6px,
    transparent 9px
  );
  background-size: 9px 1px;
  background-repeat: repeat-x;
}

.homestay-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

.homestay-detail-cover-title-box {
  display: none;
}

/* --- Desktop: cover căn phải (kiểu home), path + tag cùng hàng, tên trong cover --- */

@media (min-width: 1024px) {
  .homestay-detail-top__align {
    gap: clamp(0.75rem, 1.25vw, 1rem);
    padding-top: clamp(1rem, 1.75vw, 1.5rem);
  }

  .homestay-detail-hero-row {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(1rem, 2vw, 2rem);
  }

  .homestay-detail-top:has(.homestay-detail-cover-shell) .homestay-detail-hero-row {
    justify-content: flex-end;
  }

  .homestay-page-hero__path {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }

  .homestay-page-hero__path .stay-topicpath--light .stay-topicpath-list {
    justify-content: flex-end;
  }

  .homestay-detail-cover {
    position: relative;
  }

  .homestay-detail-cover-title-box {
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--stay-brand);
    padding: clamp(1rem, 1.75vw, 1.375rem) clamp(1.25rem, 2vw, 2rem);
    z-index: 2;
  }

  .homestay-detail-cover-title-box::after {
    z-index: 0;
  }

  .homestay-detail-title--cover {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: none;
    margin: 0;
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    width: 100%;
    min-width: 0;
    flex: 1;
  }

  .homestay-detail-title--hero-mobile-only {
    display: none;
  }
}

.homestay-detail-body {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3rem);
  padding-inline: 0;
}

.homestay-detail-top:has(.homestay-detail-cover-shell) + .homestay-detail-body {
  padding-top: clamp(0.625rem, 1.25vw, 1rem);
}

.homestay-detail-owner-shell {
  width: 100%;
  margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
}

@media (min-width: 1024px) {
  .homestay-detail-owner-shell {
    width: calc(100% + var(--public-nav-menu-inset));
    max-width: none;
  }
}

.homestay-detail-body:has(.homestay-contact-actions--floating) {
  padding-bottom: calc(clamp(2rem, 4vw, 3rem) + 8rem);
}

@media (min-width: 1024px) {
  .homestay-detail-body:has(.homestay-contact-actions--floating) {
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }
}

.homestay-detail-owner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 1.5vw, 1.5rem);
  padding: clamp(1.125rem, 2vw, 1.625rem) clamp(1.25rem, 2.5vw, 2rem);
  background: #fff;
  border: 1px solid #e7e5e4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.homestay-detail-owner-info {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.5vw, 1.5rem);
}

.homestay-contact-actions-shell {
  width: 100%;
  margin-bottom: clamp(1.75rem, 3vw, 2.25rem);
}

@media (min-width: 1024px) {
  .homestay-contact-actions-shell {
    display: flex;
    justify-content: center;
  }
}

.homestay-detail-owner-name {
  margin: 0;
  color: #44403c;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.5;
}

.homestay-detail-owner-name strong {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 700;
  color: #1c1917;
}

/* --- Contact actions (Gọi / Zalo / Chỉ đường) --- */

.homestay-contact-actions--inline {
  display: none;
}

.homestay-contact-actions--floating {
  display: flex;
  position: fixed;
  right: 0;
  bottom: clamp(2rem, 6vh, 3.5rem);
  z-index: 35;
}

@media (min-width: 1024px) {
  .homestay-contact-actions--inline {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .homestay-contact-actions--floating {
    display: none;
  }

  .homestay-contact-actions--inline .homestay-contact-actions__box {
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
  }

  .homestay-contact-actions--inline .homestay-contact-btn {
    width: 3.5rem;
    height: 3.5rem;
  }

  .homestay-contact-actions--inline .homestay-contact-btn__icon svg {
    width: 1.375rem;
    height: 1.375rem;
  }

  .homestay-contact-actions--inline .homestay-contact-btn__icon--zalo {
    font-size: 1rem;
  }
}

.homestay-contact-actions__box {
  display: flex;
}

.homestay-contact-actions--inline .homestay-contact-actions__box {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.homestay-contact-actions--floating .homestay-contact-actions__box {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.homestay-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  text-decoration: none;
  border: 1px solid #e7e5e4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.homestay-contact-actions--floating .homestay-contact-btn {
  width: 3.25rem;
  height: 3rem;
  padding-right: 0.125rem;
  border-radius: 9999px 0 0 9999px;
  border-right: none;
  box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.14);
}

.homestay-contact-btn:hover {
  transform: translateY(-1px);
}

.homestay-contact-actions--floating .homestay-contact-btn:hover {
  transform: translateX(-2px);
}

.homestay-contact-btn--call {
  color: #fff;
  background: var(--stay-brand);
  border-color: var(--stay-brand);
}

.homestay-contact-btn--call:hover {
  background: #263c11;
  border-color: #263c11;
  color: #fff;
}

.homestay-contact-btn--zalo {
  color: #fff;
  background: #0068ff;
  border-color: #0068ff;
}

.homestay-contact-btn--zalo:hover {
  background: #0056d6;
  border-color: #0056d6;
  color: #fff;
}

.homestay-contact-btn--map {
  color: var(--stay-brand);
  background: #fff;
  border-color: #c8a96e;
}

.homestay-contact-btn--map:hover {
  background: #f7f4ed;
  color: #263c11;
}

.homestay-contact-btn.stay-brand-textured::after {
  border-radius: inherit;
}

.homestay-contact-btn.stay-brand-textured .homestay-contact-btn__icon {
  position: relative;
  z-index: 2;
}

.homestay-contact-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.homestay-contact-btn__icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.homestay-contact-actions--floating .homestay-contact-btn__icon svg {
  width: 1.1875rem;
  height: 1.1875rem;
}

.homestay-contact-btn__icon--zalo {
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
}

.homestay-contact-actions--floating .homestay-contact-btn__icon--zalo {
  font-size: 0.875rem;
}

.homestay-detail-title {
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.homestay-detail-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid #e7e5e4;
  display: block;
  height: var(--homestay-cover-height);
  max-height: var(--homestay-cover-height);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.homestay-detail-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.homestay-gallery-section {
  margin-bottom: 2.5rem;
}

.homestay-gallery-media {
  width: 100%;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .homestay-gallery-media {
    width: 50%;
    max-width: 50%;
  }
}

.homestay-gallery-grid {
  display: grid;
  gap: 0.375rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .homestay-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 1 ảnh: căn giữa, max-height 600px */
.homestay-gallery-grid:has(> :only-child) {
  grid-template-columns: 1fr;
}

.homestay-gallery-grid:has(> :only-child) .homestay-gallery-item {
  aspect-ratio: auto;
  max-height: 600px;
}

.homestay-gallery-grid:has(> :only-child) .homestay-gallery-thumb {
  max-height: 600px;
  object-fit: contain;
  background: #f5f5f4;
}

/* 4 ảnh: lưới 2×2 */
.homestay-gallery-grid:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

/* 5 ảnh: 3 trên + 2 dưới căn giữa */
.homestay-gallery-grid:has(> :nth-child(5):last-child) {
  grid-template-columns: repeat(6, 1fr);
}

.homestay-gallery-grid:has(> :nth-child(5):last-child) .homestay-gallery-item {
  grid-column: span 2;
}

.homestay-gallery-grid:has(> :nth-child(5):last-child) .homestay-gallery-item:nth-child(4) {
  grid-column: 2 / span 2;
}

.homestay-gallery-grid:has(> :nth-child(5):last-child) .homestay-gallery-item:nth-child(5) {
  grid-column: 4 / span 2;
}

.homestay-gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 0.25rem;
  background: #f5f5f4;
  cursor: zoom-in;
  text-decoration: none;
}

.homestay-gallery-item:focus-visible {
  outline: 2px solid var(--stay-brand);
  outline-offset: 2px;
}

.homestay-gallery-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.homestay-gallery-item:hover .homestay-gallery-thumb {
  transform: scale(1.04);
}

.homestay-section-heading {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(1rem, 2vw, 1.25rem);
}

.homestay-section-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(0.625rem, 1vw, 0.875rem) clamp(1.25rem, 2.5vw, 2rem);
  background: var(--stay-brand);
  color: #fff;
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  border-radius: 9999px;
  position: relative;
  z-index: 0;
  box-sizing: border-box;
}

.homestay-section-title.stay-brand-textured::after {
  z-index: 0;
  border-radius: inherit;
}

.homestay-back-link-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
  border-top: 1px solid #e7e5e4;
}

.homestay-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(0.75rem, 1.1vw, 1rem) clamp(1.375rem, 2.75vw, 2.25rem);
  background: var(--stay-accent-orange);
  color: #fff;
  font-family: "Noto Serif", Georgia, serif;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 9999px;
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  transition: background-color 0.2s ease, filter 0.2s ease;
}

.homestay-back-link:hover {
  background: var(--stay-accent-orange-dark);
  color: #fff;
  text-decoration: none;
}

.homestay-back-link.stay-brand-textured::after {
  z-index: 0;
  border-radius: inherit;
}

.homestay-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.homestay-info-table th,
.homestay-info-table td {
  border: 1px solid #e7e5e4;
  padding: 0.75rem 1rem;
  vertical-align: top;
}

.homestay-info-table th {
  background: #fafaf9;
  width: 30%;
  font-weight: 600;
  color: #44403c;
  white-space: nowrap;
}

.homestay-map-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #e7e5e4;
}

@media (min-width: 1024px) {
  .homestay-map-frame {
    max-width: 70%;
    margin-inline: auto;
  }
}

@media (min-width: 1440px) {
  .homestay-map-frame {
    max-width: 50%;
  }
}

.homestay-prose {
  line-height: 1.8;
  color: #44403c;
  white-space: pre-line;
}

.homestay-avatar-lg {
  width: clamp(5.5rem, 4.75rem + 2.5vw, 7rem);
  height: clamp(5.5rem, 4.75rem + 2.5vw, 7rem);
  object-fit: cover;
  border: 2px solid #e7e5e4;
  border-radius: 0.25rem;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.homestay-badge {
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ddd;
  color: #335017;
  font-weight: 600;
}

.homestay-badge--area {
  position: relative;
  overflow: hidden;
  background: #f0671a;
  color: #fff;
  border-color: #e55f18;
}
