/* Property Visual Navigator - Frontend Styles */

.pvn-container,
.pvn-container *,
.pvn-operation-grid,
.pvn-operation-grid *,
.pvn-property-grid,
.pvn-property-grid *,
.pvn-location-list,
.pvn-location-list *,
.pvn-results-grid,
.pvn-results-grid * {
    box-sizing: border-box;
}

.pvn-container img,
.pvn-operation-grid img,
.pvn-property-grid img,
.pvn-location-list img,
.pvn-results-grid img {
    max-width: 100%;
    height: auto;
}

.pvn-container {
    max-width: 1080px;
    width: 100%;
    margin: 40px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Breadcrumb */
.pvn-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pvn-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pvn-breadcrumb-item.active {
    color: var(--pvn-primary-color, #6B8E23);
    font-weight: 600;
}

.pvn-breadcrumb-item.clickable {
    cursor: pointer;
}

.pvn-breadcrumb-item:hover.clickable {
    color: var(--pvn-primary-color, #6B8E23);
}

.pvn-breadcrumb-separator {
    color: #dee2e6;
    font-size: 18px;
}

/* Steps */
.pvn-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.pvn-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pvn-step-header {
    text-align: center;
    margin-bottom: 40px;
}

.pvn-step-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 15px 0;
}

.pvn-step-description {
    font-size: 18px;
    color: #718096;
    margin: 0;
}

.pvn-back-btn {
    background: none;
    border: 2px solid var(--pvn-primary-color, #6B8E23);
    color: var(--pvn-primary-color, #6B8E23);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.pvn-back-btn:hover {
    background: var(--pvn-primary-color, #6B8E23);
    color: white;
    transform: translateX(-5px);
}

.pvn-back-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Operation Cards */
.pvn-operation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.pvn-operation-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.pvn-operation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pvn-card-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    width: 100%;
}

.pvn-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.pvn-operation-card:hover .pvn-card-image img {
    transform: scale(1.1);
}

.pvn-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 30px;
    color: white;
}

.pvn-card-label {
    display: block;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.pvn-card-count {
    display: block;
    font-size: 16px;
    opacity: 0.9;
}

/* Property Grid */
.pvn-property-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(4, 1fr);
}

.pvn-property-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.pvn-property-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.pvn-property-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.pvn-property-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

.pvn-property-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
}

.pvn-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.pvn-property-card-image {
    position: relative;
    height: 200px;
    background: #e9ecef;
    overflow: hidden;
}

.pvn-property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pvn-property-card:hover .pvn-property-card-image img {
    transform: scale(1.08);
}

.pvn-property-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 15px;
    color: white;
}

.pvn-property-card-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.pvn-property-card-count {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 3px;
}

/* Location List */
.pvn-location-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pvn-location-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.pvn-location-item:hover {
    border-color: var(--pvn-primary-color, #6B8E23);
    background: var(--pvn-primary-color, #6B8E23);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(107, 142, 35, 0.3);
}

.pvn-location-item:hover .pvn-location-name {
    color: white;
}

.pvn-location-item:hover .pvn-location-count {
    background: white;
    color: var(--pvn-primary-color, #6B8E23);
}

.pvn-location-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.pvn-location-icon {
    font-size: 32px;
}

.pvn-location-count {
    background: var(--pvn-primary-color, #6B8E23);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Results Grid */
.pvn-filters-summary {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 15px;
}

.pvn-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

/* Property Grid Item */
.property-grid-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-grid-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.property-grid-item-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Property Image */
.property-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.property-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.property-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.property-grid-item:hover .property-image img {
    opacity: 0.9;
}

.property-image .property-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Property Badge */
.property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Property Content */
.property-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Property Info Line */
.property-info-line {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 400;
}

/* Property Title */
.property-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

.property-title a {
    color: #1d2327;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-title a:hover {
    color: #2271b1;
}

/* Property Price */
.property-price {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
}

.property-price .woocommerce-Price-amount {
    font-size: 20px;
}

/* Property Features */
.property-features {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Iconos de características - Soporte para SVG, Emoji, Dashicons e Imágenes */
.property-feature .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

/* SVG inline */
.property-feature .feature-svg-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
}

/* Imágenes SVG subidas */
.property-feature .feature-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Dashicons de WordPress */
.property-feature .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    color: #666;
}

/* Emoji */
.property-feature .feature-icon {
    color: inherit;
}

.property-feature .feature-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

/* Hover effects */
.property-feature:hover .feature-svg-icon,
.property-feature:hover .dashicons {
    color: #2c3e50;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.property-feature:hover .feature-icon-img {
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.property-feature:hover .feature-value {
    color: #000;
    transition: color 0.2s ease;
}

/* No Results */
.pvn-no-results {
    text-align: center;
    padding: 60px 20px;
}

.pvn-no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.pvn-no-results h3 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 10px;
}

.pvn-no-results p {
    font-size: 16px;
    color: #718096;
    margin-bottom: 25px;
}

.pvn-reset-btn {
    background: var(--pvn-primary-color, #6B8E23);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pvn-reset-btn:hover {
    background: var(--pvn-secondary-color, #2C5F2D);
    transform: translateY(-2px);
}

/* Loader */
.pvn-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pvn-loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e9ecef;
    border-top-color: var(--pvn-primary-color, #6B8E23);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pvn-loader p {
    margin-top: 20px;
    font-size: 16px;
    color: #718096;
}

/* Responsive */
@media (max-width: 1200px) {
    .pvn-property-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pvn-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pvn-operation-grid {
        grid-template-columns: 1fr;
    }
    
    .pvn-property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pvn-location-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pvn-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pvn-step-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .pvn-property-grid {
        grid-template-columns: 1fr;
    }
    
    .pvn-location-list {
        grid-template-columns: 1fr;
    }
    
    .pvn-results-grid {
        grid-template-columns: 1fr;
    }
    
    .pvn-breadcrumb {
        font-size: 12px;
    }
    
    .pvn-card-label {
        font-size: 22px;
    }
    
    .property-features {
        gap: 12px;
        padding-top: 10px;
    }
    
    .property-feature {
        gap: 5px;
        font-size: 13px;
    }
    
    .property-feature .feature-svg-icon,
    .property-feature .feature-icon-img {
        width: 18px;
        height: 18px;
    }
    
    .property-feature .feature-value {
        font-size: 14px;
    }
}
