body {
    background-color: #f8f9fa;
}

.loading {
    text-align: center;
    padding: 20px;
    width: 100%;
    color: #666;
}

.error {
    text-align: center;
    padding: 20px;
    width: 100%;
    color: #ff0000;
}

#productos-container {
    margin: 0;  /* Eliminar margen */
}

#productos-container .articleList {
    /* Eliminar display:grid aquí para evitar anidamiento */
    display: contents;
}

.articleList,
#productos-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .articleList,
    #productos-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .articleList,
    #productos-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .articleList,
    #productos-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Asegurar que todos los product-card tengan el mismo estilo */
.articleList .product-card,
#productos-container .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Mejorar estilos del buscador */
.search-container {
    flex: 1;
    max-width: 800px;
    margin: 0 30px;
    position: relative;
    display: flex;
    align-items: center;
}

#buscador {
    width: 100%;
    height: 42px;
    padding: 8px 45px 8px 20px;
    border: 2px solid var(--color-principal);
    border-radius: 25px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#buscador:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

#buscador:focus {
    border-color: var(--color-principal);
    box-shadow: 0 0 0 4px rgba(255, 43, 28, 0.1);
    background-color: #fff;
}

#buscador::placeholder {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.search-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-principal);
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    transition: all 0.2s ease;
}

.search-button:hover {
    transform: translateY(-50%) scale(1.1);
    color: var(--color-principal);
}

.search-button:active {
    transform: translateY(-50%) scale(0.95);
}

@media (max-width: 768px) {
    .search-container {
        margin: 0 10px;
        max-width: none;
    }
    
    #buscador {
        height: 38px;
        padding: 8px 40px 8px 15px;
        font-size: 14px;
    }

    .search-button {
        right: 10px;
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .ver-cliente-botones .btn {
        margin: 5px 0;
        display: block;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .ver-cliente-header {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 15px;
    }

    .ver-cliente-header h1 {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .ver-cliente-botones {
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .ver-cliente-botones .btn {
        flex: 1;
        margin: 0;
    }
}

/* Estilos del buscador con mayor especificidad */
.nav-header .search-container #buscador {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 45px 8px 20px !important;
    border: 2px solid var(--color-principal) !important;
    border-radius: 25px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    background-color: #ffffff !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.nav-header .search-container #buscador:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transform: translateY(-1px) !important;
}

.nav-header .search-container #buscador:focus {
    border-color: var(--color-principal) !important;
    box-shadow: 0 0 0 4px rgba(255, 43, 28, 0.1) !important;
    background-color: #fff !important;
}

.card {
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1rem;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
}

.input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.alert {
    border-radius: 0.5rem;
}

.border-bottom {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

/* Estilos para el encabezado */
.nav-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.btn-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-home:hover {
    background-color: #f8f9fa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-section {
    display: flex;
    align-items: center;
}

.user-name {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.user-name:hover {
    background-color: #f8f9fa;
}

.btn-logout {
    color: #dc3545;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #dc3545;
    color: #fff;
}

.separador {
    width: 1px;
    height: 24px;
    background-color: #dee2e6;
}

.dark-mode-toggle {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    background-color: #f8f9fa;
}

.venta-activa {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #e9ecef;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.ver-venta {
    color: #333;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.ver-venta:hover {
    background-color: #dee2e6;
}

@media (max-width: 768px) {
    .nav-header {
        padding: 0.5rem 1rem;
    }

    .desktop-only {
        display: none;
    }

    .nav-logo {
        height: 32px;
    }

    .user-name span {
        display: none;
    }
}
