﻿/* ============================================
   HOME MARKET — Components
   ============================================ */

/* ---- Gold shimmer animation ---- */
@keyframes goldShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmerSlide {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,110,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(201,169,110,0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  font-family: 'Onest', sans-serif;
  white-space: nowrap;
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

/* Primary — gold shimmer */
.btn-primary {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
  background-size: 300% 100%;
  color: var(--navy-deep);
  font-weight: 700;
  animation: goldShimmer 4s ease infinite;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,169,110,0.45);
  animation-duration: 1.5s;
}
.btn-primary:active { transform: translateY(0); }

/* Secondary — navy outline */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* Ghost — gold outline */
.btn-ghost {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-ghost:hover {
  background: var(--gold);
  color: var(--navy-deep);
  transform: translateY(-2px);
}

/* White — on dark bg */
.btn-white {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}
.btn-white:hover {
  background: var(--gold-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Sizes */
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 18px 36px; font-size: 17px; }

/* Icon button */
.btn-icon {
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-hot {
  background: linear-gradient(90deg, #E74C3C, #C0392B, #E74C3C);
  background-size: 200%;
  animation: goldShimmer 2.5s ease infinite;
  color: #fff;
}
.badge-discount {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
  background-size: 300%;
  animation: goldShimmer 3s ease infinite;
  color: var(--navy-deep);
}
.badge-new {
  background: var(--navy);
  color: var(--white);
}
.badge-sold {
  background: var(--text3);
  color: var(--white);
}

/* ---- Property Card ---- */
.prop-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--t-base);
  display: flex;
  flex-direction: column;
  position: relative;
}
.prop-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.prop-card:hover .prop-card__img img {
  transform: scale(1.06);
}
.prop-card__img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e8e4de;
}
.prop-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.prop-card__badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
  z-index: 2;
}
.prop-card__fav {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: var(--t-fast);
  z-index: 2;
  cursor: pointer;
  border: none;
}
.prop-card__fav:hover { background: var(--white); transform: scale(1.1); }
.prop-card__fav svg { width: 18px; height: 18px; color: var(--text3); transition: var(--t-fast); }
.prop-card__fav.active svg { color: #E74C3C; fill: #E74C3C; }

.prop-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.prop-card__type { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.prop-card__title {
  font-family: 'Cormorant', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.prop-card__location {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text3);
}
.prop-card__location svg { width: 14px; height: 14px; flex-shrink: 0; }

.prop-card__specs {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.prop-card__spec {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text2);
}
.prop-card__spec svg { width: 15px; height: 15px; color: var(--gold); }

.prop-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px;
}
.prop-card__price {
  font-family: 'Cormorant', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.prop-card__price-old {
  font-size: 13px;
  color: var(--text3);
  text-decoration: line-through;
  margin-top: 2px;
}
.prop-card__price-drop {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

/* Gold accent on hover — left border */
.prop-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
  opacity: 0;
  transition: opacity var(--t-base);
  border-radius: 0 0 0 var(--r-lg);
}
.prop-card:hover::before { opacity: 1; }

/* ---- Form elements ---- */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text2); }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  transition: var(--t-fast);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,169,110,0.12);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text3); }
.form-textarea { resize: vertical; min-height: 100px; }

.consent-label {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text3); cursor: pointer;
}
.consent-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--gold); }
.consent-label a { color: var(--gold); text-decoration: underline; }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(27,58,75,0.06);
  padding: 4px;
  border-radius: var(--r-full);
  width: fit-content;
}
.tab {
  padding: 10px 22px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  transition: var(--t-base);
  cursor: pointer;
  border: none;
  background: none;
}
.tab.active {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.tab:not(.active):hover { color: var(--navy); background: rgba(27,58,75,0.08); }

/* ---- Rating stars ---- */
.stars { display: flex; gap: 3px; }
.star { width: 16px; height: 16px; color: var(--gold); }

/* ---- Skeleton loader ---- */
.skeleton {
  background: linear-gradient(90deg, #f0ebe3 25%, #faf7f2 50%, #f0ebe3 75%);
  background-size: 200%;
  animation: shimmerSlide 1.5s infinite;
  border-radius: var(--r-sm);
}

/* ---- Floating WhatsApp/TG ---- */
.float-contacts {
  position: fixed;
  right: 24px; bottom: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: var(--z-header);
}
.float-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--t-base);
  position: relative;
}
.float-btn:hover { transform: scale(1.1) translateY(-2px); }
.float-btn-wa { background: #25D366; color: #fff; }
.float-btn-tg { background: #0088CC; color: #fff; }
.float-btn-max { background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%); color: #fff; }
.float-btn svg { width: 26px; height: 26px; }
.header-msg-btn.max { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.footer-social.max { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.float-tip {
  position: absolute;
  right: 62px; top: 50%;
  transform: translateY(-50%);
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.float-btn:hover .float-tip { opacity: 1; }
