/**
 * Premium Units Section Enhancement
 * Advanced styling for unit cards with modern effects
 */

/* Enhanced Units Grid */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

/* Premium Unit Card Styling */
.unit-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.unit-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
}

/* Image Container with Overlay */
.unit-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.unit-image-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.unit-card:hover .unit-image-photo {
    transform: scale(1.08);
}

/* Gallery Indicator */
.unit-image-gallery-indicator {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    z-index: 2;
}

.unit-image-gallery-indicator svg {
    width: 14px;
    height: 14px;
}

/* Content Area */
.unit-content {
    padding: 1.75rem;
}

.unit-title {
    font-family: var(--font-titles);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pizarra-oscura);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

/* Details List with Icons */
.unit-details {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.unit-details li {
    font-size: 0.9375rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.6;
}

.unit-details svg {
    flex-shrink: 0;
}

/* Features Grid */
.unit-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: var(--marfil-estuco);
    border-radius: 12px;
}

.unit-feature-item {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.unit-feature-icon {
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
}

.unit-feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--olivo);
    stroke-width: 1.5;
}

.unit-feature-label {
    font-size: 0.75rem;
    color: var(--pizarra-oscura);
    font-weight: 500;
    line-height: 1.3;
}

/* Amenities Tags */
.unit-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0;
}

.unit-amenity-tag {
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, #F5F5F5 0%, #ECECEC 100%);
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--pizarra-oscura);
    font-weight: 500;
    transition: all 0.3s ease;
}

.unit-amenity-tag:hover {
    background: linear-gradient(135deg, var(--verde-salvia) 0%, var(--olivo) 100%);
    color: white;
    border-color: var(--olivo);
    transform: translateY(-2px);
}

/* Price Display */
.unit-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 1.5rem 0 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--beige-arena);
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--olivo);
    font-family: var(--font-titles);
}

.price-period {
    font-size: 0.9375rem;
    color: #666;
    font-weight: 400;
    margin-left: 0.5rem;
}

.price-note {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

/* CTA Button */
.unit-card .btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.unit-card .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.unit-card .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Highlight Effect on Hover */
.unit-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--olivo) 0%, var(--verde-salvia) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.unit-card:hover::after {
    transform: scaleX(1);
}

/* Special Offer Badge */
.unit-offer-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Popular Badge */
.unit-popular-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: linear-gradient(135deg, #FFB800 0%, #FF8800 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 184, 0, 0.4);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.unit-popular-badge::before {
    content: '⭐';
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .units-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .units-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .unit-image-container {
        height: 240px;
    }

    .unit-content {
        padding: 1.5rem;
    }

    .unit-title {
        font-size: 1.375rem;
    }

    .unit-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 1rem;
    }

    .price-amount {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .unit-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .unit-feature-icon {
        font-size: 1.5rem;
    }

    .unit-feature-label {
        font-size: 0.6875rem;
    }
}

/* Loading State */
.unit-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.unit-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 10;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}
