/* ========================================
   SMILEY GALERÍA PROPIEDAD v1.0
   Galería interactiva venta directa
   Casa y Departamento — Solo español
   ======================================== */

:root {
    --sgp-red:       #ff0000;
    --sgp-green:     #33cc33;
    --sgp-yellow:    #fbbf24;
    --sgp-blue-dark: #1e3a5f;
    --sgp-blue-mid:  #2d5a8e;
    --sgp-dark:      #1a202c;
    --sgp-gray:      #4a5568;
}

/* ==================== 
   ANIMACIONES
   ==================== */
@keyframes sgp-slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sgp-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sgp-pulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}
@keyframes sgp-zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes sgp-fadeInOut {
    0%   { opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes sgp-checkmark {
    0%   { transform: scale(0) rotate(-45deg); }
    50%  { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes sgp-slideHint {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50%       { transform: translateX(8px); opacity: 1; }
}
@keyframes sgp-pulseHint {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}

/* ==================== 
   CONTENEDOR PRINCIPAL
   ==================== */
.sgp-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 40px auto;
    padding: 32px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* ==================== 
   CONTADOR
   ==================== */
.sgp-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 2px solid var(--sgp-yellow);
    box-shadow: 0 4px 12px rgba(251,191,36,0.2);
    animation: sgp-slideDown 0.5s ease-out;
    font-size: 16px;
    font-weight: 700;
    color: var(--sgp-dark);
}

.sgp-counter-icon    { font-size: 24px; }
.sgp-counter-current { font-size: 28px; font-weight: 900; color: var(--sgp-red); animation: sgp-pulse 0.3s ease-out; }
.sgp-counter-label   { font-size: 13px; color: #92400e; font-weight: 600; margin-left: 4px; }

/* ==================== 
   FILTROS
   ==================== */
.sgp-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
}

.sgp-filter-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--sgp-gray);
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    white-space: nowrap;
}

.sgp-filter-btn:hover {
    border-color: var(--sgp-green);
    color: var(--sgp-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51,204,51,0.2);
}

.sgp-filter-btn.active {
    background: linear-gradient(135deg, var(--sgp-red) 0%, #cc0000 100%);
    border-color: var(--sgp-red);
    color: white;
    box-shadow: 0 4px 12px rgba(255,0,0,0.4);
}

.sgp-filter-count {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 4px;
}

.sgp-filter-btn.active .sgp-filter-count { background: rgba(255,255,255,0.2); }

/* ==================== 
   LAYOUT GALERÍA
   ==================== */
.sgp-main-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

/* ==================== 
   HERO PRINCIPAL 16:9
   ==================== */
.sgp-hero-display {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f8f8f8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    cursor: zoom-in;
    transition: box-shadow 0.3s ease;
}

.sgp-hero-display:hover { box-shadow: 0 15px 50px rgba(0,0,0,0.18); }

.sgp-hero-image-wrap,
.sgp-hero-video-wrap { position: absolute; inset: 0; }

.sgp-hero-image {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity 0.35s ease, transform 0.4s ease;
}

.sgp-hero-display:hover .sgp-hero-image { transform: scale(1.02); }
.sgp-hero-video-iframe { width: 100%; height: 100%; border: none; }

.sgp-zoom-hint {
    position: absolute;
    bottom: 20px; right: 20px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.sgp-hero-display:hover .sgp-zoom-hint { opacity: 1; }
.sgp-zoom-hint svg { width: 16px; height: 16px; fill: white; }

/* ==================== 
   THUMBNAILS DESKTOP
   ==================== */
.sgp-thumbnails-wrap { position: relative; width: 100%; }

.sgp-thumbnails-horizontal {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--sgp-red) #f3f4f6;
    padding: 8px 0 16px 0;
    scroll-behavior: smooth;
    cursor: grab;
    position: relative;
}

.sgp-thumbnails-horizontal:active { cursor: grabbing; }
.sgp-thumbnails-horizontal::-webkit-scrollbar       { height: 8px; }
.sgp-thumbnails-horizontal::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 10px; }
.sgp-thumbnails-horizontal::-webkit-scrollbar-thumb { background: var(--sgp-red); border-radius: 10px; }
.sgp-thumbnails-horizontal::-webkit-scrollbar-thumb:hover { background: var(--sgp-green); }

.sgp-thumbnails-horizontal::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 16px;
    width: 80px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
}

.sgp-thumb {
    position: relative;
    flex-shrink: 0;
    width: 160px; height: 110px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    scroll-snap-align: start;
    animation: sgp-fadeIn 0.3s ease backwards;
    animation-delay: calc(var(--index, 0) * 0.03s);
}

.sgp-thumb:hover {
    transform: translateY(-6px);
    border-color: var(--sgp-green);
    box-shadow: 0 8px 20px rgba(51,204,51,0.4);
}

