/* ==================================
   PROPERTY PAGE
================================== */

.page-property{

  background:var(--white);

  color:var(--text);

}

.property-content{

  display:flex;

  flex-direction:column;

  gap:var(--space-md);

  height:100%;

}

/* ==================================
   LAYOUT
================================== */

.page-grid{

  display:grid;

  grid-template-columns:
    minmax(0,1fr)
    minmax(0,1fr);

  gap:var(--gap-xl);

  align-items:start;

}

.page-grid > *{

  min-width:0;

}

.property-media{

  width:100%;

  min-width:0;

}

.property-content{

  display:flex;

  flex-direction:column;

  min-width:0;

  height:100%;

}

/* ==================================
   DESCRIPTION
================================== */

.page-description{

    width:100%;

    max-width:100%;

    color:var(--text-soft);

    font-size:var(--text-md);

    line-height:1.9;

    max-height:320px;

    overflow:hidden;

    transition:max-height .35s ease;

}

@media (min-width:768px){

  .page-description{

    overflow:hidden;

    transition:
      max-height var(--transition-base);

  }

.page-description.expanded{

    overflow: visible;

}

}

/* ==================================
   IMAGE
================================== */

.main-image{

  width:100%;

  aspect-ratio:4 / 5;

  display:block;

  object-fit:cover;

  border-radius:var(--radius-lg);

}

.gallery-title{

  text-align:center;

  font-family:var(--font-heading);

  font-size:var(--text-3xl);

  font-weight:600;

  color:var(--text);

}

/* ==================================
   TYPOGRAPHY
================================== */

.page-ref{

  color:var(--text-muted);

  opacity:.85;

  font-size:var(--text-xs);

  font-weight:500;

  letter-spacing:1.5px;

  text-transform:uppercase;

}

.page-type{

  color:var(--gold);

  font-size:var(--text-xs);

  font-weight:500;

  letter-spacing:2px;

  text-transform:uppercase;

}

.page-title{

    color:var(--text);

    max-width:14ch;

    font-family:var(--font-heading);

    font-size:var(--text-3xl);

    font-weight:600;

    line-height:1.08;

    letter-spacing:-0.02em;

}

/* ==================================
   PRICE
================================== */

.page-price{

  color:var(--text);

  font-size:var(--text-2xl);

  font-weight:300;

  line-height:1.1;

}

.page-price-period{

  margin-left:var(--space-2xs);

  color:var(--text-muted);

  font-size:var(--text-xs);

}

.page-price-note{

  max-width:420px;

  color:var(--text-muted);

  opacity:.75;

  font-size:var(--text-xs);

  line-height:1.6;

  font-style:italic;

}

/* ==================================
   META
================================== */

.property-meta span{

  display:inline-flex;

  align-items:center;

  padding:
    var(--space-xs)
    var(--space-sm);

  border:1px solid var(--border);

  border-radius:var(--radius-pill);

  background:var(--bg);

  color:var(--text-soft);

  font-size:var(--text-sm);

  font-weight:500;

}


/* ==================================
   READ MORE
================================== */

.read-more{

  display:inline-flex;

  align-items:center;

  gap:var(--gap-xs);

  margin-top:var(--space-md);

  padding:0;

  border:none;

  background:none;

  color:var(--gold);

  font-size:var(--text-sm);

  font-weight:500;

  line-height:1;

  cursor:pointer;

  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast),
    color var(--transition-fast);

}

.read-more:hover{

  opacity:.8;

  color:var(--gold-light);

}

.read-more:active{

  transform:scale(.98);

}

.read-more:focus-visible{

  outline:none;

  box-shadow:
    0 0 0 3px rgba(255,255,255,.12),
    0 0 0 6px rgba(184,135,70,.18);

}

/* ==================================
   GALLERY
================================== */

.gallery{

  width:100%;

}


.gallery-grid{

  display:grid;

  grid-template-columns:

    repeat(

      auto-fit,

      minmax(

        280px,

        1fr

      )

    );

  gap:var(--gap-md);

  width:100%;

}


.gallery-item{

  width:100%;

}

.gallery-item img,

.gallery-grid img{

  display:block;

  width:100%;

  aspect-ratio:3 / 4;

  object-fit:cover;

  border-radius:var(--radius-lg);

}

/* ==================================
   CONTACT
================================== */

.contact-section{

  padding:var(--space-xl) 0;

  text-align:center;

  color:var(--white);

  background:

    linear-gradient(

      135deg,

      var(--gold),

      var(--gold-light)

    );

}

.contact-section h2{

  margin-bottom:var(--space-sm);

  font-family:var(--font-heading);

  font-size:var(--text-3xl);

  font-weight:600;

  line-height:1.1;

  color:var(--white);

}


/* ==================================
   WHATSAPP BUTTON
================================== */

