/* ==========================================================================
   Property Types Styles
   ========================================================================== */

/* Tipo de propiedad arriba del título en el loop
   ========================================================================== */

.property-type-label-loop {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    color: #666;
}

/* Colores por tipo de propiedad */
.property-type-label-loop.property-type-casa {
    color: #2ecc71;
}

.property-type-label-loop.property-type-apartamento {
    color: #3498db;
}

.property-type-label-loop.property-type-bodega {
    color: #95a5a6;
}

.property-type-label-loop.property-type-terreno {
    color: #16a085;
}

.property-type-label-loop.property-type-ofibodega {
    color: #9b59b6;
}

.property-type-label-loop.property-type-local {
    color: #e67e22;
}

.property-type-label-loop.property-type-oficina {
    color: #2980b9;
}

.property-type-label-loop.property-type-penthouse {
    color: #e74c3c;
}

.property-type-label-loop.property-type-villa {
    color: #f39c12;
}

.property-type-label-loop.property-type-finca {
    color: #27ae60;
}

.property-type-label-loop.property-type-galera {
    color: #7f8c8d;
}

.property-type-label-loop.property-type-edificio {
    color: #34495e;
}

/* Página de producto individual
   ========================================================================== */

.property-type-single {
    margin: 10px 0 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.property-type-label-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.property-type-icon {
    width: 16px;
    height: 16px;
    color: #3498db;
    flex-shrink: 0;
}

.property-type-label-detail strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .property-type-label-loop {
        font-size: 11px;
    }
    
    .property-type-single {
        margin: 8px 0 15px;
        padding: 10px 12px;
    }
    
    .property-type-label-detail {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .property-type-label-loop {
        font-size: 10px;
    }
}


.property-type-badge.property-type-oficina {
    background: linear-gradient(135deg, #3498db 0%, #2471a3 100%) !important;
    color: #fff !important;
    border-color: #3498db !important;
}

.property-type-badge.property-type-penthouse {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border-color: #e74c3c !important;
}

.property-type-badge.property-type-villa {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%) !important;
    color: #fff !important;
    border-color: #f39c12 !important;
}

.property-type-badge.property-type-finca {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    color: #fff !important;
    border-color: #27ae60 !important;
}

.property-type-badge.property-type-galera {
    background: linear-gradient(135deg, #7f8c8d 0%, #566573 100%) !important;
    color: #fff !important;
    border-color: #7f8c8d !important;
}

.property-type-badge.property-type-edificio {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    color: #fff !important;
    border-color: #34495e !important;
}

/* Asegurar que el badge tenga el mismo estilo que "New" del tema */
.badge-container .property-type-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Página de producto individual
   ========================================================================== */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.products .product {
    position: relative;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce-page ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product a:first-child,
.products .product > a:first-child {
    position: relative;
    display: block;
}

.woocommerce ul.products li.product .product-thumbnail,
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
    position: relative;
}

/* Forzar posición absoluta del badge dentro del link de la imagen */
.woocommerce ul.products li.product a .property-type-badge-wrapper,
.products .product > a .property-type-badge-wrapper {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
}

/* Página de producto individual
   ========================================================================== */

.property-type-single {
    margin: 10px 0 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.property-type-label-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.property-type-icon {
    width: 16px;
    height: 16px;
    color: #3498db;
    flex-shrink: 0;
}

.property-type-label-detail strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Animaciones
   ========================================================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .property-type-badge-wrapper {
        top: 8px;
        left: 8px;
    }
    
    .property-type-label {
        padding: 5px 10px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }
    
    .property-type-single {
        margin: 8px 0 15px;
        padding: 10px 12px;
    }
    
    .property-type-label-detail {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .property-type-badge-wrapper {
        top: 6px;
        left: 6px;
    }
    
    .property-type-label {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* Compatibilidad con diferentes temas
   ========================================================================== */

/* Flatsome */
.product-small .box-image,
.product-small .box-image > a {
    position: relative !important;
}

.product-small .property-type-badge-wrapper {
    top: 10px;
    left: 10px;
}

/* Astra */
.astra-shop-thumbnail-wrap {
    position: relative !important;
}

/* OceanWP */
.woocommerce .products .product .woocommerce-loop-product__link {
    position: relative !important;
}

/* Storefront */
.storefront-product-section ul.products li.product {
    position: relative !important;
}

/* Asegurar que el badge esté sobre la imagen */
.property-type-badge-wrapper {
    pointer-events: none;
}

.property-type-label {
    pointer-events: auto;
}

/* Hover effects mejorados */
.product:hover .property-type-label {
    transform: scale(1.05);
}

/* Badge alternativo con borde */
.property-type-badge-wrapper.badge-outlined .property-type-label {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 2px solid currentColor;
}

.property-type-badge-wrapper.badge-outlined .property-type-casa {
    color: #2ecc71;
    border-color: #2ecc71;
}

.property-type-badge-wrapper.badge-outlined .property-type-apartamento {
    color: #3498db;
    border-color: #3498db;
}

/* Estilo para múltiples badges (si hay varios tipos) */
.property-type-badge-wrapper + .property-type-badge-wrapper {
    left: auto;
    right: 10px;
}

/* Print styles */
@media print {
    .property-type-badge-wrapper {
        position: static;
        display: inline-block;
        margin: 5px;
    }
    
    .property-type-label {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}