.sgp-thumb.active {
    border-color: var(--sgp-red);
    box-shadow: 0 6px 16px rgba(255,0,0,0.5);
    transform: translateY(-4px);
}

.sgp-thumb.active::after {
    content: '✓';
    position: absolute;
    top: 8px; left: 8px;
    width: 24px; height: 24px;
    background: var(--sgp-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
    animation: sgp-checkmark 0.3s ease-out;
}

.sgp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sgp-thumb-cat {
    position: absolute;
    bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.sgp-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 40px; height: 40px;
    background: rgba(255,0,0,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.sgp-thumb-video:hover .sgp-play-icon { transform: translate(-50%,-50%) scale(1.2); }

.sgp-scroll-hint {
    text-align: center;
    color: var(--sgp-red);
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    animation: sgp-slideHint 1.5s ease-in-out infinite;
}

.sgp-scroll-hint svg { width: 18px; height: 18px; fill: var(--sgp-red); transform: rotate(-90deg); }

/* ==================== 
   CARACTERÍSTICAS CARRUSEL
   ==================== */
.sgp-caracteristicas-wrap {
    margin-top: 32px;
    padding: 24px 24px 28px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    overflow: visible;
}

.sgp-caract-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--sgp-dark);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sgp-green);
}

.sgp-caract-carrusel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--sgp-red) #f3f4f6;
    padding: 8px 0 16px 0;
    position: relative;
}

.sgp-caract-carrusel::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 16px;
    width: 80px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    pointer-events: none;
}

.sgp-caract-carrusel::-webkit-scrollbar       { height: 6px; }
.sgp-caract-carrusel::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 10px; }
.sgp-caract-carrusel::-webkit-scrollbar-thumb { background: var(--sgp-red); border-radius: 10px; }

.sgp-caract-card {
    flex-shrink: 0;
    width: calc(25% - 12px);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    background: #ffffff;
    border-radius: 14px;
    border: 2px solid var(--sgp-green);
    box-shadow: 0 2px 10px rgba(51,204,51,0.1);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    scroll-snap-align: start;
    animation: sgp-fadeIn 0.4s ease backwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
}

.sgp-caract-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, #f0fff0 0%, #e6ffe6 100%);
    box-shadow: 0 8px 24px rgba(51,204,51,0.3);
    border-color: #22aa22;
}

