/* ===========================================================
   Шаблоны страницы объекта — 8 РАЗНЫХ лендингов.
   Блоки общие (header/gallery/info/amenities/map/contacts),
   но каждый скин — самостоятельный дизайн под тип жилья.
   =========================================================== */
.property { padding: 0 0 80px; --accent: var(--lagoon); }
.property__inner { display: flex; flex-direction: column; gap: 26px; padding-top: 28px; }

/* ---- Базовые блоки ---- */
.tpl-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.tpl-block h2 { font-size: 1.5rem; margin-bottom: 16px; color: var(--navy); position: relative; }

.tpl-header { border: 0; background: transparent; padding: 0; box-shadow: none; }
.tpl-badge { display: inline-block; background: var(--accent); color: #fff; padding: 5px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.tpl-badge--vip { background: linear-gradient(135deg, var(--gold), var(--gold-d)); color: var(--navy-d); margin-left: 6px; }
.tpl-badge--verified { background: #1f9d6b; color: #fff; margin-left: 6px; }
.tpl-title { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 14px 0 8px; color: var(--navy); line-height: 1.08; letter-spacing: -.015em; }
.tpl-location { color: var(--muted); display: flex; align-items: center; gap: 7px; margin: 0; }
.tpl-price { margin-top: 16px; font-family: var(--display); font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.tpl-price span { font-size: .9rem; font-weight: 500; color: var(--muted); font-family: var(--font); }

/* Галерея «герой + миниатюры» — устойчива к любому числу фото */
.tpl-gallery { padding: 0; border: 0; background: transparent; box-shadow: none; }
.tpl-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.tpl-gallery__item { display: block; aspect-ratio: 1; background: #e9eef2; overflow: hidden; border-radius: var(--radius-sm); cursor: zoom-in; }
.tpl-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tpl-gallery__item:hover img { transform: scale(1.05); }
.tpl-gallery__item.is-main { grid-column: 1 / -1; aspect-ratio: 16/9; border-radius: var(--radius); }

.tpl-info__text { color: #38505c; font-size: 1.04rem; }
.tpl-amenities__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tpl-amenity { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.tpl-amenity__icon { font-size: 1.15rem; }
.tpl-contacts__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.tpl-contacts__owner { color: var(--muted); }
.tpl-contacts__reveal .hint { margin-top: 8px; }
.tpl-map__canvas { width: 100%; height: 340px; border-radius: var(--radius-sm); overflow: hidden; background: #dde6ec; }

@media (min-width: 760px) {
    .tpl-amenities__list { grid-template-columns: repeat(3, 1fr); }
    .tpl-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ===========================================================
   1. CLASSIC — «Элегантный отель».
      Две колонки, справа липкая navy-карточка контактов,
      золотой акцент-подчёркивание у заголовков секций.
   =========================================================== */
.tpl-classic { --accent: #138A9C; }
.tpl-classic .tpl-block h2::after { content: ""; display: block; width: 46px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 8px; }
.tpl-classic .tpl-header { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.tpl-classic .tpl-amenity { background: #f3f8f9; border-radius: 10px; padding: 11px 13px; }
@media (min-width: 900px) {
    .tpl-classic .property__inner { display: grid; grid-template-columns: 1fr 330px; gap: 26px 30px; align-items: start; }
    .tpl-classic .tpl-header  { grid-column: 1 / -1; }
    .tpl-classic .tpl-gallery, .tpl-classic .tpl-info, .tpl-classic .tpl-amenities, .tpl-classic .tpl-map { grid-column: 1; }
    .tpl-classic .tpl-contacts {
        grid-column: 2; grid-row: 2 / span 20; position: sticky; top: 90px; align-self: start;
        background: linear-gradient(165deg, var(--navy), var(--navy-d)); color: #fff; border: 0;
    }
    .tpl-classic .tpl-contacts h2 { color: #fff; }
    .tpl-classic .tpl-contacts h2::after { background: var(--gold); }
    .tpl-classic .tpl-contacts__owner { color: rgba(255,255,255,.82); }
}

/* ===========================================================
   2. MODERN — «Городские апартаменты». Журнальная вёрстка:
      огромный заголовок, лента-галерея, монохром + 1 акцент.
   =========================================================== */
.tpl-modern { --accent: var(--navy); }
.tpl-modern .property__inner { gap: 46px; max-width: 1040px; margin: 0 auto; }
.tpl-modern .tpl-block { border: 0; box-shadow: none; background: transparent; padding: 0; }
.tpl-modern .tpl-badge { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); text-transform: uppercase; letter-spacing: .12em; }
.tpl-modern .tpl-title { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; }
.tpl-modern .tpl-block h2 { font-size: 2rem; padding-bottom: 8px; border-bottom: 3px solid var(--navy); display: inline-block; }
.tpl-modern .tpl-block h2::after { display: none; }
.tpl-modern .tpl-gallery__grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.tpl-modern .tpl-gallery__item { flex: 0 0 80%; max-width: 560px; scroll-snap-align: center; aspect-ratio: 16/10; }
.tpl-modern .tpl-gallery__item.is-main { aspect-ratio: 16/10; }
.tpl-modern .tpl-amenities__list { gap: 8px 22px; }
.tpl-modern .tpl-amenity { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tpl-modern .tpl-contacts { border: 2px solid var(--navy); border-radius: var(--radius); padding: 30px; }

/* ===========================================================
   3. RESORT — «База отдыха / курорт». Тёплый, солнечный:
      центрированный герой, крупные карточки удобств, золото.
   =========================================================== */
.tpl-resort { --accent: var(--gold-d); background: #fff7ec; }
.tpl-resort .tpl-block { background: #fff; border-color: #f1e2cd; }
.tpl-resort .tpl-block h2 { text-align: center; }
.tpl-resort .tpl-header { text-align: center; background: linear-gradient(135deg, #fff1da, #ffe3b8); border: 1px solid #f1d8b0; padding: 44px 28px; }
.tpl-resort .tpl-header__inner { max-width: 760px; margin: 0 auto; }
.tpl-resort .tpl-location { justify-content: center; }
.tpl-resort .tpl-title { color: #8a5a16; }
.tpl-resort .tpl-price { display: inline-block; margin-top: 18px; background: linear-gradient(135deg, var(--gold), var(--gold-d)); color: #fff; padding: 8px 20px; border-radius: 999px; }
.tpl-resort .tpl-price span { color: rgba(255,255,255,.85); }
.tpl-resort .tpl-amenities__list { gap: 16px; grid-template-columns: repeat(2, 1fr); }
.tpl-resort .tpl-amenity { flex-direction: column; text-align: center; gap: 8px; background: #fff6e9; border: 1px solid #f1e2cd; border-radius: 16px; padding: 20px 14px; font-weight: 600; }
.tpl-resort .tpl-amenity__icon { font-size: 2rem; }
.tpl-resort .tpl-contacts { background: linear-gradient(135deg, #f6a94e, var(--gold-d)); color: #fff; border: 0; text-align: center; }
.tpl-resort .tpl-contacts h2, .tpl-resort .tpl-contacts__owner { color: #fff; }
.tpl-resort .tpl-contacts__owner { color: rgba(255,255,255,.9); }
.tpl-resort .tpl-contacts__actions { justify-content: center; }
@media (min-width: 760px) { .tpl-resort .tpl-amenities__list { grid-template-columns: repeat(4, 1fr); } }

/* ===========================================================
   4. MINIMAL — «Студия / лофт». Узкая колонка, воздух,
      тонкие линии, лёгкая типографика, мало цвета.
   =========================================================== */
.tpl-minimal { --accent: var(--ink); }
.tpl-minimal .property__inner { max-width: 680px; margin: 0 auto; gap: 48px; }
.tpl-minimal .tpl-block { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 30px 0 0; background: transparent; box-shadow: none; }
.tpl-minimal .tpl-block h2 { font-weight: 500; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.tpl-minimal .tpl-block h2::after { display: none; }
.tpl-minimal .tpl-header { border-top: 0; padding-top: 0; }
.tpl-minimal .tpl-title { font-weight: 400; letter-spacing: -.01em; }
.tpl-minimal .tpl-badge { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tpl-minimal .tpl-price { color: var(--ink); font-weight: 600; }
.tpl-minimal .tpl-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.tpl-minimal .tpl-gallery__item.is-main { grid-column: 1 / -1; aspect-ratio: 3/1; }
.tpl-minimal .tpl-amenities__list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tpl-minimal .tpl-amenity { font-weight: 400; color: #44555e; }
.tpl-minimal .tpl-contacts__actions .btn { border-radius: 0; }

/* ===========================================================
   5. GALLERY-FIRST — «Объект-витрина». Фото во главе:
      крупная галерея сверху, контент в 2 колонки под ней.
   =========================================================== */
.property.tpl-gallery { --accent: #0f93a6; }
.tpl-gallery .property__inner { gap: 28px; }
.tpl-gallery .tpl-gallery { order: -1; }
.tpl-gallery .tpl-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tpl-gallery .tpl-gallery__item.is-main { grid-column: 1 / -1; aspect-ratio: 21/9; }
.tpl-gallery .tpl-title { font-size: clamp(2rem, 5vw, 3.1rem); }
.tpl-gallery .tpl-header { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
@media (min-width: 900px) {
    .tpl-gallery .property__inner { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
    .tpl-gallery .tpl-gallery { grid-column: 1 / -1; }
    .tpl-gallery .tpl-header, .tpl-gallery .tpl-info, .tpl-gallery .tpl-amenities, .tpl-gallery .tpl-map { grid-column: 1; }
    .tpl-gallery .tpl-contacts { grid-column: 2; grid-row: 2 / span 20; position: sticky; top: 90px; }
}

/* ===========================================================
   6. BUSINESS — «Бизнес-отель». Строгий корпоративный:
      navy-баннер, прямые углы, структурная сетка.
   =========================================================== */
.tpl-business { --accent: var(--navy); }
.tpl-business .tpl-block { border-radius: 4px; }
.tpl-business .tpl-block h2::after { content: ""; display: block; width: 40px; height: 3px; background: var(--gold); margin-top: 8px; }
.tpl-business .tpl-header { background: linear-gradient(120deg, var(--navy-d), #1c4a63); color: #fff; border-radius: 4px; padding: 46px 40px; }
.tpl-business .tpl-header .tpl-title { color: #fff; }
.tpl-business .tpl-header .tpl-location { color: rgba(255,255,255,.82); }
.tpl-business .tpl-header .tpl-price { color: var(--gold); }
.tpl-business .tpl-badge { background: var(--gold); color: var(--navy-d); border-radius: 3px; }
.tpl-business .tpl-gallery__item { border-radius: 2px; }
.tpl-business .tpl-amenity { background: #f3f6f8; border-radius: 3px; padding: 12px; }
@media (min-width: 900px) {
    .tpl-business .property__inner { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
    .tpl-business .tpl-header, .tpl-business .tpl-gallery { grid-column: 1 / -1; }
    .tpl-business .tpl-info, .tpl-business .tpl-amenities, .tpl-business .tpl-map { grid-column: 1; }
    .tpl-business .tpl-contacts { grid-column: 2; grid-row: 3 / span 20; position: sticky; top: 90px; background: #fff; border: 2px solid var(--navy); border-radius: 4px; }
}

/* ===========================================================
   7. COZY — «Гостевой дом». Уютный, тёплый розовый,
      мягкие скругления, пилюли-удобства, дружелюбно.
   =========================================================== */
.tpl-cozy { --accent: #b56576; background: #fff7f8; }
.tpl-cozy .property__inner { max-width: 860px; margin: 0 auto; }
.tpl-cozy .tpl-block { background: #fff; border-color: #f0dadf; border-radius: 26px; }
.tpl-cozy .tpl-block h2 { color: #8c4a59; }
.tpl-cozy .tpl-header { background: transparent; border: 0; box-shadow: none; text-align: center; }
.tpl-cozy .tpl-header__inner { max-width: 680px; margin: 0 auto; }
.tpl-cozy .tpl-location { justify-content: center; }
.tpl-cozy .tpl-title { color: #8c4a59; }
.tpl-cozy .tpl-title::after { content: " 🏡"; }
.tpl-cozy .tpl-price { color: #b56576; }
.tpl-cozy .tpl-gallery__item { border-radius: 18px; }
.tpl-cozy .tpl-gallery__grid { gap: 14px; }
.tpl-cozy .tpl-amenities__list { display: flex; flex-wrap: wrap; gap: 10px; }
.tpl-cozy .tpl-amenity { background: #fbeef1; border: 1px solid #f0dadf; border-radius: 999px; padding: 9px 16px; }
.tpl-cozy .tpl-contacts { background: #fff; border: 2px dashed #e3b8c1; text-align: center; }
.tpl-cozy .tpl-contacts__actions { justify-content: center; }
.tpl-cozy .tpl-contacts .btn { border-radius: 999px; }

/* ===========================================================
   8. SEASIDE — «У моря». Морской градиент, волна под шапкой,
      аква-палитра, чипы-удобства.
   =========================================================== */
.tpl-seaside { --accent: var(--lagoon); }
.tpl-seaside .tpl-block { background: linear-gradient(180deg, #f1fafc, #fff); border-color: #cfe7ee; }
.tpl-seaside .tpl-header {
    position: relative; background: linear-gradient(135deg, var(--navy-d), var(--lagoon)); color: #fff;
    border: 0; padding: 46px 32px 64px; border-radius: var(--radius);
}
.tpl-seaside .tpl-header .tpl-title { color: #fff; }
.tpl-seaside .tpl-header .tpl-location { color: rgba(255,255,255,.85); }
.tpl-seaside .tpl-header .tpl-price { color: #F4D7A1; }
.tpl-seaside .tpl-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px;
    background: radial-gradient(circle at 13px -8px, transparent 13px, #fff 14px) repeat-x; background-size: 26px 26px;
}
.tpl-seaside .tpl-block h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--lagoon); border-radius: 2px; margin-top: 8px; }
.tpl-seaside .tpl-amenities__list { display: flex; flex-wrap: wrap; gap: 10px; }
.tpl-seaside .tpl-amenity { background: #e6f5f9; border-radius: 999px; padding: 9px 15px; }
.tpl-seaside .tpl-contacts { background: linear-gradient(135deg, var(--lagoon), var(--navy)); color: #fff; border: 0; }
.tpl-seaside .tpl-contacts h2 { color: #fff; }
.tpl-seaside .tpl-contacts h2::after { background: var(--gold); }
.tpl-seaside .tpl-contacts__owner { color: rgba(255,255,255,.85); }

/* -----------------------------------------------------------
   Превью шаблонов в визарде (мини-свотчи на карточке)
   ----------------------------------------------------------- */
.tpl-prev-classic       { background: linear-gradient(135deg, #138A9C, #3FAEBE); }
.tpl-prev-modern        { background: linear-gradient(135deg, #0E3A53, #138A9C); }
.tpl-prev-resort        { background: linear-gradient(135deg, #C98A3C, #E0A458); }
.tpl-prev-minimal       { background: linear-gradient(135deg, #ffffff, #e2eaed); border-bottom: 3px solid #14242E; }
.tpl-prev-gallery-first { background: linear-gradient(135deg, #138A9C, #9bd6dd); }
.tpl-prev-business      { background: linear-gradient(135deg, #0E3A53, #3a6378); }
.tpl-prev-cozy          { background: linear-gradient(135deg, #b56576, #e8b4bc); }
.tpl-prev-seaside       { background: linear-gradient(135deg, #0E3A53, #cfe7ee); }
