/* ========================================
   Property Details Page Styles
   ======================================== */

.property-details-page {
  padding: 40px 0 80px;
}

/* Gallery Section */
.gallery-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.gallery-item {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.01);
}

.main-img-wrapper {
  height: 450px;
  border-radius: 16px;
  overflow: hidden;
}

.main-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.secondary-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.secondary-img-wrapper {
  height: 215px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.secondary-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-photos-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: auto;
  top: auto;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  gap: 6px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 50px;
}

/* Info Section */
.info-sidebar-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

/* Property Info Area Premium Refinement */
.property-main-info {
  background: white;
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--neutral-100);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #E6E6E6;
  background: white;
  color: #1A1A1A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.action-btn:hover {
  border-color: var(--primary-green);
  color: var(--primary-green);
  background: var(--primary-green-lighter);
}

.header-labels {
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-badge-inline {
  background: #F0FBF6;
  color: #2DBE7E;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #2DBE7E;
  border-radius: 50%;
}

.sponsored-tag-premium {
  background: #446654;
  color: white;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sponsored-tag-premium i {
  font-size: 12px;
  color: #FFD700;
}

/* Price Section Premium */
.price-section-premium {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 5px;
  color: #232D42;
}

.price-val {
  font-size: 32px;
  font-weight: 800;
}

.currency-symbol-sar {
  font-size: 28px;
  font-weight: 700;
  color: #1A1A1A;
}

.details-title-premium {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin-bottom: 20px;
  text-align: right;
}

.details-location-premium {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 30px;
}

.details-location-premium span {
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

.loc-icon-circle {
  width: 34px;
  height: 34px;
  background: #EAF7F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #31644A;
  font-size: 14px;
}

.details-description-premium {
  font-size: 16px;
  line-height: 1.8;
  color: #999;
  text-align: right;
  margin-bottom: 50px;
  max-width: 100%;
}

.specs-divider {
  height: 1px;
  background: #F0F0F0;
  margin-bottom: 30px;
}

/* Horizontal Specs Grid */
.specs-grid-horizontal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.spec-item-horizontal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.spec-content-h {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.spec-label-h {
  font-size: 14px;
  color: #999;
  font-weight: 500;
  margin-bottom: 4px;
}

.spec-value-h {
  font-size: 18px;
  font-weight: 800;
  color: #1A1A1A;
}

.spec-icon-circle {
  width: 64px;
  height: 64px;
  background: #F2F8F6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #427E62;
  font-size: 24px;
}

.spec-icon-circle img {
  width: 24px;
  height: 24px;
}


/* Advertiser & Form Sidebar */
.details-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.advertiser-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
}

.advertiser-header {
  background: #f4faf8;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.advertiser-logo {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.advertiser-logo img {
  max-width: 60px;
}

.advertiser-body {
  padding: 20px;
  text-align: center;
}

.advertiser-role {
  font-size: 12px;
  color: var(--neutral-500);
  margin-bottom: 5px;
}

.advertiser-name {
  font-weight: 700;
  color: var(--neutral-900);
}

/* Documents Section */
.docs-section {
  background: white;
  border-radius: 16px;
  padding: 30px;
  border: 1px solid var(--neutral-200);
  margin-top: 30px;
  overflow: hidden;
}

.docs-title {
  font-weight: 700;
  margin-bottom: 20px;
  display: block;
}

.docs-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-item {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.doc-item:hover {
  border-color: var(--primary-green);
  background: #f4faf8;
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-name {
  font-size: 13px;
  font-weight: 600;
}

.doc-meta {
  font-size: 10px;
  color: var(--neutral-400);
  display: block;
}

/* Registration Form Refined */
.registration-form-container {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--neutral-100);
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

.form-image-side {
  position: relative;
  background: #f0f7f4;
}

.form-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-overlay-text {
  position: absolute;
  top: 60px;
  right: 40px;
  left: 40px;
  color: #111;
  text-align: right;
  z-index: 2;
}

.form-overlay-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.header-decoration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.decoration-tiny {
  color: var(--secondary-orange);
  font-size: 14px;
}

.form-overlay-header h3 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: #1A1A1A;
  margin: 0;
}

.form-overlay-text p {
  font-size: 16px;
  color: #4D4D4D;
  line-height: 1.6;
}

.decorative-star {
  opacity: 0.8;
}

.form-content-side {
  padding: 50px 60px;
  background: white;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 16px;
  color: #1A1A1A;
}

.required-star {
  color: #E04F5F;
  margin-right: 2px;
}

.form-control-custom {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid #E6E6E6;
  border-radius: 12px;
  background: #ffffff;
  font-size: 15px;
  transition: all 0.3s ease;
  color: #1A1A1A;
}

.form-control-custom::placeholder {
  color: #A3A3A3;
}

.form-control-custom:focus {
  border-color: var(--primary-green);
  outline: none;
  box-shadow: 0 0 0 4px rgba(48, 105, 85, 0.1);
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid #E6E6E6;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  transition: all 0.3s ease;
}

.phone-input-wrapper:focus-within {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 4px rgba(48, 105, 85, 0.1);
}

.country-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: #F5F5F5;
  border-left: 1px solid #E6E6E6;
  cursor: pointer;
  min-width: 110px;
}

.country-selector span {
  font-weight: 600;
  color: #1A1A1A;
  font-size: 14px;
}

.country-selector i {
  font-size: 10px;
  color: #666;
}

.phone-input-wrapper .form-control-custom {
  border: none;
  border-radius: 0;
  padding: 12px 15px;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.btn-submit {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #446654;
  color: white;
  padding: 14px 40px;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background: #34594A;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 89, 74, 0.3);
}

.btn-submit i {
  font-size: 18px;
  transform: rotate(0deg);
  /* Standard for RTL usually works, but let's ensure it looks like the image */
}

/* Similar Ads */
.similar-ads-section {
  margin-top: 80px;
}

.similar-ads-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  direction: rtl;
}

.similar-title-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.similar-title {
  font-size: 32px;
  font-weight: 700;
  color: #111;
  margin: 0;
  position: relative;
  padding-bottom: 15px;
}

.similar-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg width='164' height='8' viewBox='0 0 164 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6C23.5 2.5 45 2.5 66.5 6C88 9.5 109.5 9.5 131 6C142.25 4.25 153.5 3.5 162 2' stroke='%23CD8F65' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.similar-star {
  font-size: 24px;
  color: var(--secondary-color);
}

.nav-btns {
  display: flex;
  gap: 15px;
  direction: ltr;
}

.similar-ads-section .property-grid {
  grid-template-columns: repeat(3, 1fr);
}

.nav-pill {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #E5E7EB;
  color: #9CA3AF;
  transition: all 0.3s ease;
}

.nav-pill.active {
  background: #306955;
  color: white;
  border-color: #306955;
}

/* Responsive Refinements */
@media (max-width: 1200px) {
  .specs-grid-horizontal {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 991px) {

  .gallery-container,
  .info-sidebar-layout,
  .form-layout,
  .registration-form-container .form-layout {
    grid-template-columns: 1fr;
  }

  .details-sidebar {
    order: 2;
  }

  .property-main-content {
    order: 1;
  }

  .form-content-side {
    padding: 30px;
  }

  .form-overlay-text {
    position: relative;
    top: 0;
    right: 0;
    left: 0;
    padding: 40px;
    background: #f0f7f4;
  }

  .form-image-side {
    height: 250px;
  }

  .form-overlay-header h3 {
    font-size: 28px;
  }

  .main-img-wrapper {
    height: 350px;
  }

  .secondary-images {
    flex-direction: row;
  }

  .secondary-img-wrapper {
    flex: 1;
    height: 180px;
  }



  .similar-ads-section .property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .property-details-page {
    padding: 20px 0 40px;
  }

  .info-header {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 20px;
  }

  .action-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  .price-val {
    font-size: 28px;
  }

  .details-title-premium {
    font-size: 22px;
  }

  .specs-grid-horizontal {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .spec-item-horizontal {
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .spec-label-h {
    font-size: 12px;
  }

  .spec-value-h {
    font-size: 14px;
  }

  .spec-icon-circle {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .spec-icon-circle img {
    width: 22px;
    height: 22px;
  }



  .similar-ads-section .property-grid {
    grid-template-columns: 1fr;
  }

  .similar-title {
    font-size: 24px;
  }

  .form-content-side {
    padding: 20px;
  }

  .btn-submit {
    width: 100%;
    justify-content: center;
  }

  .secondary-images {
    gap: 10px;
  }

  .secondary-img-wrapper {
    height: 120px;
  }

  .property-main-info {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .header-labels {
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
  }

  .status-badge-inline,
  .sponsored-tag-premium {
    width: fit-content;
  }
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  position: relative;
  width: 60vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image-container {
  width: 100%;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 20px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

.lightbox-counter {
  color: white;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .lightbox-prev {
    left: 20px;
  }

  .lightbox-next {
    right: 20px;
  }
}

@media (max-width: 768px) {
  .lightbox-content {
    width: 95vw;
  }
}