.sgp-caract-emoji {
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px; height: 68px;
    background: linear-gradient(135deg, #f0fff0, #e6ffe6);
    border-radius: 50%;
    border: 2px solid rgba(51,204,51,0.25);
    box-shadow: 0 4px 14px rgba(51,204,51,0.15);
    transition: transform 0.3s ease;
}

.sgp-caract-card:hover .sgp-caract-emoji {
    transform: scale(1.12) rotate(-5deg);
}

.sgp-caract-texto {
    font-size: 14px;
    font-weight: 700;
    color: var(--sgp-dark);
    text-align: center;
    line-height: 1.4;
}

.sgp-scroll-hint-caract {
    text-align: center;
    color: var(--sgp-gray);
    font-size: 14px;
    margin: 12px 0 0 0;
    animation: sgp-pulseHint 2s ease-in-out infinite;
}

/* ==================== 
   SECCIÓN PRECIO Y CARACTERÍSTICAS
   ==================== */
.sgp-precio-wrap {
    background: linear-gradient(135deg, var(--sgp-blue-dark) 0%, #152d47 100%);
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.sgp-precio-header { margin-bottom: 24px; }

.sgp-precio-titulo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

/* Tarjeta de precio */
.sgp-precio-tarjeta {
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.sgp-precio-principal { display: flex; align-items: baseline; gap: 8px; }

.sgp-precio-valor {
    font-size: 42px;
    font-weight: 900;
    color: var(--sgp-green);
    line-height: 1;
}

.sgp-precio-secundario {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.sgp-precio-badge {
    margin-left: auto;
    background: var(--sgp-green);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Grid de características */
.sgp-caract-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.sgp-caract-item {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: all 0.3s ease;
}

.sgp-caract-item:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.sgp-caract-item-wide {
    grid-column: span 2;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
}

.sgp-caract-item-icon  { font-size: 26px; }
.sgp-caract-item-valor { font-size: 22px; font-weight: 800; color: var(--sgp-green); line-height: 1; }
.sgp-caract-item-label { font-size: 12px; color: rgba(255,255,255,0.65); font-weight: 500; text-transform: lowercase; }

.sgp-caract-item-estado {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.sgp-precio-nota {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.07);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--sgp-green);
    margin: 0;
    line-height: 1.6;
}

/* ==================== 
   LIGHTBOX
   ==================== */
.sgp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none;
    cursor: zoom-out;
}

.sgp-lightbox.active {
    display: block;
    animation: sgp-fadeIn 0.3s ease;
}

.sgp-lightbox-content {
    position: relative;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.sgp-lightbox-media {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: sgp-zoomIn 0.4s cubic-bezier(0.4,0,0.2,1);
    cursor: default;
}

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

.sgp-lightbox-video {
    width: 90vw;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.sgp-lightbox-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 56px; height: 56px;
    background: rgba(255,0,0,0.95);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.3s ease;
    z-index: 10002;
    box-shadow: 0 8px 24px rgba(255,0,0,0.6);
}

.sgp-lightbox-close:hover {
    background: rgba(255,255,255,0.95);
    border-color: var(--sgp-red);
    color: var(--sgp-red);
    transform: rotate(90deg) scale(1.15);
}

.sgp-lightbox-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10001;
}

.sgp-lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
    border-color: white;
    transform: translateY(-50%) scale(1.1);
}

.sgp-lightbox-prev { left: 20px; }
.sgp-lightbox-next { right: 20px; }

.sgp-lightbox-counter {
    position: absolute;
    bottom: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px; font-weight: 700;
    z-index: 10001;
}

.sgp-lightbox-caption {
    position: absolute;
    top: 20px; left: 20px; right: 80px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    z-index: 10001;
}

.sgp-lightbox-caption h3 { margin: 0 0 4px 0; font-size: 18px; font-weight: 700; }
.sgp-lightbox-caption p  { margin: 0; font-size: 14px; opacity: 0.9; }

.sgp-lightbox-hint {
    position: absolute;
    top: 90px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    opacity: 0;
    animation: sgp-fadeInOut 4s ease-out;
    pointer-events: none;
    z-index: 10001;
    white-space: nowrap;
}

/* ==================== 
   RESPONSIVE TABLET
   ==================== */
@media (max-width: 1024px) {
    .sgp-wrapper          { padding: 24px; }
    .sgp-thumb            { width: 140px; height: 100px; }
    .sgp-caract-card      { min-width: 200px; }
    .sgp-filter-btn       { padding: 8px 16px; font-size: 13px; }
    .sgp-precio-valor     { font-size: 34px; }
}

/* ==================== 
   RESPONSIVE MÓVIL
   ==================== */
@media (max-width: 768px) {
    .sgp-wrapper           { padding: 20px; }
    .sgp-filters           { display: none; }
    .sgp-counter           { padding: 10px 16px; }
    .sgp-counter-current   { font-size: 24px; }
    .sgp-thumbnails-wrap   { display: none; }

    .sgp-thumbs-mobile {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 0 12px 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        scrollbar-color: var(--sgp-red) #f3f4f6;
    }

    .sgp-thumbs-mobile::-webkit-scrollbar       { height: 6px; }
    .sgp-thumbs-mobile::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 10px; }
    .sgp-thumbs-mobile::-webkit-scrollbar-thumb { background: var(--sgp-red); border-radius: 10px; }

    .sgp-thumb-mobile {
        position: relative;
        flex-shrink: 0;
        width: 90px; height: 90px;
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
        border: 3px solid transparent;
        transition: all 0.3s ease;
        scroll-snap-align: start;
    }

    .sgp-thumb-mobile:hover  { transform: translateY(-4px); border-color: var(--sgp-green); }
    .sgp-thumb-mobile.active { border-color: var(--sgp-red); box-shadow: 0 4px 12px rgba(255,0,0,0.5); }
    .sgp-thumb-mobile img    { width: 100%; height: 100%; object-fit: cover; }

    .sgp-lightbox-content  { padding: 20px; }
    .sgp-lightbox-nav      { width: 44px; height: 44px; }
    .sgp-lightbox-close    { width: 50px; height: 50px; font-size: 28px; top: 15px; right: 15px; }
    .sgp-lightbox-caption  { display: none; }
    .sgp-lightbox-hint     { font-size: 12px; padding: 8px 14px; }

    .sgp-caracteristicas-wrap { padding: 20px; margin-top: 24px; }
    .sgp-caract-title         { font-size: 20px; }

    .sgp-caract-carrusel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        overflow-x: visible;
    }

    .sgp-caract-carrusel::after { display: none; }
    .sgp-caract-card            { width: 100%; min-width: 0; padding: 16px 12px; }
    .sgp-caract-emoji           { font-size: 34px; width: 58px; height: 58px; }
    .sgp-caract-texto           { font-size: 13px; }
    .sgp-scroll-hint-caract     { display: none; }

    .sgp-precio-wrap    { padding: 24px 16px; }
    .sgp-precio-valor   { font-size: 30px; }
    .sgp-precio-tarjeta { flex-direction: column; align-items: flex-start; }
    .sgp-precio-badge   { margin-left: 0; }
    .sgp-caract-grid    { grid-template-columns: repeat(2, 1fr); }
    .sgp-caract-item-wide { grid-column: span 2; }
}

/* ==================== 
   MÓVIL PEQUEÑO
   ==================== */
@media (max-width: 480px) {
    .sgp-wrapper            { padding: 16px; margin-bottom: 24px; }
    .sgp-hero-display       { border-radius: 12px; }
    .sgp-thumb-mobile       { width: 80px; height: 80px; }
    .sgp-caract-grid        { grid-template-columns: 1fr; }
    .sgp-caract-item-wide   { grid-column: span 1; }
    .sgp-precio-valor       { font-size: 26px; }
    .sgp-caract-item-valor  { font-size: 18px; }
}

/* ==================== 
   TOUCH OPTIMIZATION
   ==================== */
@media (hover: none) and (pointer: coarse) {
    .sgp-thumb:hover,
    .sgp-thumb-mobile:hover,
    .sgp-caract-card:hover,
    .sgp-caract-item:hover   { transform: none; }
    .sgp-thumb:active,
    .sgp-thumb-mobile:active { transform: scale(0.95); }
}

/* Desktop: ocultar thumbs móvil */
.sgp-thumbs-mobile { display: none; }

/* ==========================================
   SMILEY GALERÍA v2.0 — FRANJA HERO DATOS
   ========================================== */

/* ── Wrapper principal ── */
.sgp-hero-datos {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: sgp-slideDown 0.5s ease-out;
}

/* ── Top row: badges ── */
.sgp-hero-datos-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sgp-tipo-badge {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.sgp-op-badge {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
}

.sgp-op-venta          { background: rgba(255,0,0,0.2);    color: #ff6b6b; border: 1px solid rgba(255,0,0,0.4); }
.sgp-op-arriendo       { background: rgba(51,204,51,0.15); color: #5de85d; border: 1px solid rgba(51,204,51,0.4); }
.sgp-op-arriendo_noche { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.4); }

.sgp-direct-badge {
    font-size: 11px;
    font-weight: 700;
    color: #33cc33;
    margin-left: auto;
}

/* ── Precio ── */
.sgp-hero-precio {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.sgp-precio-uf {
    font-size: clamp(44px, 6vw, 72px);
    font-weight: 900;
    color: #ff0000;
    line-height: 1;
    letter-spacing: -2px;
    text-shadow: 0 0 50px rgba(255,0,0,0.45);
}

.sgp-precio-clp {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    align-self: flex-end;
    padding-bottom: 4px;
}

.sgp-precio-noche {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    color: #fbbf24;
    line-height: 1;
}

.sgp-precio-noche span {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

/* ── Superficies destacadas ── */
.sgp-hero-superficies {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sgp-sup-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.1);
}

.sgp-sup-const  { border-color: rgba(51,204,51,0.4); }
.sgp-sup-terreno { border-color: rgba(251,191,36,0.3); }

.sgp-sup-num {
    font-size: clamp(22px, 3vw, 38px);
    font-weight: 900;
    line-height: 1;
}

.sgp-sup-const .sgp-sup-num  { color: #33cc33; }
.sgp-sup-terreno .sgp-sup-num { color: #fbbf24; }

.sgp-sup-unit {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-right: 4px;
}

.sgp-sup-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: lowercase;
    align-self: flex-end;
    padding-bottom: 3px;
}

/* ── Chips de características ── */
.sgp-hero-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sgp-chip {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.sgp-chip-green {
    background: rgba(51,204,51,0.12);
    border-color: rgba(51,204,51,0.35);
    color: #5de85d;
}

/* ── Nota ── */
.sgp-hero-nota {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    border-left: 3px solid #33cc33;
    padding-left: 12px;
    margin: 8px 0 0;
    line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sgp-hero-datos       { padding: 18px 20px; }
    .sgp-direct-badge     { margin-left: 0; }
    .sgp-hero-precio      { gap: 10px; }
    .sgp-precio-uf        { font-size: 48px; letter-spacing: -1px; }
    .sgp-sup-num          { font-size: 24px; }
    .sgp-hero-superficies { gap: 10px; }
    .sgp-sup-item         { padding: 8px 14px; }
}

@media (max-width: 480px) {
    .sgp-hero-datos       { padding: 16px; border-radius: 12px; }
    .sgp-precio-uf        { font-size: 38px; letter-spacing: -1px; }
    .sgp-precio-clp       { font-size: 13px; }
    .sgp-sup-num          { font-size: 20px; }
    .sgp-chip             { font-size: 12px; padding: 5px 10px; }
}

/* ── Precio y características al final — eliminado en v2 ──
   La información ahora está en .sgp-hero-datos arriba de la galería.
   Se mantiene la clase .sgp-precio-wrap en CSS por compatibilidad
   pero el PHP ya no la genera en v2.0 ── */
