/* ==================================================
   ✅ VENDOR SHOP - CON TU LOOK AND FEEL
   ================================================== */

/* ===== CONTENEDOR PRINCIPAL ===== */
.vendor-shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== FILTROS (igual que tu estilo) ===== */
.vendor-filters-container {
    background: rgba(31, 41, 55, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid #374151 !important;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
    color: #ffffff !important;
}

/* ===== GRID DE VENDEDORES ===== */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

/* ===== TARJETA DE VENDEDOR (igual que eventos) ===== */
.vendor-card {
    background: linear-gradient(135deg, #000b3d 0%, #443709 100%) !important;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border: 2px solid #374151 !important;
    color: #ffffff !important;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vendor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25) !important;
    border-color: #D10459 !important;
}

.vendor-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ===== IMAGEN DEL VENDEDOR ===== */
.vendor-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #000000 0%, #290000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.vendor-card:hover .vendor-card-image img {
    transform: scale(1.05);
}

/* Imagen por defecto */
.vendor-no-image {
    font-size: 3em;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ===== CONTENIDO DE LA TARJETA ===== */
.vendor-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vendor-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
}

/* ===== METADATOS DEL VENDEDOR ===== */
.vendor-card-meta {
    margin-bottom: 15px;
    flex: 1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #e5e7eb !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.meta-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Contacto dentro de la tarjeta */
.vendor-card-contact {
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: #e5e7eb;
}

.contact-item a {
    color: #ffd700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transition: border-color 0.3s;
}

.contact-item a:hover {
    border-bottom-color: #ffd700;
}

/* ===== BOTÓN DE ACCIÓN ===== */
.view-shop {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #c00c0c 0%, #f70303 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    box-sizing: border-box;
}

.view-shop:hover {
    background: linear-gradient(135deg, #000b3d 0%, #292033 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 12, 12, 0.4);
}

/* ===== CABECERA DEL ORGANIZADOR - VERSIÓN RESPONSIVE ===== */
.vendor-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #000b3d 0%, #443709 100%) !important;
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 2px solid #374151 !important;
}

.vendor-logo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffd700;
    background: white;
}

.vendor-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-info {
    flex: 1;
    min-width: 0; /* Evita desbordamiento */
}

/* ===== RESPONSIVE - MÓVIL ===== */
@media (max-width: 768px) {
    .vendor-header {
        flex-direction: column !important; /* Logo arriba, info abajo */
        align-items: center !important;
        text-align: center !important;
        gap: 20px !important;
        padding: 25px !important;
    }
    
    .vendor-logo {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto !important;
    }
    
    .vendor-info {
        width: 100% !important;
        text-align: center !important;
    }
    
    .vendor-name {
        font-size: 1.8em !important;
        text-align: center !important;
    }
    
    .vendor-description {
        text-align: center !important;
    }
    
    /* Contacto en móvil - centrado */
    .vendor-contact-grid {
        justify-content: center !important;
        text-align: left !important; /* El texto dentro sigue alineado a la izquierda */
    }
    
    .vendor-contact {
        justify-content: center !important;
    }
    
    .vendor-social {
        justify-content: center !important;
    }
    
    .vendor-location {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Último evento centrado */
    .vendor-latest-event {
        text-align: left !important; /* El contenido del último evento sigue alineado a la izquierda */
    }
    
    .latest-event-header {
        justify-content: flex-start !important;
    }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
    .vendor-header {
        padding: 20px !important;
    }
    
    .vendor-logo {
        width: 80px !important;
        height: 80px !important;
    }
    
    .vendor-name {
        font-size: 1.5em !important;
    }
    
    .vendor-contact-grid {
        grid-template-columns: 1fr !important; /* Una columna en móvil pequeño */
        gap: 8px !important;
    }
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* ===== TARJETA DE EVENTO (tu estilo original) ===== */
.event-card {
    background: linear-gradient(135deg, #000b3d 0%, #443709 100%) !important;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border: 2px solid #374151 !important;
    color: #ffffff !important;
    position: relative;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #D10459 !important;
}

.event-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-content {
    padding: 20px;
}

.event-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.3);
}

.event-meta {
    margin-bottom: 15px;
}

.event-meta div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #e5e7eb !important;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.event-price {
    font-size: 1.2em;
    font-weight: 600;
    color: #ffd700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 215, 0, 0.4);
}

.event-button {
    color: #ffd700;
    font-weight: 600;
    font-size: 0.9em;
    transition: color 0.3s;
}

.event-button:hover {
    color: #ffffff;
}

/* ===== ESTADO SIN VENDEDORES/EVENTOS ===== */
.no-vendors,
.no-events {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #000b3d 0%, #443709 100%) !important;
    border-radius: 12px;
    color: #ffffff;
    border: 2px solid #374151 !important;
    grid-column: 1 / -1;
}

/* ===== PAGINACIÓN (si la necesitas) ===== */
.vendor-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.vendor-pagination a,
.vendor-pagination span {
    display: block;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(31, 41, 55, 0.7) !important;
}

.vendor-pagination .current {
    background: #D10459 !important;
    border-color: #D10459 !important;
}

/* ==================================================
   ✅ RESPONSIVE - MÓVIL 2 COLUMNAS (768px-481px)
   ================================================== */

@media (max-width: 768px) and (min-width: 481px) {
    .vendors-grid,
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .vendor-card-image,
    .event-image {
        height: 160px;
    }
    
    .vendor-card-content,
    .event-content {
        padding: 12px;
    }
    
    .vendor-card-title,
    .event-content h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .meta-item,
    .event-meta div {
        font-size: 12px;
        gap: 5px;
    }
    
    .meta-icon {
        width: 12px;
        height: 12px;
    }
    
    .vendor-card-contact {
        font-size: 11px;
        padding: 6px 0;
    }
    
    .view-shop {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .vendor-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .vendor-logo {
        margin: 0 auto 20px;
    }
    
    .vendor-name {
        font-size: 1.8em;
    }
    
    .vendor-contact {
        justify-content: center;
    }
}

/* ==================================================
   ✅ RESPONSIVE - MÓVIL 1 COLUMNA (≤480px)
   ================================================== */

@media (max-width: 480px) {
    .vendors-grid,
    .events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vendor-card-image,
    .event-image {
        height: 180px;
    }
    
    .vendor-card-content,
    .event-content {
        padding: 15px;
    }
    
    .vendor-card-title,
    .event-content h3 {
        font-size: 16px;
    }
    
    .vendor-name {
        font-size: 1.5em;
    }
    
    .vendor-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .vendor-social {
        flex-direction: column;
    }
    
    .vendor-social a {
        width: 100%;
        text-align: center;
    }
}

/* ==================================================
   ✅ DARK MODE NATIVO (tu estilo ya es oscuro, pero por si acaso)
   ================================================== */

@media (prefers-color-scheme: dark) {
    .vendor-card,
    .event-card,
    .vendor-header,
    .no-vendors,
    .no-events {
        background: linear-gradient(135deg, #000b3d 0%, #443709 100%) !important;
    }
    
    .vendor-filters-container {
        background: #111111 !important;
        border-color: #111111 !important;
    }
}

/* ==================================================
   ✅ SAFARI/iOS OPTIMIZATIONS
   ================================================== */

@supports (-webkit-touch-callout: none) {
    .vendor-card,
    .event-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .view-shop,
    .vendor-social a {
        -webkit-appearance: none;
    }
}

/* ==================================================
   ✅ REDUCED MOTION
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    .vendor-card,
    .event-card,
    .view-shop,
    .vendor-social a {
        transition: none;
    }
    
    .vendor-card:hover,
    .event-card:hover {
        transform: none;
    }
}

/* ===== INFORMACIÓN DEL ORGANIZADOR MEJORADA ===== */

/* Ubicación en cabecera */
.vendor-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffd700;
    font-weight: 500;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.vendor-location .meta-icon {
    font-size: 1.2em;
}

/* Grid de contacto en dos columnas */
.vendor-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 5px 0;
}

.contact-icon {
    font-size: 1.1em;
    min-width: 20px;
}

.contact-link {
    color: #ffd700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transition: border-color 0.3s;
    word-break: break-all;
}

.contact-link:hover {
    border-bottom-color: #ffd700;
}

/* Estadísticas del organizador */
.vendor-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.stat-number {
    font-size: 2.2em;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.stat-label {
    font-size: 0.9em;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Título de eventos mejorado */
.vendor-events-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 25px;
    font-size: 1.8em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.events-count {
    font-size: 0.7em;
    padding: 4px 12px;
    background: #D10459;
    border-radius: 20px;
    color: white;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .vendor-contact-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .vendor-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .vendor-events-title {
        font-size: 1.5em;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    .vendor-contact-grid {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .stat-card {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ===== BADGE DE EVENTOS ===== */
.vendor-event-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #D10459 0%, #8b0000 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

/* ===== ESTADÍSTICAS MINI EN TARJETA ===== */
.vendor-stats-mini {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.stat-number {
    font-size: 1.2em;
    font-weight: 700;
    color: #ffd700;
}

.stat-label {
    font-size: 0.8em;
    color: #e5e7eb;
    text-transform: uppercase;
}

/* ===== ORDENAMIENTO POR EVENTOS ===== */
.vendor-card[data-eventos] {
    transition: all 0.3s;
}

/* Los que tienen más eventos pueden tener un borde especial */
.vendor-card[data-eventos="1"] {
    border-left: 3px solid #6b7280;
}

.vendor-card[data-eventos="2"],
.vendor-card[data-eventos="3"] {
    border-left: 3px solid #3b82f6;
}

.vendor-card[data-eventos="4"],
.vendor-card[data-eventos="5"] {
    border-left: 3px solid #f59e0b;
}

.vendor-card[data-eventos^="6"],
.vendor-card[data-eventos^="7"],
.vendor-card[data-eventos^="8"],
.vendor-card[data-eventos^="9"] {
    border-left: 3px solid #10b981;
}

.vendor-card[data-eventos^="10"] {
    border-left: 3px solid #D10459;
    border-left-width: 5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .vendor-event-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .vendor-stats-mini {
        margin: 8px 0;
        padding: 6px;
    }
    
    .stat-number {
        font-size: 1em;
    }
}

/* ===== ÚLTIMO EVENTO DEL ORGANIZADOR ===== */
.vendor-latest-event {
    margin: 20px 0 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 11, 61, 0.8) 0%, rgba(68, 55, 9, 0.8) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-left: 4px solid #D10459;
    backdrop-filter: blur(5px);
}

.latest-event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.latest-icon {
    font-size: 1.3em;
    background: rgba(255, 215, 0, 0.15);
    padding: 5px;
    border-radius: 50%;
}

.latest-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffd700;
    font-weight: 600;
}

.latest-event-details {
    padding-left: 32px;
}

.latest-event-title {
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.latest-event-location {
    color: #e5e7eb;
    font-size: 0.95em;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.latest-event-date {
    color: #ffd700;
    font-size: 0.9em;
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
}

.latest-event-past {
    color: #9ca3af;
    font-size: 0.85em;
    font-style: italic;
}

/* En el listado de vendedores */
.vendor-latest-event-mini {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.85em;
    border-left: 3px solid #D10459;
}

.vendor-latest-event-mini .location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffd700;
}

/* Responsive */
@media (max-width: 768px) {
    .vendor-latest-event {
        padding: 12px;
        margin: 15px 0 10px;
    }
    
    .latest-event-details {
        padding-left: 28px;
    }
    
    .latest-event-title {
        font-size: 1em;
    }
}
.vendor-social-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.vendor-social-icon.instagram {
    background-image: url('/wp-content/plugins/vendor-shop/assets/icons/icon-ig.png');
}

.vendor-social-icon.facebook {
    background-image: url('/wp-content/plugins/vendor-shop/assets/icons/icon-facebook.png');
}

.vendor-social-icon.tiktok {
    background-image: url('/wp-content/plugins/vendor-shop/assets/icons/icon-tiktok.png');
}