.whatsapp-main-btn{

  display:inline-flex;

  align-items:center;

  justify-content:center;

  min-height:var(--btn-height-sm);

  padding:
    0
    var(--space-md);

  border:none;

  border-radius:var(--radius-pill);

  background:var(--white);

  color:var(--text);

  font-size:var(--text-sm);

  font-weight:500;

  cursor:pointer;

  box-shadow:

    var(--shadow-md);

  transition:

    transform var(--transition-base),

    box-shadow var(--transition-base);

}

.whatsapp-main-btn:hover{

  transform:translateY(-1px);

  box-shadow:

    var(--shadow-lg);

}

.whatsapp-main-btn:active{

  transform:scale(.98);

}


/* ==================================
   SHARE
================================== */

.share-wrap{

  display:flex;

  justify-content:flex-start;

}

.share-btn{

  display:inline-flex;

  align-items:center;

  gap:var(--gap-xs);

  padding:
  var(--space-xs)
  var(--space-md);

  background:var(--bg);

  border:1px solid var(--border);

  border-radius:var(--radius-pill);

  color:var(--text);

  font-size:var(--text-sm);

  font-weight:500;

  cursor:pointer;

  transition:

    background var(--transition-base),

    border-color var(--transition-base),

    transform var(--transition-base),

    box-shadow var(--transition-base);

}

.share-btn:hover{

  background:var(--white);

  border-color:

    rgba(199,122,42,.20);

  transform:

    translateY(-1px);

  box-shadow:

    var(--shadow-sm);

}

.share-btn:active{

  transform:scale(.98);

}

.share-icon{

  color:var(--gold);

  font-size:var(--text-lg);

}


/* ==================================
   SIMILAR
================================== */

.similar-section{

  width:100%;

}


.similar-header{

  display:flex;

  flex-direction:column;

  align-items:center;

  gap:var(--gap-xs);

  margin-bottom:var(--space-lg);

}


.similar-title{

  margin:0;

  text-align:center;

  color:var(--text);

  font-family:var(--font-heading);

  font-size:var(--text-3xl);

  font-weight:600;

  line-height:1.1;

}


.similar-subtitle{

  width:100%;

  max-width:var(--content-narrow);

  margin:0 auto;

  text-align:center;

  color:var(--text-muted);

  font-size:var(--text-md);

  line-height:1.8;

}


.similar-grid{

  display:grid;

  grid-template-columns:

    repeat(

      auto-fit,

      minmax(

        280px,

        1fr

      )

    );

  gap:var(--gap-md);

  width:100%;

}


/* ==================================
   MOBILE
================================== */

@media (max-width:767px){

  .page-grid{
    grid-template-columns:1fr;
    gap:var(--gap-lg);
  }

 .page-title{
    max-width:12ch;
    font-size:var(--text-2xl);
    line-height:1.1;

}

  .page-price{
    font-size:var(--text-xl);
  }

  .gallery-grid,
  .similar-grid{
    grid-template-columns:1fr;
    justify-items:center;
  }

  .gallery-item,
  .listing-item{
    width:100%;
    max-width:340px;
  }

  .contact-section h2{
    font-size:var(--text-2xl);
  }

  .whatsapp-main-btn{
    width:min(100%,320px);
  }

.page-description{
    max-height:320px;
    overflow:hidden;
}

  .gallery.section{
    display:none;
  }

}

/* ==================================
   MOBILE HERO
================================== */

.property-hero-mobile{
    display:none;
}

@media (max-width:767px){

    .property-hero-desktop{
        display:none;
    }

    .property-hero-mobile{
        display:block;
        position:relative;
        overflow:hidden;
        border-radius:var(--radius-lg);
    }

    .hero-track{
        display:flex;
        flex-wrap:nowrap;
        transition:transform var(--transition-base);
        touch-action:pan-y;
    }

    .hero-slide{
        flex:0 0 100%;
    }

    .hero-slide img{
        width:100%;
        display:block;
        pointer-events:none;
    }

    .hero-prev,
    .hero-next{

        position:absolute;
        top:50%;
        transform:translateY(-50%);

        width:var(--btn-height-sm);
        height:var(--btn-height-sm);

        border:none;
        border-radius:50%;

        background:rgba(255,255,255,.88);
        backdrop-filter:blur(var(--glass-blur));

        color:var(--text);

        font-size:var(--text-xl);
        line-height:var(--btn-height-sm);

        cursor:pointer;

        z-index:10;

        box-shadow:var(--shadow-md);

        transition:
            background var(--transition-fast),
            transform var(--transition-fast);

    }

    .hero-prev{
        left:var(--space-sm);
    }

    .hero-next{
        right:var(--space-sm);
    }

    .hero-counter{

    position:absolute;

    right:var(--space-sm);
    bottom:var(--space-sm);

    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:4px;

    width:auto;

    padding:
        var(--space-xs)
        var(--space-sm);

    border-radius:var(--radius-pill);

    background:rgba(0,0,0,.45);

    color:var(--white);

    font-size:var(--text-sm);
    font-weight:500;

    white-space:nowrap;

    z-index:10;

    backdrop-filter:blur(var(--glass-blur));

}

}

