/* ==============================================
   ESTILOS PARA ANUNCIOS DE TIENDAS (AZUL)
   ============================================== */

/* Colores principales para tiendas */
:root {
    --store-primary: #2563EB;      /* Azul principal */
    --store-secondary: #1D4ED8;    /* Azul más oscuro */
    --store-light: #3B82F6;        /* Azul más claro */
    --store-shadow: rgba(37, 99, 235, 0.15);
    --store-shadow-hover: rgba(37, 99, 235, 0.25);
}

/* ==============================================
   BORDES AZULES PARA ANUNCIOS DE TIENDAS
   ============================================== */

/* Borde azul para anuncios de tiendas en vista de lista */
.card-ospl.ads-list-view.store,
.card-ospl.ads-list-view.store:hover,
.card-ospl.ads-list-view.store:focus,
.card-ospl.ads-list-view.store:active {
    border: 3px solid var(--store-primary) !important;
    border-color: var(--store-primary) !important;
    box-shadow: 0 4px 12px var(--store-shadow) !important;
    transition: all 0.3s ease !important;
}

.card-ospl.ads-list-view.store:hover {
    border-color: var(--store-secondary) !important;
    box-shadow: 0 6px 20px var(--store-shadow-hover) !important;
    transform: translateY(-2px);
}

/* También aplicar a vista de miniaturas si existe */
.card-ospl.ads-thumb-view.store,
.card-ospl.ads-thumb-view.store:hover,
.card-ospl.ads-thumb-view.store:focus,
.card-ospl.ads-thumb-view.store:active {
    border: 3px solid var(--store-primary) !important;
    border-color: var(--store-primary) !important;
    box-shadow: 0 4px 12px var(--store-shadow) !important;
    transition: all 0.3s ease !important;
}

.card-ospl.ads-thumb-view.store:hover {
    border-color: var(--store-secondary) !important;
    box-shadow: 0 6px 20px var(--store-shadow-hover) !important;
    transform: translateY(-2px);
}

/* ==============================================
   ETIQUETA "TIENDA" PARA ANUNCIOS DE TIENDAS
   ============================================== */

/* Etiqueta TIENDA para anuncios de tiendas */
.store-label {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--store-primary) 0%, var(--store-secondary) 100%);
    color: #fff;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px var(--store-shadow);
    z-index: 10;
    border: 1px solid var(--store-secondary);
    border-top: none;
    white-space: nowrap;
}

/* Asegurar que la etiqueta se vea en dispositivos móviles */
@media (max-width: 768px) {
    .store-label {
        font-size: 10px;
        padding: 4px 16px;
        letter-spacing: 0.3px;
    }
}

/* ==============================================
   CARRUSEL DE TIENDAS EN HOME
   ============================================== */

