/* ========================================
   VIÑAS ADMIN - Sistema de Gestión
   ======================================== */

/* Variables de colores */
:root {
    --wine-primary: #3f111c;
    --wine-secondary: #5a1a2a;
    --wine-hover: #720000;
    --gray-light: #f8f9fa;
    --gray-border: #dee2e6;
}

/* Layout principal */
.admin-vinas-page {
    background: var(--gray-light);
    min-height: 80vh;
    padding: 40px 0;
}

/* Header */
.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    color: var(--wine-primary);
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 300;
    margin-bottom: 10px;
}

.admin-header .lead {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Botones principales */
.btn-wine {
    background: var(--wine-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-wine:hover {
    background: var(--wine-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(63, 17, 28, 0.3);
}

.btn-outline-wine {
    border: 2px solid var(--wine-primary);
    color: var(--wine-primary);
    background: transparent;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-wine:hover {
    background: var(--wine-primary);
    color: white;
    border-color: var(--wine-primary);
}

/* Sección de filtros */
.filtros-vinas {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: none;
    margin-bottom: 30px;
}

.filtros-vinas .card-body {
    padding: 25px;
}

.filtros-vinas .form-select,
.filtros-vinas .form-control {
    border: 2px solid var(--gray-border);
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.filtros-vinas .form-select:focus,
.filtros-vinas .form-control:focus {
    border-color: var(--wine-primary);
    box-shadow: 0 0 0 0.2rem rgba(63, 17, 28, 0.1);
}

/* Grid de viñas */
.vinas-grid {
    margin-top: 30px;
}

.vina-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.vina-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(63, 17, 28, 0.15);
}

.vina-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f5f0 0%, #ffffff 100%);
}

.vina-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vina-card:hover .vina-card-image img {
    transform: scale(1.1);
}

.vina-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vina-card-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wine-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.vina-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.vina-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--wine-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.vina-badge i {
    margin-right: 5px;
}

.vina-card-description {
    color: #666;
    line-height: 1.7;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
}

.vina-card-specs {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-border);
}

.vina-card-specs i {
    color: var(--wine-primary);
    margin-right: 5px;
}

.vina-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.vina-card-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Modales */
.modal-header.bg-wine {
    background: var(--wine-primary) !important;
    color: white;
}

.modal-header.bg-wine .btn-close-white {
    filter: brightness(0) invert(1);
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body h6 {
    color: var(--wine-primary);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-border);
}

.modal-body label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.modal-body label.required::after {
    content: '*';
    color: #dc3545;
    margin-left: 4px;
    font-size: 1.1rem;
}

.modal-body .form-control,
.modal-body .form-select {
    border: 2px solid var(--gray-border);
    padding: 10px 15px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: var(--wine-primary);
    box-shadow: 0 0 0 0.2rem rgba(63, 17, 28, 0.1);
}

.modal-body textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Preview de imagen */
#preview-imagen-vina {
    margin-top: 15px;
    text-align: center;
}

#preview-imagen-vina img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Estados de carga */
.spinner-border.text-wine {
    color: var(--wine-primary) !important;
    width: 3rem;
    height: 3rem;
}

/* Notificaciones */
.notificacion-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    font-family: 'Lato', 'Arial', sans-serif;
    font-weight: 600;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Alertas */
.alert-info {
    background: #e7f3ff;
    border: 2px solid #b3d9ff;
    color: #004085;
    border-radius: 8px;
    padding: 15px;
}

.alert-info i {
    color: #0056b3;
    margin-right: 8px;
}

/* Estados vacíos */
.text-center.py-5 {
    padding: 60px 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .vina-card-image {
        height: 220px;
    }
}

@media (max-width: 992px) {
    .admin-header h1 {
        font-size: 2rem;
    }
    
    .vina-card-image {
        height: 200px;
    }
    
    .vina-card-actions {
        flex-direction: column;
    }
    
    .vina-card-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .admin-vinas-page {
        padding: 20px 0;
    }
    
    .admin-header {
        margin-bottom: 30px;
    }
    
    .admin-header h1 {
        font-size: 1.8rem;
    }
    
    .admin-header .lead {
        font-size: 1rem;
    }
    
    .filtros-vinas .card-body {
        padding: 20px;
    }
    
    .vina-card-image {
        height: 180px;
    }
    
    .vina-card-body {
        padding: 20px;
    }
    
    .vina-card-title {
        font-size: 1.3rem;
    }
    
    .modal-body {
        max-height: 60vh;
    }
}

@media (max-width: 576px) {
    .admin-header h1 {
        font-size: 1.5rem;
    }
    
    .btn-wine,
    .btn-outline-wine {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .vina-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .vina-card-specs {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* Utilidades */
.text-wine {
    color: var(--wine-primary) !important;
}

.bg-wine {
    background-color: var(--wine-primary) !important;
}

.border-wine {
    border-color: var(--wine-primary) !important;
}

/* Scrollbar personalizado para el modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--wine-primary);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--wine-secondary);
}