/* ==================================
   SMALL MOBILE
================================== */

@media (max-width:390px){

    .property-hero-mobile{
        border-radius:var(--radius-md);
    }

    .hero-prev,
    .hero-next{

        width:40px;
        height:40px;

        line-height:40px;

        font-size:var(--text-lg);

        left:var(--space-xs);

    }

    .hero-next{
        left:auto;
        right:var(--space-xs);
    }

    .hero-counter{

    right:var(--space-xs);
    bottom:var(--space-xs);

    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:4px;

    width:auto;
    min-width:unset;

    padding:
        6px
        10px;

    font-size:var(--text-xs);
    line-height:1;

    white-space:nowrap;

}

   .page-title{

    max-width:90%;
    margin:0 auto;
    text-align:center;
    font-size:clamp(1.9rem,7vw,2.2rem);
    line-height:1.12;
    letter-spacing:-0.02em;

}

    .page-price{
        font-size:var(--text-lg);
    }

    .property-meta span{

    padding:6px 10px;

    font-size:13px;

}

    .main-image{
        aspect-ratio:4 / 4.6;
    }

}
/* =========================================
   ADD PROPERTY — PHOTO PREVIEW
========================================= */

.photo-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    width: 100%;
}

.photo-preview-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f3f3;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.photo-preview-image {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.photo-preview-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.96);
}

.photo-preview-actions button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.photo-preview-actions button:hover {
    background: #f1f1f1;
}

.photo-preview-main {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.94);
    font-size: 12px;
    font-weight: 600;
}

.photo-error {
    margin-top: 10px;
    color: #b42318;
    font-size: 14px;
}

@media (max-width: 900px) {
    .photo-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .photo-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .photo-preview-image {
        height: 130px;
    }

    .photo-preview-actions {
        gap: 3px;
        padding: 5px;
    }

    .photo-preview-actions button {
        width: 28px;
        height: 28px;
    }
}


/* =========================================
   ADD PROPERTY — VERTICAL PHOTO PREVIEW
========================================= */

.photo-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin-top: 18px;
}

.photo-preview-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    background: #f5f5f5;
}

.photo-preview-image-wrap {
    position: relative;
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: #eee;
}

.photo-preview-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-main {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 5px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.94);
    font-size: 12px;
    font-weight: 600;
}

.photo-preview-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px;
    background: #fff;
}

.photo-btn {
    width: 31px;
    height: 31px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

.photo-btn:hover {
    background: #f0f0f0;
}

.photo-btn:active {
    transform: scale(0.94);
}

.photo-btn-remove {
    color: #b42318;
}

.photo-error {
    margin-top: 10px;
    color: #b42318;
    font-size: 14px;
}

@media (max-width: 1000px) {

    .photo-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .photo-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .photo-preview-image-wrap {
        height: 240px;
    }

}

@media (max-width: 450px) {

    .photo-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .photo-preview-image-wrap {
        height: 210px;
    }

    .photo-preview-actions {
        gap: 3px;
        padding: 5px;
    }

    .photo-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

}


/* Add Property — hide native file count */
.page-add-property input[type="file"] {
    font-size: 0;
}

.page-add-property input[type="file"]::file-selector-button {
    font-size: 14px;
}


/* =========================================
   ADD PROPERTY — FORM
========================================= */

.page-add-property .property-form {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.page-add-property .form-section {
    margin-bottom: 32px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.page-add-property .form-section h2 {
    margin: 0 0 20px;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text);
}

.page-add-property .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.page-add-property .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-add-property .form-field label,
.page-add-property .form-section > label,
.page-add-property .language-options + label {
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 500;
}

.page-add-property input,
.page-add-property select,
.page-add-property textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text);
    font: inherit;
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.page-add-property input:focus,
.page-add-property select:focus,
.page-add-property textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(199, 122, 42, .10);
}

.page-add-property textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.7;
}

.page-add-property .language-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.page-add-property .lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--bg);
}

.page-add-property .lang-option input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.page-add-property .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.page-add-property .form-actions .btn {
    min-width: 220px;
}

/* Native photo input */

.page-add-property input[type="file"] {
    min-height: 48px;
    padding: 8px;
    cursor: pointer;
}

/* Phone */

.page-add-property .phone-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
}

/* Mobile */

@media (max-width: 700px) {

    .page-add-property .form-section {
        padding: 18px;
        margin-bottom: 20px;
    }

    .page-add-property .form-grid {
        grid-template-columns: 1fr;
    }

    .page-add-property .language-options {
        grid-template-columns: 1fr;
    }

    .page-add-property .phone-row {
        grid-template-columns: 105px minmax(0, 1fr);
    }

    .page-add-property .form-actions .btn {
        width: 100%;
        min-width: 0;
    }

}

