/* Variables de color y fuentes */
:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --light: #f8f9fa;
    --dark: #2d3436;
    --success: #00b894;
    --danger: #d63031;
    --font-family-sans-serif: 'Poppins', sans-serif;
}

/* Estilos generales del cuerpo */
body {
    background-color: #f5f6fa;
    font-family: var(--font-family-sans-serif);
    color: var(--dark);
    padding-top: 70px; /* Espacio para la barra de navegación fija */
}

/* Estilos para las tarjetas */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Estilos para los botones */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #5a4cdb;
    border-color: #5a4cdb;
}

.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-gradient {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Estilos para los formularios */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(109, 94, 220, 0.25);
}

/* Estilos para la barra de navegación */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
}

/* Estilos para la barra de búsqueda */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container .form-control {
    padding-left: 2.5rem; /* Espacio para el icono */
    border-radius: 2rem; /* Bordes redondeados */
}

.search-container .input-group-text {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: transparent;
    border: none;
    padding-left: 1rem;
    z-index: 4; /* Asegura que el icono esté sobre el input */
}

/* Estilos para la previsualización de imágenes */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.image-card {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-card .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(214, 48, 49, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
}

.image-card:hover .delete-btn {
    opacity: 1;
    visibility: visible;
}

.image-card .delete-btn:hover {
    background-color: #d63031;
}

.image-card .main-photo-radio {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px;
    text-align: center;
    transition: opacity 0.2s;
}

.image-card .main-photo-radio .form-check-label {
    color: white;
    font-size: 0.8rem;
    margin-bottom: 0;
    cursor: pointer;
}

.image-card .main-photo-radio .form-check-input {
    cursor: pointer;
}

/* Insignia de producto */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}
