/*
 * Author: Msc. Brian Morales
 * Date: November 2026
 * Description: Castro CRM Bridge - property page and listings: dollar line under the colones, modern gallery, share buttons, Spanish inquiry form, wider listing, favorites / print / saved searches hidden.
 * Version: 1.2 (larger description text; share block with labels at the end of the description)
 */

:root {
  --cs-gold: #c9a227;
  --cs-gold-dark: #9e741e;
  --cs-ink: #0e0d12;
  --cs-text: #1d1d22;
  --cs-muted: #5d5d66;
  --cs-line: #e7e2d4;
}

.cs-hidden { display: none !important; }

/* ---------- Prices: colones first, dollars below ---------- */
.cs-usd {
  display: block;
  margin-top: 2px;
  font-size: 0.72em;
  font-weight: 500;
  color: var(--cs-muted);
  letter-spacing: 0;
}
.listing_unit_price_wrapper .cs-usd { font-size: 12px; }

/* ---------- No user profiling: favorites, print and saved searches off ---------- */
#add_favorites,
#print_page,
.single_property_action.share_list,
.icon-fav,
.save_search_wrapper,
#save_search_button,
.search_alert_wrapper,
.add_favorites_wrapper { display: none !important; }

/* ---------- Description: larger, easier to read ---------- */
#propertydescription,
#propertydescription p,
#propertydescription li,
#propertydescription .elementor-widget-container,
#propertydescription .wpestate_property_description { font-size: 16px !important; line-height: 1.8 !important; color: #2b2b31 !important; }
#propertydescription h1, #propertydescription h2, #propertydescription h3, #propertydescription h4:not(.cs-share-title) { font-size: 22px !important; }
.listing_detail { font-size: 15px !important; line-height: 1.7 !important; }
@media (max-width: 767px) {
  #propertydescription, #propertydescription p, #propertydescription li { font-size: 15.5px !important; }
}

/* ---------- Share block (end of the description) ---------- */
.cs-share { margin: 28px 0 8px; padding-top: 22px; border-top: 1px solid var(--cs-line); }
.cs-share-title { margin: 0 0 12px; font-size: 17px !important; font-weight: 600; color: var(--cs-ink); letter-spacing: .2px; }
.cs-share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-share-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 1px solid var(--cs-line); background: #fff; color: var(--cs-text);
  font-size: 14px; font-weight: 600; text-decoration: none !important; cursor: pointer;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.cs-share-btn svg { width: 19px; height: 19px; flex: 0 0 auto; }
