/* ========================================
   CAMPOS — listado y detalle
   ======================================== */

/* ---- Listado: thumbnail cuadrado ---- */
.campo-thumb {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: #eee;
}
.campo-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}
.campo-thumb:hover img {
    transform: scale(1.05);
}

/* ---- Listado: filtros ---- */
.filter-group {
    margin-bottom: 16px;
}
.filter-label {
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    color: #555;
    margin: 0 0 6px;
    letter-spacing: 0.04em;
}
.filter-btn {
    margin-bottom: 4px;
}
.filter-btn.active-filter {
    background-color: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}

/* ---- Tabla: headers ordenables ---- */
.sort-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sort-th:hover {
    background-color: rgba(255,255,255,0.08);
}
.sort-icon {
    margin-left: 4px;
    opacity: 0.4;
    font-size: 10px;
}
.sort-th .sort-icon.fa-sort-asc,
.sort-th .sort-icon.fa-sort-desc {
    opacity: 1;
    color: #00B7EB;
}

/* ---- Detalle: campo eliminado overlay ---- */
.campo-eliminado-overlay {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}
.campo-eliminado-content {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    max-width: 480px;
}
.campo-eliminado-content svg {
    color: #c0392b;
    stroke: #c0392b;
    margin-bottom: 20px;
}

/* ---- Detalle: banner vendido ---- */
.campo-vendido-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #fff;
    padding: 18px 30px;
    margin-bottom: 20px;
}
.campo-vendido-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: bold;
}
.campo-vendido-text {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ---- Detalle: carousel con fondo blur ---- */
.campo-image-blur-container {
    width: 100%;
    height: 480px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #111;
    background-size: cover;
    background-position: center;
}
.campo-image-blur-container::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    z-index: 1;
    opacity: 0.7;
}
.campo-image-blur-container img {
    width: 100%; height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}
#campoCarousel .carousel-control {
    background: none;
    font-size: 30px;
    z-index: 3;
}

/* ---- Detalle: tabla de datos ---- */
.table-ficha-campo td:first-child {
    width: 150px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

/* ---- Detalle: sidebar derecho ---- */
.precio-total {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 10px;
}
.localidad-line {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}
.cliente-logo {
    width: 100%;
    height: 90px;
    object-fit: contain;
    margin-bottom: 12px;
}
.contact-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 18px;
    margin-top: 20px;
}
.contact-box h4 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: bold;
}

/* ---- Detalle: modal pantalla completa ---- */
.image-fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
}
.image-fullscreen-modal.open {
    display: flex;
}
.image-fullscreen-modal img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.25s ease;
}
.image-fullscreen-close {
    position: absolute;
    top: 18px; right: 28px;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    line-height: 1;
}
@keyframes zoomIn {
    from { transform: scale(0.2); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .campo-image-blur-container { height: 260px; }
    .precio-total { font-size: 1.5rem; }
    .campo-vendido-text { font-size: 1.2rem; letter-spacing: 2px; }
}
