/*
Theme Name: Susana Mardones Propiedades
Description: Tema a medida para el sitio de corretaje de Susana Mardones. Requiere el plugin SM Propiedades.
Version: 0.1.0
Text Domain: susana-mardones
*/

/* Fuentes globales: defaults del tema. Ajustes → Tipografía los sobrescribe
   inyectando un :root con las familias elegidas (ver sm_fonts_root_css). */
:root{--sm-font-display:'Fraunces',serif;--sm-font-heading:'Poppins',sans-serif;--sm-font-body:'DM Sans',sans-serif}
/* Transición entre páginas (mejora progresiva). Navegadores sin soporte
   (Firefox, versiones viejas) navegan normal, sin efecto.
   - root: fundido global suave de ~200ms.
   - sm-prop-*: morph de la imagen de cada propiedad (card → galería del detalle).
     El nombre único por propiedad se inyecta inline en card-propiedad.php,
     front-page.php (destacada) y single-propiedad.php (contenedor de galería). */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.2s;animation-timing-function:ease}
::view-transition-group(*){animation-duration:.2s;animation-timing-function:ease}
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

*{margin:0;padding:0;box-sizing:border-box}
body{font-family:var(--sm-font-body);color:#5b6172;background:#fff;-webkit-font-smoothing:antialiased}
a{text-decoration:none;color:inherit}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,textarea,select{font-family:inherit}
select:focus,input:focus,textarea:focus{outline:1px solid #bd9a5c;outline-offset:2px}
::-webkit-scrollbar{height:8px;width:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#cfd4e6;border-radius:8px}
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

.sm-menu{list-style:none;display:flex;align-items:center;gap:30px;margin:0;padding:0}
.sm-menu a{color:rgba(255,255,255,.92)}
.sm-menu a:hover{color:#fff}
.sm-menu .current-menu-item>a,.sm-menu .current_page_item>a{font-weight:600;color:#fff}
.sm-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;margin:0 4px;border:1px solid #e1e5ef;border-radius:7px;color:#1b2a4a;font-weight:600;font-size:13px}
.sm-pagination .page-numbers.current{background:#1b2a4a;color:#fff;border-color:#1b2a4a}

.sm-gallery-shell{position:relative}
.sm-property-gallery{border-radius:14px;overflow:hidden;box-shadow:0 18px 48px rgba(29,39,70,.10);background:#e9ecf7}
.sm-property-gallery .swiper-slide{position:relative;height:560px;background:#e9ecf7}
.sm-property-gallery img,.sm-gallery-placeholder{width:100%;height:100%;display:block;object-fit:cover}
.sm-gallery-caption{position:absolute;left:18px;bottom:16px;font-size:10px;letter-spacing:1px;color:rgba(255,255,255,.72);text-shadow:0 2px 8px rgba(0,0,0,.32)}
.sm-gallery-nav{position:absolute;top:50%;z-index:5;transform:translateY(-50%);width:42px;height:42px;border-radius:50%;background:rgba(15,22,44,.72);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;backdrop-filter:blur(4px)}
.sm-gallery-nav:hover{background:#1b2a4a;color:#e7cf9e}
.sm-gallery-prev{left:16px}.sm-gallery-next{right:16px}
.sm-gallery-pagination{position:absolute!important;left:0!important;right:0!important;bottom:16px!important;z-index:4}
.sm-gallery-pagination .swiper-pagination-bullet{background:#fff;opacity:.55}.sm-gallery-pagination .swiper-pagination-bullet-active{background:#bd9a5c;opacity:1}
.sm-property-gallery-thumbs{margin-top:12px;padding:2px 1px 4px}
.sm-property-gallery-thumbs .swiper-slide{height:92px;border:2px solid transparent;border-radius:10px;overflow:hidden;opacity:.62;background:none;padding:0}
.sm-property-gallery-thumbs .swiper-slide-thumb-active{border-color:#bd9a5c;opacity:1}
.sm-property-gallery-thumbs img{width:100%;height:100%;display:block;object-fit:cover}
.sm-video-panel{background:linear-gradient(160deg,#1f3052 0%,#172541 60%,#0f1a30 100%);border-radius:18px;padding:30px;position:relative;overflow:hidden;box-shadow:0 22px 55px rgba(15,26,48,.16)}
.sm-video-panel::after{content:"";position:absolute;top:-95px;right:-80px;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.06);pointer-events:none}
.sm-video-inner{position:relative;z-index:1;max-width:980px;margin:0 auto}
.sm-video-head{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;margin-bottom:18px}
.sm-video-kicker{display:inline-flex;align-items:center;gap:8px;background:rgba(189,154,92,.18);color:#e7cf9e;font-size:11px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;padding:6px 13px;border-radius:999px;margin-bottom:12px}
.sm-video-kicker span{width:7px;height:7px;border-radius:50%;background:#bd9a5c;display:inline-block}
.sm-video-head h2{font-family:var(--sm-font-heading);font-weight:600;font-size:24px;color:#fff;line-height:1.2;margin:0}
.sm-video-head p{font-size:14px;color:rgba(255,255,255,.62);margin-top:8px;max-width:520px}
.sm-video-open{font-size:13px;color:#e7cf9e;font-weight:700;white-space:nowrap;display:inline-flex;align-items:center;gap:7px;background:rgba(255,255,255,.07);border:1px solid rgba(231,207,158,.2);border-radius:999px;padding:9px 13px}
.sm-video-open:hover{background:rgba(189,154,92,.18)}
.sm-video-embed{position:relative;border-radius:14px;overflow:hidden;background:#0f1a30;box-shadow:0 18px 42px rgba(0,0,0,.24)}
.sm-video-embed iframe,.sm-video-embed video{width:100%;aspect-ratio:16/9;height:auto;display:block;border:0}
.sm-video-embed iframe,.sm-video-embed video{position:relative;z-index:1}
.sm-video-embed::after{content:"";position:absolute;top:16px;right:16px;z-index:3;width:150px;height:45px;background:url("assets/logo-mas-corretaje.png") center/contain no-repeat;opacity:.72;filter:drop-shadow(0 4px 12px rgba(0,0,0,.45));pointer-events:none}
.sm-protected-video{-webkit-user-select:none;user-select:none}
.sm-tour-embed iframe{min-height:640px;aspect-ratio:16/9;background:#0f1a30}
.sm-tour-modal{position:fixed;inset:0;z-index:2147483000;background:#0f1a30;display:none;flex-direction:column}
.sm-tour-modal.is-open{display:flex}
.sm-tour-modal-head{height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 18px;background:#0e1830;border-bottom:1px solid rgba(255,255,255,.12);color:#fff}
.sm-tour-modal-head strong{font-family:var(--sm-font-heading);font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sm-tour-modal-head button{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;font-size:28px;line-height:1}
.sm-tour-modal iframe{flex:1;width:100%;height:100%;border:0;background:#0f1a30}
body.sm-tour-lock{overflow:hidden}
.sm-video-links{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;font-size:12.5px;color:rgba(255,255,255,.58)}
.sm-video-links a{display:inline-flex;align-items:center;border:1px solid rgba(189,154,92,.28);background:rgba(255,255,255,.06);color:#fff;border-radius:999px;padding:8px 12px;font-weight:600}
.sm-video-links a:hover{border-color:#bd9a5c;color:#e7cf9e}
.sm-video-slider{position:relative;overflow:hidden;border-radius:14px;padding-bottom:34px}
.sm-video-slider .swiper-slide{height:auto}
.sm-video-slider .sm-gallery-pagination{bottom:4px!important}
.sm-video-caption{margin-top:12px;font-size:14px;font-weight:600;color:#5b6172}

/* Visor multimedia con pestañas (Fotos / Video / Tour 360) */
.sm-media-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;height:40px}
/* Bajar el panel lateral para que la tarjeta de precio alinee con la imagen,
   no con la barra de pestañas (40px alto + 14px margen). */
.sm-detail-rail{margin-top:54px}
.sm-media-tab{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:#6b7284;background:#fff;border:1px solid #e7eaf2;border-radius:10px;padding:9px 15px;cursor:pointer;transition:all .18s ease}
.sm-media-tab:hover{border-color:#cdd2e0;color:#1d2746}
.sm-media-tab.is-active{background:#1b2a4a;border-color:#1b2a4a;color:#fff}
.sm-media-tab.is-active .sm-media-count{background:rgba(255,255,255,.18);color:#e7cf9e}
.sm-media-tab svg{flex:none}
.sm-media-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#f0f2f7;color:#8990a3;font-size:11.5px;font-weight:700}
.sm-media-panel[hidden]{display:none}
.sm-media-panel .sm-property-gallery .swiper-slide{height:460px}
.sm-media-panel .sm-video-embed,.sm-media-panel .sm-tour-embed{border-radius:14px}
.sm-tour-block{position:relative}
.sm-tour-fs{position:absolute;top:14px;left:14px;z-index:4;font-size:12.5px;font-weight:700;color:#e7cf9e;background:rgba(15,22,44,.72);border:1px solid rgba(231,207,158,.25);border-radius:999px;padding:8px 13px;backdrop-filter:blur(4px)}
.sm-tour-fs:hover{background:#1b2a4a}
.sm-media-panel .sm-tour-embed iframe{min-height:460px}

/* Panel lateral: specs compactos junto al precio */
.sm-rail-specs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}
.sm-rail-spec{background:#f8f9fc;border:1px solid #eef0f5;border-radius:10px;padding:12px 13px}
.sm-rail-spec-ico{color:#bd9a5c;display:block;margin-bottom:6px}
.sm-rail-spec-val{display:block;font-family:var(--sm-font-heading);font-weight:600;font-size:16px;color:#1d2746;line-height:1.2}
.sm-rail-spec-lab{display:block;font-size:11.5px;color:#9aa1b0;margin-top:1px}
.sm-mobile-price{display:none;margin-top:14px;align-items:baseline;gap:10px;flex-wrap:wrap}
.sm-mobile-price span{font-size:12.5px;color:#9aa1b0;letter-spacing:.4px}
.sm-mobile-price strong{font-family:var(--sm-font-heading);font-weight:600;font-size:26px;color:#1b2a4a}

/* Campos del formulario de consulta marcados al validar */
[data-sm-lead-form] .sm-field-error{border-color:#e0735f !important;background:#fff6f4 !important;box-shadow:0 0 0 3px rgba(224,115,95,.12)}

/* Tarjetas de la columna izquierda con espaciado uniforme */
.sm-detail-blocks{display:flex;flex-direction:column;gap:18px;margin-top:24px}
.sm-detail-card{background:#fff;border:1px solid #eef0f5;border-radius:14px;padding:26px 30px}
.sm-detail-card-title{font-family:var(--sm-font-heading);font-weight:600;font-size:20px;color:#1d2746;margin-bottom:14px}
.sm-detail-table{display:grid;grid-template-columns:1fr 1fr;gap:2px 40px}

@media (max-width:1024px){
  [data-r="grid4"]{grid-template-columns:repeat(2,1fr)!important}
  [data-r="grid3"]{grid-template-columns:repeat(2,1fr)!important}
  [data-r="grid3b"]{grid-template-columns:repeat(2,1fr)!important}
  [data-r="footergrid"]{grid-template-columns:repeat(2,1fr)!important}
  [data-r="featgrid"]{grid-template-columns:1fr!important}
  [data-r="featimg"]{min-height:240px!important}
  [data-r="herotitle"]{font-size:42px!important}
  [data-r="main"]{grid-template-columns:1fr!important}
  .sm-mobile-price{display:flex}
  .sm-detail-rail{margin-top:0}
}
@media (max-width:980px){
  [data-r="aside"]{position:static!important}
  .sm-property-gallery .swiper-slide{height:460px}
  [data-r="gallery"]{grid-template-columns:1fr!important;grid-template-rows:none!important}
  [data-r="galmain"]{grid-column:auto!important;grid-row:auto!important;height:320px!important}
  [data-r="simgrid"]{grid-template-columns:1fr!important}
}
@media (max-width:680px){
  [data-r="topbar"]{flex-direction:column;gap:10px;text-align:center}
  [data-r="herologo"],[data-r="logo"]{height:82px!important}
  [data-r="nav"]{flex-wrap:wrap;justify-content:center;gap:12px 18px!important}
  [data-r="navbtn"]{display:none!important}
  [data-r="navphone"]{display:none!important}
  [data-r="herotitle"]{font-size:32px!important}
  [data-r="heropad"]{padding:54px 22px 64px!important}
  [data-r="searchcard"]{flex-direction:column;align-items:stretch!important;gap:0!important;padding:30px 20px 22px!important}
  [data-r="searchfield"]{border-right:none!important;border-bottom:1px solid #eceef4;padding:14px 4px!important}
  [data-r="searchcard"] button{width:100%;margin-top:16px}
  [data-r="grid3"],[data-r="grid3b"],[data-r="grid4"],[data-r="grid21"],[data-r="footergrid"]{grid-template-columns:1fr!important}
  [data-r="sect"]{padding-left:20px!important;padding-right:20px!important}
  [data-r="sectiontitle"]{font-size:26px!important}
  [data-r="titlerow"]{flex-direction:column;align-items:flex-start!important;gap:16px}
  [data-r="ptitle"]{font-size:26px!important}
  [data-r="specgrid"]{grid-template-columns:1fr 1fr!important}
  [data-r="amenities"]{grid-template-columns:1fr 1fr!important}
  .sm-detail-table{grid-template-columns:1fr!important}
  [data-r="pad"]{padding-left:18px!important;padding-right:18px!important}
  [data-r="vthumbs"]{grid-template-columns:1fr 1fr!important}
  [data-r="videohead"]{flex-direction:column;align-items:flex-start!important;gap:12px}
  .sm-property-gallery .swiper-slide{height:310px}
  .sm-media-panel .sm-property-gallery .swiper-slide{height:300px}
  .sm-media-panel .sm-tour-embed iframe{min-height:300px}
  .sm-rail-specs{grid-template-columns:1fr 1fr}
  .sm-property-gallery-thumbs .swiper-slide{height:70px}
  .sm-gallery-nav{width:36px;height:36px}
  .sm-video-panel{padding:22px;border-radius:14px}
  .sm-video-head h2{font-size:22px}
  .sm-video-open{white-space:normal}
  .sm-video-embed::after{top:12px;right:12px;width:112px;height:34px}
  .sm-tour-embed iframe{min-height:420px}
}

/* Premium real-estate gallery */
.sm-gallery-premium{isolation:isolate}
.sm-property-gallery{border-radius:20px;background:#111827;box-shadow:0 26px 70px rgba(29,39,70,.18)}
.sm-property-gallery .swiper-slide{height:620px;background:#111827}
.sm-gallery-open-slide{width:100%;height:100%;display:block;padding:0;background:transparent;border:0;cursor:zoom-in}
.sm-gallery-open-slide img{transition:transform .7s ease,filter .7s ease}.sm-property-gallery .swiper-slide-active .sm-gallery-open-slide:hover img{transform:scale(1.025);filter:saturate(1.04)}
.sm-gallery-shade{position:absolute;inset:auto 0 0;height:45%;background:linear-gradient(180deg,rgba(15,22,44,0),rgba(15,22,44,.62));pointer-events:none;z-index:2}
.sm-gallery-caption{z-index:3}
.sm-gallery-overlay-card{position:absolute;right:22px;bottom:22px;z-index:6;background:rgba(15,22,44,.72);border:1px solid rgba(255,255,255,.16);border-radius:16px;padding:14px 16px;color:#fff;backdrop-filter:blur(12px);min-width:190px;box-shadow:0 16px 38px rgba(0,0,0,.25)}
.sm-gallery-overlay-card .sm-gallery-chip{display:inline-flex;background:rgba(189,154,92,.18);color:#e7cf9e;border-radius:999px;padding:4px 9px;font-size:10px;text-transform:uppercase;letter-spacing:1.2px;font-weight:800;margin-bottom:8px}.sm-gallery-overlay-card strong{display:block;font-family:var(--sm-font-heading);font-size:18px;margin-bottom:9px}.sm-gallery-overlay-card button{width:100%;background:#bd9a5c;color:#1b2a4a;border-radius:10px;padding:10px 12px;font-weight:800;font-size:12.5px}
.sm-gallery-counter{position:absolute;left:20px;top:20px;z-index:6;background:rgba(255,255,255,.9);color:#1b2a4a;border-radius:999px;padding:8px 12px;font-weight:800;font-size:12px;box-shadow:0 10px 28px rgba(0,0,0,.16)}
.sm-gallery-nav{box-shadow:0 12px 28px rgba(0,0,0,.22)}
.sm-property-gallery-thumbs{max-width:980px;margin:16px auto 0}.sm-property-gallery-thumbs .swiper-slide{height:88px;border-radius:12px;box-shadow:0 8px 20px rgba(29,39,70,.08)}
.sm-gallery-lightbox{position:fixed;inset:0;z-index:99999;display:none}.sm-gallery-lightbox.is-open{display:block}.sm-gallery-lightbox-backdrop{position:absolute;inset:0;background:rgba(8,13,25,.88);backdrop-filter:blur(8px)}.sm-gallery-lightbox-panel{position:absolute;inset:32px;display:flex;flex-direction:column;gap:14px}.sm-gallery-lightbox-head{display:flex;align-items:center;justify-content:space-between;color:#fff}.sm-gallery-lightbox-head span{display:block;color:#e7cf9e;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1.5px}.sm-gallery-lightbox-head strong{font-family:var(--sm-font-heading);font-size:20px}.sm-gallery-lightbox-head button{width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;font-size:30px;line-height:1}.sm-gallery-lightbox-swiper{flex:1;width:100%;border-radius:18px;overflow:hidden;background:#0f1a30}.sm-gallery-lightbox-swiper .swiper-slide{display:flex;align-items:center;justify-content:center}.sm-gallery-lightbox-swiper img{width:100%;height:100%;object-fit:contain}.sm-gallery-lightbox-foot{text-align:center;color:#fff;font-weight:800}.sm-gallery-lightbox-prev{left:22px}.sm-gallery-lightbox-next{right:22px}
body.sm-gallery-lock{overflow:hidden}
@media (max-width:980px){.sm-property-gallery .swiper-slide{height:500px}.sm-gallery-overlay-card{right:16px;bottom:16px}.sm-gallery-lightbox-panel{inset:18px}}
@media (max-width:680px){.sm-property-gallery .swiper-slide{height:360px}.sm-gallery-overlay-card{left:auto;right:12px;bottom:12px;min-width:0;padding:8px 10px;display:flex;align-items:center;gap:8px;border-radius:12px}.sm-gallery-overlay-card .sm-gallery-chip,.sm-gallery-overlay-card strong{display:none}.sm-gallery-overlay-card button{width:auto;white-space:nowrap;font-size:12px;padding:9px 12px}.sm-property-gallery-thumbs .swiper-slide{height:66px}.sm-gallery-lightbox-panel{inset:12px}.sm-gallery-lightbox-head strong{font-size:16px}.sm-gallery-counter{top:14px;left:14px}}

/* Tarjetas de servicios (home) */
.sm-svc-card{background:transparent;border-radius:12px;padding:32px 26px;transition:transform .25s ease,box-shadow .25s ease,background-color .25s ease}
.sm-svc-card .sm-svc-icon{width:56px;height:56px;border-radius:50%;background:#fff;color:#bd9a5c;display:flex;align-items:center;justify-content:center;margin-bottom:20px;transition:background-color .25s ease}
.sm-svc-card.is-active,.sm-svc-card:hover{background:#fff;box-shadow:0 16px 40px rgba(29,39,70,.12);transform:translateY(-6px)}
.sm-svc-card.is-active .sm-svc-icon,.sm-svc-card:hover .sm-svc-icon{background:#f3eee2}
.sm-svc-card a{transition:color .2s ease}
.sm-svc-card:hover a{color:#bd9a5c}

/* Gallery fullscreen fixes */
.sm-gallery-premium{isolation:auto}
.sm-gallery-lightbox{z-index:2147483000}
.sm-gallery-lightbox.is-open{display:block;position:fixed;animation:smLbFade .2s ease}
.sm-gallery-lightbox.is-open .sm-gallery-lightbox-panel{animation:smLbPanel .26s ease}
@keyframes smLbFade{from{opacity:0}to{opacity:1}}
@keyframes smLbPanel{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.sm-gallery-lightbox.is-open,.sm-gallery-lightbox.is-open .sm-gallery-lightbox-panel{animation:none}}
.sm-gallery-lightbox-backdrop{background:rgba(8,13,25,.94)}

[data-sm-card-link]{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
[data-sm-card-link]:hover{transform:translateY(-3px);box-shadow:0 18px 44px rgba(29,39,70,.13)!important;border-color:#e5d8bd!important}
[data-sm-card-link]:focus{outline:3px solid rgba(189,154,92,.28);outline-offset:4px}
[data-sm-card-link] a{position:relative;z-index:2;text-decoration:none;transition:transform .16s ease,background .16s ease,border-color .16s ease}
[data-sm-card-link] a:hover{transform:translateY(-1px)}