/* Título de sección para tiendas */
.store-ads-title {
    color: var(--store-primary);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Badge de distancia para tiendas */
.distance-badge-store {
    color: var(--store-primary) !important;
    font-weight: 500;
    background: #EBF8FF;
    border: 1px solid #BFDBFE;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Contenedor de la sección de tiendas */
.store-ads-section {
    background: linear-gradient(135deg, #F8FAFC 0%, #EBF8FF 100%);
    padding: 3rem 0;
    margin: 2rem 0;
    border-radius: 16px;
}

/* Cards especiales para el carrusel de tiendas */
.store-carousel-card {
    border: 3px solid var(--store-primary) !important;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 12px var(--store-shadow) !important;
    position: relative;
}

.store-carousel-card:hover {
    border-color: var(--store-secondary) !important;
    box-shadow: 0 6px 20px var(--store-shadow-hover) !important;
    transform: translateY(-4px);
}

/* Forzar bordes azules en cards de tienda */
.card.store,
.store-carousel-card.store,
html body .store-carousel-card,
html body .card.store {
    border: 3px solid var(--store-primary) !important;
    border-color: var(--store-primary) !important;
    box-shadow: 0 4px 12px var(--store-shadow) !important;
}

.card.store:hover,
.store-carousel-card.store:hover,
html body .store-carousel-card:hover,
html body .card.store:hover {
    border-color: var(--store-secondary) !important;
    box-shadow: 0 6px 20px var(--store-shadow-hover) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-ads-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .store-ads-section {
        padding: 2rem 0;
        margin: 1rem 0;
        border-radius: 12px;
    }
}

/* ==============================================
   COMPATIBILIDAD Y FALLBACKS
   ============================================== */

/* Asegurar que los estilos se apliquen incluso con otros frameworks */
.store-ads .card,
.store-section .card,
.tienda-ads .card {
    border-color: var(--store-primary) !important;
}

/* Para elementos dinámicos agregados via JavaScript */
.dynamic-store-card {
    border: 2px solid var(--store-primary) !important;
    box-shadow: 0 4px 12px var(--store-shadow) !important;
}

/* ==============================================
   REGLAS FINALES PARA MARCO AZUL TIENDAS
   ============================================== */

/* MÁXIMA PRIORIDAD - Marco azul para tiendas */
article .card.store,
article .card-ospl.store,
article.store .card,
article.store .card-ospl,
.store.card,
.store.card-ospl,
[class*="store"].card,
[class*="store"].card-ospl,
html body article .card.store,
html body article .card-ospl.store,
html body .store.card,
html body .store.card-ospl,
html body div.card.store,
html body div.card-ospl.store {
    border: 4px solid var(--store-primary) !important;
    border-color: var(--store-primary) !important;
    border-top-color: var(--store-primary) !important;
    border-right-color: var(--store-primary) !important;
    border-bottom-color: var(--store-primary) !important;
    border-left-color: var(--store-primary) !important;
    box-shadow: 0 6px 16px var(--store-shadow) !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

/* Hover para marco azul */
article .card.store:hover,
article .card-ospl.store:hover,
article.store .card:hover,
article.store .card-ospl:hover,
.store.card:hover,
.store.card-ospl:hover,
[class*="store"].card:hover,
[class*="store"].card-ospl:hover,
html body article .card.store:hover,
html body article .card-ospl.store:hover,
html body .store.card:hover,
html body .store.card-ospl:hover,
html body div.card.store:hover,
html body div.card-ospl.store:hover {
    border-color: var(--store-secondary) !important;
    border-top-color: var(--store-secondary) !important;
    border-right-color: var(--store-secondary) !important;
    border-bottom-color: var(--store-secondary) !important;
    border-left-color: var(--store-secondary) !important;
    box-shadow: 0 8px 24px var(--store-shadow-hover) !important;
    transform: translateY(-3px) !important;
}

/* Print styles */
@media print {
    .store-label {
        background: #2563EB !important;
        color: white !important;
        border: 1px solid #1D4ED8 !important;
    }
}

/* ==============================================
   REGLA FINAL NUCLEAR - MARCO AZUL TIENDAS
   ============================================== */

/* Regla ultra específica para forzar marco azul */
html body .col-xl-3 .card.store,
html body .col-xl-3 .card-ospl.store,
html body .col-md-4 .card.store,
html body .col-md-4 .card-ospl.store,
html body .col-lg-4 .card.store,
html body .col-lg-4 .card-ospl.store,
html body .col-sm-6 .card.store,
html body .col-sm-6 .card-ospl.store,
html body .col-6 .card.store,
html body .col-6 .card-ospl.store,
html body article.featured .card.store,
html body article.featured .card-ospl.store,
html body article .card.ads-thumb-view.store,
html body .featured .card.store,
html body .featured .card-ospl.store,
html body .nearby-ads-container .card.store,
html body .nearby-ads-container .card-ospl.store,
html body .freelancers-container .card.store,
html body .freelancers-container .card-ospl.store,
html body .freelancers-grid-layout .card.store,
html body .freelancers-grid-layout .card-ospl.store {
    border: 4px solid #2563EB !important;
    border-color: #2563EB !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2) !important;
}

html body .col-xl-3 .card.store:hover,
html body .col-xl-3 .card-ospl.store:hover,
html body .col-md-4 .card.store:hover,
html body .col-md-4 .card-ospl.store:hover,
html body .col-lg-4 .card.store:hover,
html body .col-lg-4 .card-ospl.store:hover,
html body .col-sm-6 .card.store:hover,
html body .col-sm-6 .card-ospl.store:hover,
html body .col-6 .card.store:hover,
html body .col-6 .card-ospl.store:hover,
html body article.featured .card.store:hover,
html body article.featured .card-ospl.store:hover,
html body article .card.ads-thumb-view.store:hover,
html body .featured .card.store:hover,
html body .featured .card-ospl.store:hover,
html body .nearby-ads-container .card.store:hover,
html body .nearby-ads-container .card-ospl.store:hover,
html body .freelancers-container .card.store:hover,
html body .freelancers-container .card-ospl.store:hover,
html body .freelancers-grid-layout .card.store:hover,
html body .freelancers-grid-layout .card-ospl.store:hover {
    border-color: #1D4ED8 !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3) !important;
    transform: translateY(-3px) !important;
}

/* ==============================================
   POSICIONAMIENTO SEALS DE VERIFICADO SOBRE CORAZÓN FAVORITOS
   ============================================== */

/* Posicionar seal de verificado en esquina inferior derecha de la foto */
.card-ospl .card-image .user-circle,
.card-ospl .card-image .user-pro-logo {
    position: absolute !important;
    bottom: 0.5rem !important;  /* Esquina inferior de la foto */
    right: 0.5rem !important;   /* Esquina derecha de la foto */
    z-index: 10 !important;   /* Por encima del corazón (z-index: 9) */
}

/* Posicionar seal de verificado en esquina inferior derecha de la foto en vista lista */
.card-ospl.ads-list-view .user-circle,
.card-ospl.ads-list-view .user-pro-logo {
    position: absolute !important;
    bottom: 0.5rem !important;  /* Esquina inferior de la foto */
    top: auto !important;
    right: 0.5rem !important;   /* Esquina derecha de la foto */
    z-index: 10 !important;
}

/* También aplicar a los destacados y pro en esquina inferior */
.featured .card-ospl .card-image .user-circle,
.featured .card-ospl .card-image .user-pro-logo,
.card-ospl.featured .card-image .user-circle,
.card-ospl.featured .card-image .user-pro-logo {
    position: absolute !important;
    bottom: 0.5rem !important;  /* Esquina inferior de la foto */
    right: 0.5rem !important;   /* Esquina derecha de la foto */
    z-index: 10 !important;
}

/* Ya no necesitamos ocultar el corazón de favoritos - el sello va en esquina diferente */
/* .card-ospl .card-image .user-circle ~ .mark_fav,
.card-ospl .card-image .user-pro-logo ~ .mark_fav {
    display: none !important;
} */
