/* Base Styles */
.cam4-models-container {
    min-height: 200px;
    position: relative;
}

.cam4-models {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    margin: 0 5px;
}

/* Responsive Grid */
@media (min-width: 600px) and (orientation: landscape) {
    .cam4-models {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .cam4-models {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 599px) {
    .cam4-models {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
        margin: 0 -10px;
    }
}

/* Performer Card */
.performer-card {
    background-color: #000;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.performer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.content-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail con aspect ratio exacto 4:3 (360x270) - Optimizado para SEO */
.performer-thumbnail {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 75%; /* 270/360 = 0.75 = 75% - Aspect ratio 4:3 */
    isolation: isolate;
}

/* Alternativa moderna con aspect-ratio (mejor para CLS y Core Web Vitals) */
@supports (aspect-ratio: 4 / 3) {
    .performer-thumbnail {
        padding-bottom: 0;
        aspect-ratio: 4 / 3;
    }
}

.performer-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.performer-card:hover .performer-thumbnail img {
    transform: scale(1.05);
}

/* Bandera - INLINE dentro de performer-meta */
.performer-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.9));
    pointer-events: none;
    flex-shrink: 0;
}

.performer-flag img {
    width: 24px !important;
    height: 18px !important;
    display: block !important;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Viewers - Superior DERECHA */
.performer-viewers {
    position: absolute;
    top: 5px;
    right: 5px;
    color: white;
    padding: 4px 7px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    z-index: 10;
    line-height: 1;
    pointer-events: none;
    height: 24px;
}

.view-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 16px;
    height: 16px;
}

/* SVG del ojo */
.eye-svg {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.viewer-number {
    display: inline-block;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Nombre - Inferior IZQUIERDA */
.performer-name {
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 10;
    font-size: 0.95em;
    font-weight: bold;
    color: #fff;
    padding: 4px 7px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 100px);
    pointer-events: none;
}

/* Bandera + Género + Edad - Inferior DERECHA */
.performer-meta {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 10;
    padding: 4px 7px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    height: 24px;
}

.performer-gender {
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    line-height: 1;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
    text-rendering: optimizeLegibility;
}

.performer-age {
    font-size: 0.85em;
    color: #fff;
    font-weight: bold;
    line-height: 1;
    white-space: nowrap;
}

/* Status en hover */
.performer-status {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.92);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.75em;
    line-height: 1.4;
    max-width: 85%;
    z-index: 15;
    pointer-events: none;
    text-align: center;
}

.performer-card:hover .performer-status {
    display: block;
    animation: fadeInStatus 0.3s ease;
}

@keyframes fadeInStatus {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Load More Button */
.cam4-load-more-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.cam4-load-more-button {
    background-color: #FF6B35;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.2s ease;
}

.cam4-load-more-button:hover {
    background-color: #E55A2B;
    transform: translateY(-2px);
}

.cam4-load-more-button.loading {
    background-color: #999;
    cursor: wait;
}

.cam4-load-more-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* No Models */
.cam4-no-models {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1em;
    color: #666;
}

/* Responsive Mobile */
@media (max-width: 599px) {
    .performer-flag img {
        width: 20px !important;
        height: 15px !important;
    }
    
    .performer-viewers {
        font-size: 0.8em;
        top: 3px;
        right: 3px;
        padding: 3px 5px;
        gap: 4px;
        height: 20px;
    }
    
    .view-icon {
        width: 14px;
        height: 14px;
    }
    
    .eye-svg {
        width: 14px;
        height: 14px;
    }
    
    .performer-name {
        font-size: 0.85em;
        bottom: 3px;
        left: 3px;
        padding: 3px 5px;
        max-width: calc(100% - 80px);
    }
    
    .performer-meta {
        bottom: 3px;
        right: 3px;
        padding: 3px 5px;
        gap: 5px;
        height: 20px;
    }
    
    .performer-gender {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    
    .performer-age {
        font-size: 0.75em;
    }
}

/* Tablet */
@media (min-width: 600px) and (max-width: 991px) {
    .performer-name {
        font-size: 0.9em;
        max-width: calc(100% - 90px);
    }
    
    .performer-viewers {
        font-size: 0.85em;
    }
    
    .performer-gender {
        font-size: 17px;
        width: 17px;
        height: 17px;
    }
    
    .performer-age {
        font-size: 0.8em;
    }
}

/* FORZAR VISIBILIDAD DE BANDERAS */
.cam4-models .performer-card .performer-thumbnail .performer-meta .performer-flag {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.cam4-models .performer-card .performer-thumbnail .performer-meta .performer-flag img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}