/* ========================================
   PÁGINA DE PROPIEDADES - TESOROS DEL CARIBE
   CSS específico para la página de propiedades con diseño de lujo
   ======================================== */

/* =================== BACKGROUND OVERRIDE FOR PROPERTIES PAGE =================== */
.main-content {
    background-color: #e8eaed;
}

/* =================== GRID DE PROPIEDADES LUXURY =================== */
.properties-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-xl);
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    justify-content: center;
}

@media (min-width: 1400px) {
    .properties-layout {
        grid-template-columns: repeat(3, minmax(350px, 1fr));
    }
}

/* Properties Grid Layout */
.property-card {
    height: 100%;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--property-border-radius);
    overflow: hidden;
    box-shadow: var(--property-shadow);
    border: var(--property-border-width) solid var(--gold-primary);
    background: var(--white-pure);
    transition: all 0.3s ease;
    cursor: pointer;
}

.property-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--navy-primary);
}

.property-card:hover .property-title {
    color: var(--gold-primary);
}

.property-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-sm);
}

.property-content-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Image Container */
.property-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: var(--white-pure);
}

.property-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.property-slider::-webkit-scrollbar {
    display: none;
}

.property-image {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    opacity: 1;
    transition: opacity 0.3s ease;
    background: var(--gray-light);
}

/* Loading states for images */
.property-image.loading {
    opacity: 0.7;
}

.property-image.lazy {
    background: var(--gray-light);
}

.property-image.error {
    background: var(--gray-light);
    position: relative;
}

.property-image.error::after {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.5;
}

.property-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        var(--gray-light) 0%, 
        var(--white-pure) 50%, 
        var(--gray-light) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.property-image-container.loading::before {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    opacity: 0;
    z-index: 2;
}

.property-image-container.loading .loading-spinner {
    opacity: 1;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Property Content */
.property-header {
    margin-bottom: var(--space-xs);
    text-align: center;
}

.property-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--navy-primary);
    margin-bottom: var(--space-xs);
    font-weight: 600;
    transition: color 0.3s ease;
}

.property-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    color: var(--gray-charcoal);
    font-size: 0.9rem;
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
    justify-content: center;
    text-align: center;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
    color: var(--gray-charcoal);
}

.feature i {
    color: var(--gold-primary);
    font-size: 0.9rem;
}

/* Footer */
.property-footer {
    padding-top: var(--space-sm);
    margin-top: auto;
    border-top: 2px solid var(--gold-primary);
    text-align: center;
}

.property-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.price-currency {
    font-size: 0.9rem;
    color: var(--black-luxury);
}

.price-amount {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--navy-primary);
}

/* Actions */
.property-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    width: 100%;
    margin-top: var(--space-sm);
}

.btn-whatsapp,
.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 44px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white-pure);
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-contact {
    background: var(--navy-primary);
    color: var(--white-pure);
}

.btn-contact:hover {
    background: var(--gold-primary);
}

/* Slider Controls */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-primary);
    font-size: 0.9rem;
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0.8;
}

.property-image-container:hover .slider-control {
    opacity: 1;
}

.slider-control:hover {
    background: var(--white-pure);
    color: var(--gold-primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-control.prev {
    left: 12px;
}

.slider-control.next {
    right: 12px;
}

/* Dots */
.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 24px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.property-image-container:hover .slider-dots {
    opacity: 1;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.slider-dot.active {
    background: var(--white-pure);
    transform: scale(1.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.slider-dot:hover:not(.active) {
    background: var(--gold-primary);
    transform: scale(1.1);
}

/* Property Tags */
.property-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.property-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-tag {
    background: var(--gold-primary);
    color: var(--navy-primary);
}

.type-tag {
    background: var(--navy-primary);
    color: var(--white-pure);
}

/* Responsive */
@media (max-width: 768px) {
    .properties-layout {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--space-lg);
    }

    .property-image-container {
        height: 280px;
    }
    
    /* Slider Controls Responsive */
    .slider-control {
        width: 32px;
        height: 32px;
        opacity: 1; /* Always visible on mobile */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .slider-control.prev {
        left: 8px;
    }
    
    .slider-control.next {
        right: 8px;
    }
    
    /* Slider Dots Responsive */
    .slider-dots {
        opacity: 1; /* Always visible on mobile */
        bottom: 8px;
        padding: 6px 10px;
        gap: 6px;
        backdrop-filter: blur(8px);
    }
    
    .slider-dot {
        width: 6px;
        height: 6px;
    }
    
    /* Property Price Responsive */
    .price-amount {
        font-size: 1.5rem;
    }
    
    .price-currency {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .properties-layout {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .property-image-container {
        height: 260px;
    }
    
    /* Slider Controls Small Mobile */
    .slider-control {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .slider-control.prev {
        left: 6px;
    }
    
    .slider-control.next {
        right: 6px;
    }
    
    /* Slider Dots Small Mobile */
    .slider-dots {
        bottom: 6px;
        padding: 4px 8px;
        gap: 4px;
        border-radius: 16px;
    }
    
    .slider-dot {
        width: 5px;
        height: 5px;
    }
    
    /* Property Price Small Mobile */
    .price-amount {
        font-size: 1.3rem;
    }
    
    .price-currency {
        font-size: 0.75rem;
    }
    
    /* Property Actions Responsive */
    .btn-whatsapp,
    .btn-contact {
        height: 40px;
        font-size: 1rem;
    }
}

/* Mobile Extra Small (320px and below) */
@media (max-width: 320px) {
    .property-image-container {
        height: 240px;
    }
    
    /* Slider Controls Extra Small */
    .slider-control {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .slider-control.prev {
        left: 4px;
    }
    
    .slider-control.next {
        right: 4px;
    }
    
    /* Slider Dots Extra Small */
    .slider-dots {
        bottom: 4px;
        padding: 3px 6px;
        gap: 3px;
        border-radius: 12px;
    }
    
    .slider-dot {
        width: 4px;
        height: 4px;
    }
    
    /* Property Price Extra Small */
    .price-amount {
        font-size: 1.1rem;
    }
    
    .price-currency {
        font-size: 0.7rem;
    }
    
    /* Property Actions Extra Small */
    .btn-whatsapp,
    .btn-contact {
        height: 36px;
        font-size: 0.9rem;
        padding: 0 var(--space-xs);
    }
    
    /* Property Tags Responsive */
    .property-tag {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .property-tags {
        top: 8px;
        left: 8px;
        gap: 4px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-4xl);
    flex-wrap: wrap;
    padding: 0 var(--space-md);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: var(--space-md) var(--space-lg);
    background: var(--white-pure);
    color: var(--navy-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    border: 2px solid var(--gray-platinum);
}

.page-btn:hover,
.page-btn.active {
    background: var(--navy-primary);
    color: var(--white-pure);
    border-color: var(--navy-primary);
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    color: var(--gold-primary);
    font-weight: 700;
    user-select: none;
    font-size: 1.2rem;
} 