.cs-share-btn:hover, .cs-share-btn:focus-visible { transform: translateY(-2px); color: #fff; outline: none; }
.cs-share-whatsapp:hover, .cs-share-whatsapp:focus-visible { background: #1f8f4e; border-color: #1f8f4e; }
.cs-share-facebook:hover, .cs-share-facebook:focus-visible { background: #1877f2; border-color: #1877f2; }
.cs-share-instagram:hover, .cs-share-instagram:focus-visible { background: #c13584; border-color: #c13584; }
.cs-share-mail:hover, .cs-share-mail:focus-visible { background: var(--cs-ink); border-color: var(--cs-ink); }
.cs-share-linkedin:hover, .cs-share-linkedin:focus-visible { background: #0a66c2; border-color: #0a66c2; }
.cs-share-note { display: block; margin-top: 8px; font-size: 13px; color: #1f7a45; min-height: 1em; }
@media (max-width: 480px) {
  .cs-share-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .cs-share-btn { justify-content: center; }
}

/* ---------- Gallery (beside the description, next to the contact card) ---------- */
.cs-gallery { width: 100%; max-width: 1400px; margin: 0 auto 28px; padding: 0 16px; box-sizing: border-box; }
.cs-gallery.cs-gallery-inline { max-width: none; padding: 0; margin: 0 0 32px; }
.cs-gallery-stage {
  position: relative; overflow: hidden; border-radius: 14px; background: #111114;
  aspect-ratio: 16 / 10; max-height: 640px; width: 100%; cursor: zoom-in; outline: none;
  box-shadow: 0 10px 30px rgba(14, 13, 18, 0.12);
}
.cs-gallery-stage:focus-visible { box-shadow: 0 0 0 3px var(--cs-gold); }
.cs-gallery-img { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .25s; }
.cs-gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(14, 13, 18, 0.55); color: #fff; cursor: pointer; padding: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s, background .2s, color .2s;
}
.cs-gallery-nav svg { width: 22px; height: 22px; }
.cs-gallery-stage:hover .cs-gallery-nav, .cs-gallery-stage:focus-within .cs-gallery-nav { opacity: 1; }
.cs-gallery-nav:hover, .cs-gallery-nav:focus-visible { background: var(--cs-gold); border-color: var(--cs-gold); color: #111; outline: none; }
.cs-prev { left: 16px; }
.cs-next { right: 16px; }
.cs-gallery-full {
  position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; padding: 7px 12px;
  background: rgba(14, 13, 18, 0.55); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .3px; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s, color .2s;
}
.cs-gallery-full svg { width: 16px; height: 16px; }
.cs-gallery-full:hover, .cs-gallery-full:focus-visible { background: var(--cs-gold); border-color: var(--cs-gold); color: #111; outline: none; }
.cs-gallery-counter {
  position: absolute; left: 14px; top: 14px; border-radius: 8px; padding: 6px 10px;
  background: rgba(14, 13, 18, 0.55); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.cs-gallery-thumbs {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 6 * 8px) / 7);
  gap: 8px; overflow-x: auto; padding: 10px 0 2px; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.cs-gallery-thumb {
  aspect-ratio: 3 / 2; width: 100%; border-radius: 8px; border: 2px solid transparent;
  background-color: #eee; background-size: cover; background-position: center; cursor: pointer; padding: 0;
  opacity: 0.6; scroll-snap-align: start; transition: opacity .15s, border-color .15s;
}
.cs-gallery-thumb[aria-selected="true"] { opacity: 1; border-color: var(--cs-gold); }
.cs-gallery-thumb:hover, .cs-gallery-thumb:focus-visible { opacity: 1; outline: none; }
@media (hover: none) { .cs-gallery-nav { opacity: 1; } }
@media (max-width: 767px) {
  .cs-gallery { padding: 0 8px; }
  .cs-gallery.cs-gallery-inline { padding: 0; }
  .cs-gallery-stage { border-radius: 10px; aspect-ratio: 4 / 3; }
  .cs-gallery-nav { width: 38px; height: 38px; }
  .cs-gallery-full span { display: none; }
  .cs-gallery-thumbs { grid-auto-columns: 22%; }
}
.pswp { --pswp-bg: #0e0d12; z-index: 2147483000 !important; }

/* ---------- Inquiry form (Spanish, to the CRM) ---------- */
.cs-inquiry { display: grid; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--cs-text); }
.cs-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f1eee6; border-radius: 12px; padding: 4px; }
.cs-tabs button {
  border: 0; border-radius: 9px; padding: 9px 6px; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--cs-muted);
}
.cs-tabs button[aria-selected="true"] { background: #fff; color: var(--cs-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.cs-field { display: grid; gap: 4px; margin: 0; }
.cs-field > span { font-size: 12px; font-weight: 600; color: var(--cs-muted); }
.cs-inquiry input[type="text"], .cs-inquiry input[type="tel"], .cs-inquiry input[type="email"],
.cs-inquiry input[type="date"], .cs-inquiry select, .cs-inquiry textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--cs-line); border-radius: 10px;
  padding: 9px 12px; background: #fff; font: inherit; color: inherit; box-sizing: border-box;
}
.cs-inquiry textarea { min-height: 84px; resize: vertical; }
.cs-inquiry input:focus, .cs-inquiry select:focus, .cs-inquiry textarea:focus { border-color: var(--cs-gold); outline: 2px solid rgba(201, 162, 39, 0.25); }
.cs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cs-visit { display: grid; gap: 10px; }
.cs-visit.cs-hidden { display: none !important; }
.cs-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--cs-muted); margin: 0; }
.cs-consent input { margin-top: 3px; accent-color: var(--cs-gold-dark); }
.cs-consent a { color: var(--cs-gold-dark); text-decoration: underline; }
.cs-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cs-submit {
  min-height: 46px; border: 0; border-radius: 10px; background: var(--cs-ink); color: #fff;
  font-weight: 700; letter-spacing: .5px; cursor: pointer; transition: background .15s;
}
.cs-submit:hover, .cs-submit:focus-visible { background: var(--cs-gold-dark); outline: none; }
.cs-submit:disabled { opacity: 0.6; cursor: wait; }
.cs-form-status { font-size: 13px; line-height: 1.5; min-height: 1em; }
.cs-form-status.cs-ok { color: #1f7a45; font-weight: 600; }
.cs-form-status.cs-error { color: #b3261e; font-weight: 600; }

/* ---------- Listing: wider, larger cards ---------- */
@media (min-width: 1200px) {
  .page-template-property_list .container,
  .page-template-property_list_half .container,
  .tax-property_category .container,
  .tax-property_action_category .container { max-width: 1440px; }
}
.listing_wrapper .property_listing { border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.listing_wrapper .property_listing:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12); }
